help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rolling back only a single package


From: cdelia
Subject: Re: rolling back only a single package
Date: Sun, 30 Dec 2018 20:37:33 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Björn Höfling <address@hidden> writes:

> Hi cdelia,
>
Hi!

> On Thu, 27 Dec 2018 16:52:23 -0300
> address@hidden wrote:
>
>> Hi,
>> 
>> I upgraded guix a couple of days ago, installed some things and now I 
>> found that xmobar just keeps segfaulting.
>> 
>> Switching to specific generation it's really cool, but in this case 
>> would "uninstall" all the software that it's between the 
>> update-generation and the current one.
>> 
>> So, there is any way to just downgrade a single package (resolving it 
>> dependencies) with out doing a full switch?
>> 
>> I guess this it's connected to 
>> https://lists.gnu.org/archive/html/help-guix/2016-08/msg00028.html
>> 
>> And I could also switch and then manually re install. But maybe there
>> is a standard or automatic way to do it.
>
>
> There is a nice blog post by Ludivic that describes some aspects of it:
>
> https://www.gnu.org/software/guix/blog/2018/multi-dimensional-transactions-and-rollbacks-oh-my/
>

Just read it. Really nice!

> It looks like the inferior thing he mentioned is already ready, but I
> haven't yet followed that.
>
> Ludo, can you say something about that?
>
> Doing it the way described in the post I can downgrade (in my case I use
> youtube-dl as the package I want to downgrade, as this is in my
> profile):
>
> The trick is to work with the generations of "guix pull".
>
> $ guix package --list-generations
> Generation 122  Dec 15 2018 16:36:58
>  + youtube-dl   2018.11.07      out     
> /gnu/store/20wr2z2qnm36mwcdmmzpsvr9f4899
>  - youtube-dl   2018.09.18      out     
> /gnu/store/h7xdi93gag6r9agp5ivppignh4q0k
>
> $ guix pull --list-generations
> Generation 28   Nov 07 2018 20:38:34
>   guix 91b71cf
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: 91b71cfbba03ea484cc6028b3384bf4609cbcf14
> [..]
> Generation 29   Nov 13 2018 18:38:56
>   guix d540137
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: d5401375099f6e4562b849121265bb1c3e85874f
>   65 packages upgraded: address@hidden, address@hidden,
> [..]
>     address@hidden, address@hidden
>
> You see here, I did update my "guix-pull" generation on 13 November
> that introduced the new youtube-dl version but did update my "guix
> package" profile only on 15 December.
>

Ok I did:

$guix pull -l | grep -e Generation -e xmobar
Generation 1    nov 10 2018 18:52:17
Generation 2    nov 30 2018 21:21:28
Generation 3    dic 08 2018 03:04:20
Generation 4    dic 17 2018 13:15:04
Generation 5    dic 21 2018 11:18:45
Generation 6    dic 29 2018 18:45:24

from this output it seems that xmobar definition it's from before nov 10
and never got updated... strange.

$guix package -l | grep -e Generation -e xmobar
Generation 18   nov 30 2018 12:10:17
 + xmobar       0.26    out     
/gnu/store/d0xc7k7i73dqdzw1cjwg6cypmm3fp8d3-xmobar-0.26
Generation 19   nov 30 2018 12:19:47
Generation 20   nov 30 2018 14:24:36
...
Generation 27   dic 08 2018 18:42:03
 + xmobar       0.28    out     
/gnu/store/crhjq02nz07wrycvyxr21z00n0g7wxwa-xmobar-0.28
 - xmobar       0.26    out     
/gnu/store/d0xc7k7i73dqdzw1cjwg6cypmm3fp8d3-xmobar-0.26
Generation 28   dic 09 2018 21:44:29

So from this I get that on Dic 08 18hs I upgraded xmobar. Which was
installed since nov 18. (really cool to have this history)

It must been guix gen-2 that upgrade it.

I don't get why xmobar doesn't show as an upgraded package on the first
output.

Anyway, it seems that any guix generation before dicember 08 should
work. Maybe to be shure I'll check the one that worked in the first
place: guix generation 2.

This was easy, but maybe an user interface to get a commit/generation
for certain package version could be usefull here!

> Now I need to use the guix from from generation 28, if I want do
> downgrade my youtube-dl:
>
>
> $ /var/guix/profiles/per-user/bjoern/current-guix-28-link/bin/guix
> --version
> guix (GNU Guix) 91b71cfbba03ea484cc6028b3384bf4609cbcf14
>
> OK, this is really the right version, compared to the above generations
> of "guix pull".
>
> Then let's downgrade:
>
> $ /var/guix/profiles/per-user/bjoern/current-guix-28-link/bin/guix
> package -i youtube-dl
> The following package will be downgraded:
>    youtube-dl   2018.11.07 -> 2018.11.03        
> /gnu/store/vw375z5hm4vha0pvfxmadh6qcglacq9g-youtube-dl-2018.11.03
>
> Check it out:
> $ guix package --list-generations
> Generation 125  Dec 28 2018 14:02:08    (current)
>  + youtube-dl   2018.11.03      out     
> /gnu/store/vw375z5hm4vha0pvfxmadh6qcglac
>  - youtube-dl   2018.11.07      out     
> /gnu/store/20wr2z2qnm36mwcdmmzpsvr9f4899
>
> ~$ youtube-dl --version
> 2018.11.03
>
> OK, I'm rolling back, as I don't want to downgrade:
>
> $ guix package --roll-back
> switched from generation 125 to 124
>
> $ youtube-dl --version
> 2018.11.07
>
> Is that what you are looking for?
>

This was just great! Really cool to be able to do this.

If I understand this right by coupling the packages definitions with
guix as a software we gain a more flexible rapid evolving api at the
expense of some a retrocompatibility lose to old packages definitions,
that we re gain anyway by just using and old guix version. Cool!

And If I'm still understanding this right, by using a old guix version
and not a substitute package, we have all the dependency ecosystem.

So for instance if this was not a problem of xmobar per se, but of one
of it dependencies this should work too.

> Björn
>
> PS: Can you help fixing the problem with xmobar?

Well I'm the eternal newbie on haskell.

But I think this have to do with some inconpatibility with GHC version.

Just see this:

https://github.com/jaor/xmobar/commit/a6b2dfc9c9b76fd6a9ec22d71d03b27d9b7689bb

from the readme:

Xmobar versions >= 0.27 require GHC version >= 8.0.2.  Due to an
intermittent bug in GHC, we recommend using either GHC 8.0.2, 8.2.2 or
8.6.

Catriel.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]