guix package --upgrade reverses the order of packages

  • Done
  • quality assurance status badge
Details
4 participants
  • Chris Marusich
  • Ludovic Courtès
  • Pierre Neidhardt
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Chris Marusich
Severity
normal
C
C
Chris Marusich wrote on 13 Apr 2018 07:57
(address . bug-guix@gnu.org)
87r2njwsuy.fsf@gmail.com
Hi,

It seems that running "guix package --upgrade ." reverses the order of
packages installed in a profile. Apparently as a result, repeatedly
running the command on a profile will create multiple generations, even
though the packages are not actually being upgraded.

Here's a way to reproduce it:

Toggle snippet (61 lines)
$ guix package -p test-profile -i guile git:send-email
[0] marusich@garuda.local:/tmp
$ guix package -p test-profile -i guile git:send-email
guix package: warning: Your Guix installation is 7 days old.
guix package: warning: Consider running 'guix pull' followed by
'guix package -u' to get up-to-date packages and security updates.

The following packages will be installed:
guile 2.2.3 /gnu/store/b90y3swxlx3vw2yyacs8cz59b8cbpbw5-guile-2.2.3
git:send-email 2.17.0 /gnu/store/xv8za72akjqidji3y5fz76n21jnvmqvk-git-2.17.0-send-email

2 packages in profile
The following environment variable definitions may be needed:
export PATH="test-profile/bin${PATH:+:}$PATH"
export GIT_EXEC_PATH="test-profile/libexec/git-core"
[0] marusich@garuda.local:/tmp
$ guix package -p test-profile -u .
guix package: warning: Your Guix installation is 7 days old.
guix package: warning: Consider running 'guix pull' followed by
'guix package -u' to get up-to-date packages and security updates.

The following packages will be upgraded:
git:send-email 2.17.0 → 2.17.0 /gnu/store/xv8za72akjqidji3y5fz76n21jnvmqvk-git-2.17.0-send-email
guile 2.2.3 → 2.2.3 /gnu/store/b90y3swxlx3vw2yyacs8cz59b8cbpbw5-guile-2.2.3

2 packages in profile
The following environment variable definitions may be needed:
export PATH="test-profile/bin${PATH:+:}$PATH"
export GIT_EXEC_PATH="test-profile/libexec/git-core"
[0] marusich@garuda.local:/tmp
$ guix package -p test-profile -u .
guix package: warning: Your Guix installation is 7 days old.
guix package: warning: Consider running 'guix pull' followed by
'guix package -u' to get up-to-date packages and security updates.

The following packages will be upgraded:
guile 2.2.3 → 2.2.3 /gnu/store/b90y3swxlx3vw2yyacs8cz59b8cbpbw5-guile-2.2.3
git:send-email 2.17.0 → 2.17.0 /gnu/store/xv8za72akjqidji3y5fz76n21jnvmqvk-git-2.17.0-send-email

2 packages in profile
The following environment variable definitions may be needed:
export PATH="test-profile/bin${PATH:+:}$PATH"
export GIT_EXEC_PATH="test-profile/libexec/git-core"
[0] marusich@garuda.local:/tmp
$ guix package -p test-profile -u .
guix package: warning: Your Guix installation is 7 days old.
guix package: warning: Consider running 'guix pull' followed by
'guix package -u' to get up-to-date packages and security updates.

The following packages will be upgraded:
git:send-email 2.17.0 → 2.17.0 /gnu/store/xv8za72akjqidji3y5fz76n21jnvmqvk-git-2.17.0-send-email
guile 2.2.3 → 2.2.3 /gnu/store/b90y3swxlx3vw2yyacs8cz59b8cbpbw5-guile-2.2.3

2 packages in profile
The following environment variable definitions may be needed:
export PATH="test-profile/bin${PATH:+:}$PATH"
export GIT_EXEC_PATH="test-profile/libexec/git-core"
[0] marusich@garuda.local:/tmp
$

--
Chris
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlrQRuUACgkQ3UCaFdgi
Rp0ykg//ZUMd60tJaYdKF9Zt43S56FsUN9956iV73GWAVzLCKeVotMUrvhS4U1RM
YVbtMiWvWPNEqW00Uls8Cn5wmD7skDlykty1QcUUj7fEL+1DjU4PeQsYoLeohStE
q98XrMal1Mn+Un48HrNdDgdhPqFkOvhhAbFTZpZQLAd1cC2OAG+DEEvCsEyrrlVz
i/E/9LHSg8jZnsy8dB3wGwbRBe44Sp9Daq3XcBmoGVtYo79Uwk4ZHkNQylbGq/EZ
sVdOahc9D+hNF6dNBsi3m47kwsBSr81tBe4NUTyUNdJP5OAt4cbJVqVVBrp4WwbF
j0KPCk4ev21LCBq5VUxvRBmvRhxZT2Ekw3gTWFu38sQFWRl+CFwHKy5GnGPqe+iG
9fMJm4OlYaDwkdilvBLu2e6cxaBf9IHJ3caFcK+6X/pww32/JHzSK4m4azXAo6PB
ih21fTtvc4XKfohdHC/dDPYTbVnzIgtDqnFak55yLVdXKhj+kDgPSOLnxZL8+m8N
2I8RDMrp4uBkL1p7+XyVrRWLvQpJJ7vXG8qtXxMXhWHas3t30ndYUoyRTkh4x8zw
egoEaOMZSt6EebNEQk1ikF+ZqvEzze1X3acXOdWfgKiHiFWs6aAsc7/AOH+EhzFK
4WWZSqCk7qE8TkyuKLqjgQbc26HAAYTaHaWhgUXLKnti4REPIyk=
=fntP
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 18 Apr 2018 23:15
(name . Chris Marusich)(address . cmmarusich@gmail.com)(address . 31142@debbugs.gnu.org)
87604otdvi.fsf@gnu.org
Hello,

Chris Marusich <cmmarusich@gmail.com> skribis:

Toggle quote (5 lines)
> It seems that running "guix package --upgrade ." reverses the order of
> packages installed in a profile. Apparently as a result, repeatedly
> running the command on a profile will create multiple generations, even
> though the packages are not actually being upgraded.

Commit eca16a3d1d9e6b2c064e0105c1015258bf2755f2 was supposed to fix it…
but it lacked a test case… I plaid guilty. :-)

Could you take a closer look at that commit?

Ludo’.
L
L
Ludovic Courtès wrote on 15 Jan 2019 12:07
(name . Chris Marusich)(address . cmmarusich@gmail.com)(address . 31142-done@debbugs.gnu.org)
87muo22n7y.fsf@gnu.org
Hi,

ludo@gnu.org (Ludovic Courtès) skribis:

Toggle quote (12 lines)
> Hello,
>
> Chris Marusich <cmmarusich@gmail.com> skribis:
>
>> It seems that running "guix package --upgrade ." reverses the order of
>> packages installed in a profile. Apparently as a result, repeatedly
>> running the command on a profile will create multiple generations, even
>> though the packages are not actually being upgraded.
>
> Commit eca16a3d1d9e6b2c064e0105c1015258bf2755f2 was supposed to fix it…
> but it lacked a test case… I plaid guilty. :-)

This is fixed in 35225dc57996ebc7a5a55462e0e52d85239195d9, which pretty
much reverts eca16a3d1d9e6b2c064e0105c1015258bf2755f2…

But this time there’s a test case that gives me some confidence. :-)

Thanks,
Ludo’.
Closed
P
P
Pierre Neidhardt wrote on 27 Mar 2019 12:28
unarchive 31142
(address . control@debbugs.gnu.org)
87zhpgo8to.fsf@ambrevar.xyz
unarchive 31142
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlybXlMACgkQm9z0l6S7
zH+UMwf/XMhDmrFF3sZalanSv6PVrok0A/VhU2hhAYj2b0p4rvG3wMljFLI0XQkD
PTXDl7QB6DG+ExNx35brEAwSNrBxivbjUkO9fdm3O5nlAUCQrXQM89l3Skdsr77o
j4s1bB2H0mVxjKAqmMDLEK3wEchf/6E/UxaWCY3ttl0YEQoOzDJbDSBeUMkCTyre
wUrCUCj6coKSKubiEqag1154RFLwIUbK7/wIv2BuKTIxYBQxXvCYmHSm9XZEh4vX
iH20wsQirS/k8x685heS5ogMiJbirqjQIa1Ye3qVdPoA/Be9m8r3SD+Jr4t3o1Aj
r+GFjYYYjiJEuxZH1+x1SODwkpyScQ==
=Hflr
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 27 Mar 2019 12:33
Re: guix package --upgrade reverses the order of packages
(address . 31142@debbugs.gnu.org)
87wokko8ki.fsf@ambrevar.xyz
Hi!

This issue fixes the list order, but it was initially supposed to address

In the linked conversation, the issue that was raised is that "guix
package --upgrade" always upgrades some (propagated?) inputs, even when
there is nothing to upgrade.

I can still reproduce this issue on latest Guix.
Anyone else?
Shall we open a new bug?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlybX50ACgkQm9z0l6S7
zH8sUAf/eWXu2AsBmKI0T7gkzFuAeXC5rHd+xgypS/rgn9W3LySF7u/EdBR5m26n
xUXMLfbK/VOwjwssckg+WMT3p6vCk4BBpzh9U2VhrtVIRSvurRF9p2a40aSP9gPs
4hB6Fkp0X4bOAS5elD5CySvtbai7/83OvUSPxudcO3koCsFDBFUbyHt7g/gSwRkd
fFoJEBb9EiYXES0Ts4XDf5tS1hW4AppemfzksMMsEbo4cfg0YD9j9pHcd0jNS2T0
sexY9scZpF3Z4/5E9OzMgEnVuHuSwyqT/Y0WHRzUgSIPILHqysvzklATj98dN3GG
WGMO/RFupWhNVl7ZGzsET4fOguSDVQ==
=FQ5P
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 28 Mar 2019 13:49
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
87ftr7cgfz.fsf@gnu.org
Hello,

Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (11 lines)
> This issue fixes the list order, but it was initially supposed to address
> https://lists.gnu.org/archive/html/help-guix/2018-04/msg00070.html.
>
> In the linked conversation, the issue that was raised is that "guix
> package --upgrade" always upgrades some (propagated?) inputs, even when
> there is nothing to upgrade.
>
> I can still reproduce this issue on latest Guix.
> Anyone else?
> Shall we open a new bug?

Yes, and I think we’ll close it as “wontfix”. :-)

Ludo’.
P
P
Pierre Neidhardt wrote on 28 Mar 2019 13:56
(name . Ludovic Courtès)(address . ludo@gnu.org)
87pnqbnond.fsf@mimimi.i-did-not-set--mail-host-address--so-tickle-me
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (4 lines)
>> Shall we open a new bug?
>
> Yes, and I think we’ll close it as “wontfix”. :-)

Hmm? Why?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlycxHYACgkQm9z0l6S7
zH9JAAf9FxhKK62ePrwyrCGPhZyT/XFPr+t8XoiArPF9w85qX9fCnz5xscsFlOAH
JLwi3kDbgxJJes4y87mFAOl0WYI6kUcZmzyvgQO3Xrvwr0tZAWtRbaDOe9z6ltVz
Ca9R3HC/0Xt7Zht3NsKpxzxrzMf7tZr8rTreUVisz2WF9fohHZDaQvpgjw9AGbjr
hr/XlUGncMa9v6Ol4/a+Lv8nwrHfDJMcCJmZzZErPu/UrlEDMN9jOwNnp2PipfHA
F9e99jhC3rC9HYNynSsMYiN7oayaliQMPpXMbn7sworrQIPXuZOMcH7egztmgteW
OAKY5efro4v++1AxPlo4QeZTWkTfBA==
=kvt/
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 28 Mar 2019 14:01
Re: bug#31142: guix package --upgrade reverses the order of packages
(address . 31142@debbugs.gnu.org)
783C112A-8BD6-4BB6-B20C-65B74F3BF649@gmail.com
On March 28, 2019 12:49:04 PM UTC, "Ludovic Courtès" <ludo@gnu.org> wrote:
Toggle quote (19 lines)
>Hello,
>
>Pierre Neidhardt <mail@ambrevar.xyz> skribis:
>
>> This issue fixes the list order, but it was initially supposed to
>address
>> https://lists.gnu.org/archive/html/help-guix/2018-04/msg00070.html.
>>
>> In the linked conversation, the issue that was raised is that "guix
>> package --upgrade" always upgrades some (propagated?) inputs, even
>when
>> there is nothing to upgrade.
>>
>> I can still reproduce this issue on latest Guix.
>> Anyone else?
>> Shall we open a new bug?
>
>Yes, and I think we’ll close it as “wontfix”. :-)

May I ask why? It seems it'd be ideal if packages got upgraded only when needed; the false upgrades pollute the output of an upgrade and makes it less useful.

Maxim
P
P
Pierre Neidhardt wrote on 28 Mar 2019 14:13
(address . 31142@debbugs.gnu.org)
87o95vnnvm.fsf@ambrevar.xyz
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (4 lines)
>>Yes, and I think we’ll close it as “wontfix”. :-)
>
> May I ask why? It seems it'd be ideal if packages got upgraded only when needed; the false upgrades pollute the output of an upgrade and makes it less useful.

It also generates spurious generations.
Last but not least, it makes it hard to the user to know when something
actually needs to be updated.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlycyF4ACgkQm9z0l6S7
zH8RyQgAroLo9/XJesoZeEIZVYsE9JCcsEbBCb/rbEVhoGYhA+f0XQWOzKsDh2ks
3+VTretnUi4MYCBzZwGfvEAHfYU9nYUoosYMfp2H12UMmNSZ0PuLTiwkUmL086Sd
JwnPvKhgNBwb9okqOAZOk3O9DVB2RbOmsyFLkKGoGN9mkOqz/PUkogDsRrfxltOW
fB9UxsnwdlFmSmobYG3djFFBXJ2DKKxJTrSmRLSwboj9fPIM/8aDifWWpkLXLis7
xN605cSGht7agW+aAmAI6ka/bRbtfnTlzGZnYvdLi2CHHPLurdksu9+nxa+RcGAE
nUctMj7xMJEOI6u2fSgwdugZJrDxFA==
=5qh+
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 28 Mar 2019 14:30
Re: guix package --upgrade reverses the order of packages
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
87k1gjazyk.fsf@gnu.org
Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (8 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>>> Shall we open a new bug?
>>
>> Yes, and I think we’ll close it as “wontfix”. :-)
>
> Hmm? Why?

At first sight, to me, it’s not entirely clear how to determine whether
something is to be upgraded in the presence of propagated inputs.

And more importantly, I think the “imperative” model is necessarily not
as expressive and “clean” as ‘--manifest’. There are tradeoffs to make.

In short, if we can fix it, that’s great; but otherwise I wouldn’t lose
my hair over it.

I hope that makes sense!

Ludo’.
P
P
Pierre Neidhardt wrote on 28 Mar 2019 14:53
(name . Ludovic Courtès)(address . ludo@gnu.org)
87d0mbnm0f.fsf@ambrevar.xyz
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (3 lines)
> At first sight, to me, it’s not entirely clear how to determine whether
> something is to be upgraded in the presence of propagated inputs.

I think the linked discussion suggested we checked upgrades
recursively. Wouldn't that work?

Toggle quote (3 lines)
> And more importantly, I think the “imperative” model is necessarily not
> as expressive and “clean” as ‘--manifest’. There are tradeoffs to make.

Sorry, I don't understand what you mean. How do we upgrade declaratively? I
could be missing something big here! :)

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlyc0dAACgkQm9z0l6S7
zH9TPwf/c540gjDohPJaLzFnZbFGuoUxIl/7XC5gVRRf6xRjlD4NnErNST2Q9GUs
jjtgQ4IQath+0Ax3WygQqcv+/96ZCqDLAdXO5T7cJXJGYhF0AAy80s7JLqXHPysn
JlNhsJC+HsKMnT6EwNifYOI/Sk9fyazbcYEufl7C9fj3iLZeNT0rn77Jib6enrm+
jji13xqeI1IPNAc4AmiVQcQ4fQGWGXzNiwvEUq6G28kVwK/ZAGXqv4zgxmdBo2Ty
4oky+6LKrkLoBVA5e6kuCS5CL6O2Y/YnFSnvs7INiWBNI0TLRMfHM/BrmxcxqHdL
y7mWTreZwk90/tEaQa6NUIy27GVSSQ==
=8ZWA
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 28 Mar 2019 15:10
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
87a7hfay3k.fsf@gnu.org
Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (8 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> At first sight, to me, it’s not entirely clear how to determine whether
>> something is to be upgraded in the presence of propagated inputs.
>
> I think the linked discussion suggested we checked upgrades
> recursively. Wouldn't that work?

Maybe! Let’s open a new bug. :)

Toggle quote (6 lines)
>> And more importantly, I think the “imperative” model is necessarily not
>> as expressive and “clean” as ‘--manifest’. There are tradeoffs to make.
>
> Sorry, I don't understand what you mean. How do we upgrade
> declaratively?

Just ‘guix pull && guix package --manifest=my-stuff.scm’.

Ludo’.
?