'guix upgrade' misdiagnoses upgrades in the presence of propagated inputs

  • Done
  • quality assurance status badge
Details
2 participants
  • Andy Tai
  • Ludovic Courtès
Owner
unassigned
Submitted by
Andy Tai
Severity
important
A
A
Andy Tai wrote on 23 May 2019 22:41
messages that are redundant can be eliminated?
(address . bug-guix@gnu.org)
CAJsg1E_zg2ichPqat_2J3sz11rEJbB+5z6Zk2Ai-cJHkOfB79A@mail.gmail.com
on my guix installation (on an Ubuntu system but that detail should not
matter)

after running

%guix pull && guix package -u

these were printed:
----
...
New in this revision:
...
hint: Run `guix pull --news' to view the complete list of package changes.

hint: After setting `PATH', run `hash guix' to make sure your shell refers
to `/home/.../.config/guix/current/bin/guix'.

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:
glibc-locales 2.28 → 2.28
/gnu/store/acl2wxzzkkcjv74rlqswdf9p8pwddlmk-glibc-locales-2.28
meson 0.50.0 → 0.50.0
/gnu/store/zc6r8b1rx3q7lqd8kvvpnm38ky925kmj-meson-0.50.0
guile 2.2.4 → 2.2.4
/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4
font-adobe-source-han-sans:cn 1.004 → 1.004
/gnu/store/zf59mg6g0afay9458aarh0rqcz852hhb-font-adobe-source-han-sans-1.004-cn
fontconfig 2.13.1 → 2.13.1
/gnu/store/cnafj0dn09qzy23xnrrjsq5zcdj4739j-fontconfig-2.13.1
epiphany 3.28.3.1 → 3.28.3.1
/gnu/store/n56bdjhqgq7a4a6ndqc3aymyrzvs12hl-epiphany-3.28.3.1
gnome-terminal 3.28.2 → 3.28.2
/gnu/store/r6i61wji0qmv9fqdyk65kx73nzxw8v80-gnome-terminal-3.28.2

nothing to be done
----
Now there seems nothing to be done during the guix package -u step so these
messages
glibc-locales 2.28 → 2.28...
were confusing and probably not necessary?
Attachment: file
L
L
Ludovic Courtès wrote on 24 May 2019 18:55
(name . Andy Tai)(address . atai@atai.org)(address . 35872@debbugs.gnu.org)
87zhnbrdvc.fsf@gnu.org
Hi Andy,

Andy Tai <atai@atai.org> skribis:

Toggle quote (12 lines)
> %guix pull && guix package -u
>
> these were printed:
> ----
> ...
> New in this revision:
> ...
> hint: Run `guix pull --news' to view the complete list of package changes.
>
> hint: After setting `PATH', run `hash guix' to make sure your shell refers
> to `/home/.../.config/guix/current/bin/guix'.

You should follow this advice, which would address this warning:

Toggle quote (3 lines)
> guix package: warning: Consider running 'guix pull' followed by
> 'guix package -u' to get up-to-date packages and security updates.

:-)

Toggle quote (18 lines)
> The following packages will be upgraded:
> glibc-locales 2.28 → 2.28
> /gnu/store/acl2wxzzkkcjv74rlqswdf9p8pwddlmk-glibc-locales-2.28
> meson 0.50.0 → 0.50.0
> /gnu/store/zc6r8b1rx3q7lqd8kvvpnm38ky925kmj-meson-0.50.0
> guile 2.2.4 → 2.2.4
> /gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4
> font-adobe-source-han-sans:cn 1.004 → 1.004
> /gnu/store/zf59mg6g0afay9458aarh0rqcz852hhb-font-adobe-source-han-sans-1.004-cn
> fontconfig 2.13.1 → 2.13.1
> /gnu/store/cnafj0dn09qzy23xnrrjsq5zcdj4739j-fontconfig-2.13.1
> epiphany 3.28.3.1 → 3.28.3.1
> /gnu/store/n56bdjhqgq7a4a6ndqc3aymyrzvs12hl-epiphany-3.28.3.1
> gnome-terminal 3.28.2 → 3.28.2
> /gnu/store/r6i61wji0qmv9fqdyk65kx73nzxw8v80-gnome-terminal-3.28.2
>
> nothing to be done

This is a bug where the presence of propagated inputs leads ‘guix
upgrade’ to assume something would be upgraded, even when that’s not the
case. This can be reproduced with:

guix install -p foo guile
guix upgrade -p foo

I’ll see what can be done.

Thanks for reporting it,
Ludo’.
L
L
Ludovic Courtès wrote on 24 May 2019 18:56
control message for bug #35872
(address . control@debbugs.gnu.org)
87y32vrdt9.fsf@gnu.org
retitle 35872 'guix upgrade' misdiagnoses upgrades in the presence of propagated inputs
quit
L
L
Ludovic Courtès wrote on 24 May 2019 18:57
(address . control@debbugs.gnu.org)
87woifrdsw.fsf@gnu.org
severity 35872 important
quit
L
L
Ludovic Courtès wrote on 24 Mar 2020 18:20
Re: bug#35872: messages that are redundant can be eliminated?
(name . Andy Tai)(address . atai@atai.org)(address . 35872@debbugs.gnu.org)
877dz9mzyx.fsf@gnu.org
Hi,

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (25 lines)
>> The following packages will be upgraded:
>> glibc-locales 2.28 → 2.28
>> /gnu/store/acl2wxzzkkcjv74rlqswdf9p8pwddlmk-glibc-locales-2.28
>> meson 0.50.0 → 0.50.0
>> /gnu/store/zc6r8b1rx3q7lqd8kvvpnm38ky925kmj-meson-0.50.0
>> guile 2.2.4 → 2.2.4
>> /gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4
>> font-adobe-source-han-sans:cn 1.004 → 1.004
>> /gnu/store/zf59mg6g0afay9458aarh0rqcz852hhb-font-adobe-source-han-sans-1.004-cn
>> fontconfig 2.13.1 → 2.13.1
>> /gnu/store/cnafj0dn09qzy23xnrrjsq5zcdj4739j-fontconfig-2.13.1
>> epiphany 3.28.3.1 → 3.28.3.1
>> /gnu/store/n56bdjhqgq7a4a6ndqc3aymyrzvs12hl-epiphany-3.28.3.1
>> gnome-terminal 3.28.2 → 3.28.2
>> /gnu/store/r6i61wji0qmv9fqdyk65kx73nzxw8v80-gnome-terminal-3.28.2
>>
>> nothing to be done
>
> This is a bug where the presence of propagated inputs leads ‘guix
> upgrade’ to assume something would be upgraded, even when that’s not the
> case. This can be reproduced with:
>
> guix install -p foo guile
> guix upgrade -p foo

With commit 3e5ab0a7a9399bb098b9ced46bf3cbf4085c6bab, ‘guix upgrade’
writes “(dependencies changed)” instead of “2.28 → 2.28”, which should
already be less confusing.

Ludo’.
A
A
Andy Tai wrote on 24 Mar 2020 18:36
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 35872@debbugs.gnu.org)
CAJsg1E-ngwqkQtG8M2=-wkm=TxoNt=ty7Jbp6nXHCcBpU4HOfw@mail.gmail.com
Great, thanks. Minor thing but good for end user experience.

On Tue, Mar 24, 2020 at 10:20 AM Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (38 lines)
> Hi,
>
> Ludovic Courtès <ludo@gnu.org> skribis:
>
> >> The following packages will be upgraded:
> >> glibc-locales 2.28 → 2.28
> >> /gnu/store/acl2wxzzkkcjv74rlqswdf9p8pwddlmk-glibc-locales-2.28
> >> meson 0.50.0 → 0.50.0
> >> /gnu/store/zc6r8b1rx3q7lqd8kvvpnm38ky925kmj-meson-0.50.0
> >> guile 2.2.4 → 2.2.4
> >> /gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4
> >> font-adobe-source-han-sans:cn 1.004 → 1.004
> >>
> /gnu/store/zf59mg6g0afay9458aarh0rqcz852hhb-font-adobe-source-han-sans-1.004-cn
> >> fontconfig 2.13.1 → 2.13.1
> >> /gnu/store/cnafj0dn09qzy23xnrrjsq5zcdj4739j-fontconfig-2.13.1
> >> epiphany 3.28.3.1 → 3.28.3.1
> >> /gnu/store/n56bdjhqgq7a4a6ndqc3aymyrzvs12hl-epiphany-3.28.3.1
> >> gnome-terminal 3.28.2 → 3.28.2
> >> /gnu/store/r6i61wji0qmv9fqdyk65kx73nzxw8v80-gnome-terminal-3.28.2
> >>
> >> nothing to be done
> >
> > This is a bug where the presence of propagated inputs leads ‘guix
> > upgrade’ to assume something would be upgraded, even when that’s not the
> > case. This can be reproduced with:
> >
> > guix install -p foo guile
> > guix upgrade -p foo
>
> With commit 3e5ab0a7a9399bb098b9ced46bf3cbf4085c6bab, ‘guix upgrade’
> writes “(dependencies changed)” instead of “2.28 → 2.28”, which should
> already be less confusing.
>
> Ludo’.
>


--
Andy Tai, atai@atai.org, Skype: licheng.tai, Line: andy_tai, WeChat:
andytai1010
Year 2019 ??108?
????????????
????????????
Attachment: file
L
L
Ludovic Courtès wrote on 24 Mar 2020 23:02
(name . Andy Tai)(address . atai@atai.org)
87y2rpjtrr.fsf@gnu.org
(+Cc: Efraim following our discussion on IRC.)

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (7 lines)
> This is a bug where the presence of propagated inputs leads ‘guix
> upgrade’ to assume something would be upgraded, even when that’s not the
> case. This can be reproduced with:
>
> guix install -p foo guile
> guix upgrade -p foo

I came up with an actual fix for that (attached), nice and clean, which
would allow ‘guix upgrade’ to correctly determine whether something is
going to be upgraded.

But then I realized that this cannot work in the presence of grafts:
first because ‘-n’ currently implies ‘--no-grafts’, so this is an apple
to orange comparison, and then because computing the output file name of
a grafted package can require building the package (grafts are “dynamic
dependencies”.)

So I’m willing to punt for now.

I wonder if there’s a UI trick we could use to avoid displaying too many
“(dependencies changed)” though.

Thoughts?

Ludo’.
Attachment: file
L
L
Ludovic Courtès wrote on 31 Mar 2020 00:12
(name . Andy Tai)(address . atai@atai.org)
87imilwkzz.fsf@gnu.org
Hi!

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (21 lines)
> (+Cc: Efraim following our discussion on IRC.)
>
> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> This is a bug where the presence of propagated inputs leads ‘guix
>> upgrade’ to assume something would be upgraded, even when that’s not the
>> case. This can be reproduced with:
>>
>> guix install -p foo guile
>> guix upgrade -p foo
>
> I came up with an actual fix for that (attached), nice and clean, which
> would allow ‘guix upgrade’ to correctly determine whether something is
> going to be upgraded.
>
> But then I realized that this cannot work in the presence of grafts:
> first because ‘-n’ currently implies ‘--no-grafts’, so this is an apple
> to orange comparison, and then because computing the output file name of
> a grafted package can require building the package (grafts are “dynamic
> dependencies”.)

I saw the light :-) and came up with a simple solution to this in commit
a357849f5b1314c2a35efeee237645b9b08c39f5. Basically, we do the complete
manifest entry comparison as in the patch I posted earlier, but we punt
if doing so would require building things (for grafts).

Anecdotal data: on my 288-item profile, “guix upgrade -n” would
previously report that 124 things need to be upgraded, and now it
reports 97 instead.

Ludo’.
Closed
?