Profile can contain the exact same entry several times

  • Done
  • quality assurance status badge
Details
5 participants
  • Andreas Enge
  • Gábor Boskovits
  • Leo Famulari
  • Ludovic Courtès
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Andreas Enge
Severity
normal

Debbugs page

Andreas Enge wrote 7 years ago
Packages count as installed twice
(address . bug-guix@gnu.org)
20180221190553.GA5485@jurong
Hello,

trying to upgrade my packages, I notice something curious:

$ ./pre-inst-env guix package -n -u
The following packages would be upgraded:
...
gnutls 3.5.13 -> 3.5.13 /gnu/store/1ah3fd12w6v66q6yjdmd39xbisqi0gpw-gnutls-3.5.13
gnutls 3.5.13 -> 3.5.13 /gnu/store/1ah3fd12w6v66q6yjdmd39xbisqi0gpw-gnutls-3.5.13
...

There is twice the exactly same package!

$ ./pre-inst-env guix package -I gnutls
gnutls 3.5.13 out /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13
gnutls 3.5.13 out /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13

This looks like a bug to me...

Andreas
Ricardo Wurmus wrote 7 years ago
(name . Andreas Enge)(address . andreas@enge.fr)(address . 30569@debbugs.gnu.org)
87d10yqfwj.fsf@elephly.net
Hi Andreas,

Toggle quote (9 lines)
> trying to upgrade my packages, I notice something curious:
>
> $ ./pre-inst-env guix package -n -u
> The following packages would be upgraded:
> ...
> gnutls 3.5.13 -> 3.5.13 /gnu/store/1ah3fd12w6v66q6yjdmd39xbisqi0gpw-gnutls-3.5.13
> gnutls 3.5.13 -> 3.5.13 /gnu/store/1ah3fd12w6v66q6yjdmd39xbisqi0gpw-gnutls-3.5.13
> ...

Does the package appear twice in the profile’s “manifest” file
(e.g. ~/.guix-profile/manifest)?

I’m not sure how it could have ended up there, but one possibility might
be that you had two different versions of gnutls and they have both been
upgraded to the latest version.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
Andreas Enge wrote 7 years ago
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 30569@debbugs.gnu.org)
20180221213453.GA5024@jurong
Hello,

On Wed, Feb 21, 2018 at 08:52:28PM +0100, Ricardo Wurmus wrote:
Toggle quote (3 lines)
> Does the package appear twice in the profile’s “manifest” file
> (e.g. ~/.guix-profile/manifest)?

no, I am not using a manifest and do things by hand all the time.

Toggle quote (4 lines)
> I’m not sure how it could have ended up there, but one possibility might
> be that you had two different versions of gnutls and they have both been
> upgraded to the latest version.

This is a plausible explanation.

I ended up running this command:

$ ./pre-inst-env guix package -r gnutls -i gnutls
guile: warning: failed to install locale
warning: failed to install locale: Invalid argument
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 removed:
gnutls 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13
gnutls 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13

The following package will be upgraded:
gnutls 3.5.13 -> 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13

Then I ended up with only one listed.

Anyway, I do not think it did any harm, but it could indicate a bug somewhere
in the code.

Andreas
Ricardo Wurmus wrote 7 years ago
(name . Andreas Enge)(address . andreas@enge.fr)(address . 30569@debbugs.gnu.org)
87bmgiq9c2.fsf@elephly.net
Andreas Enge <andreas@enge.fr> writes:

Toggle quote (6 lines)
> On Wed, Feb 21, 2018 at 08:52:28PM +0100, Ricardo Wurmus wrote:
>> Does the package appear twice in the profile’s “manifest” file
>> (e.g. ~/.guix-profile/manifest)?
>
> no, I am not using a manifest and do things by hand all the time.

Even so, you’ll have a file called “manifest” in the profile directory.
This is unrelated to whether you used a manifest to create the profile
or not.

(This is the second naming conflict in Guix. The other is “services”
for system services and shepherd services.)

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
Leo Famulari wrote 7 years ago
(name . Andreas Enge)(address . andreas@enge.fr)
20180221221458.GA18507@jasmine.lan
On Wed, Feb 21, 2018 at 10:34:53PM +0100, Andreas Enge wrote:
Toggle quote (13 lines)
> $ ./pre-inst-env guix package -r gnutls -i gnutls
> guile: warning: failed to install locale
> warning: failed to install locale: Invalid argument
> 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 removed:
> gnutls 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13
> gnutls 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13
>
> The following package will be upgraded:
> gnutls 3.5.13 -> 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13

It would be interesting to see the profile history. Was the second
gnutls introduced after the first one, or were they introduced together?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlqN718ACgkQJkb6MLrK
fwiMlBAArBLRLC/2wPLyWi8ZgBx1B6AgAcSNwngLEfWmtP2c1YpD8Rf2Q4i65E1r
ckk0ThRk2fReCfOWE/FhaJaHY0slCcg/Wwm6SRi1NR0i0GG80k7EjvAXv2ixCDYq
j7NEeWeLNuc3v17K2PhhK6F5yWBqnXcErnuEjm98jdLG+a3+l0NhRnD+Q9W7dXeM
pDEa6qtikm9ottKGOAaPuQO3A1XVlmtVN6JwawzPwxLfHgsa9w+/ko2sVzsaXeH4
7gyVlzpxh7CqRjfRnfRjKPE7b1T9IfR94gn+uts9Txe+HupHS10oGp+ihRhxR9lJ
va0KH6usI6VET+VXp5r75nZQ/3OVVsFqWAYNAmBswDWkPnl3yyb6mqh8nYdFFOP5
Gn2wL17cPVX///iLddUqLcT9Ip2a2FAuRcwKHEU2PbLEngfkvhfrMYeQbMsN/oL0
J4A8MgU/UcrHyDbmBqZuVXkrvyZWEFYUsb+ORlEmuNySh+sefri6kfuvSRWjjP3B
UyhmJlgkCUFZiaRWgrhwhRa/RPHzJ2Sfh7//fzkFesBY2LVIg9gecDrtbfsDyEZ1
0mHKDZkmFXoJ1ulprDikcz8YIJLZ2cMqiWsxRI2t5IdlaNVxpHJo1BXeeKJG2yIj
JX837QK5wxS0G3pR5nmYNO4Dt5riG9lXHaGel+DPcbWwE/wflFA=
=fXsb
-----END PGP SIGNATURE-----


Andreas Enge wrote 7 years ago
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 30569@debbugs.gnu.org)
20180221222236.GA5529@jurong
On Wed, Feb 21, 2018 at 11:14:21PM +0100, Ricardo Wurmus wrote:
Toggle quote (4 lines)
> Even so, you’ll have a file called “manifest” in the profile directory.
> This is unrelated to whether you used a manifest to create the profile
> or not.

I see! Yes, it appeared twice.

On Wed, Feb 21, 2018 at 05:14:58PM -0500, Leo Famulari wrote:
Toggle quote (3 lines)
> It would be interesting to see the profile history. Was the second
> gnutls introduced after the first one, or were they introduced together?

Unfortunately I cannot tell any more. I only kept the last ten profiles,
and all of the corresponding manifest entries contain two copies of the
same gnutls. Once both of them were updated.

Andreas
Ludovic Courtès wrote 7 years ago
(name . Andreas Enge)(address . andreas@enge.fr)
87zi3uumh2.fsf@gnu.org
Andreas Enge <andreas@enge.fr> skribis:

Toggle quote (7 lines)
> On Wed, Feb 21, 2018 at 11:14:21PM +0100, Ricardo Wurmus wrote:
>> Even so, you’ll have a file called “manifest” in the profile directory.
>> This is unrelated to whether you used a manifest to create the profile
>> or not.
>
> I see! Yes, it appeared twice.

Looking more closely, it’s actually possible even now to create a
profile with the exact same entry twice:

Toggle snippet (20 lines)
$ guix package -p foo -i gnutls gnutls
La jenaj pakoj estos instalataj:
gnutls 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13
gnutls 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr8a-gnutls-3.5.13

substitute: updating list of substitutes from 'https://berlin.guixsd.org'... 100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0%
La jenaj derivoj estos konstruataj:
/gnu/store/viykf0jcxc9c51yl0p1023b75khad7jn-profile.drv
/gnu/store/yi996sf93p8n15ijf27hcck1b6prywrl-info-dir.drv
/gnu/store/ki7jrd29isi0l1zk93vrqd1p4by08nw7-fonts-dir.drv
/gnu/store/0xkp49578vpjc7q96kyg052v4jhx439m-ca-certificate-bundle.drv
/gnu/store/yxbrnjbxjcdx6nvs8l0wm8236mvx14l7-manual-database.drv
Creating manual page database...
144 entries processed in 0.1 s
pakoj 2 en profilo
La jenaj medi-variablaj difinoj povos esti necesaj:
export PATH="foo/bin${PATH:+:}$PATH"

Weird, but no big deal since they are really the same entry.

(What’s *not* permitted is installing several “gnutls” packages having a
different store file name. See ‘check-for-collisions’ in (guix
profiles).)

What should we do? Status quo? Throwing a ‘delete-duplicates’ call?
Let’s have a poll! ;-)

Ludo’.
Ludovic Courtès wrote 7 years ago
control message for bug #30569
(address . control@debbugs.gnu.org)
87sh9mumb7.fsf@gnu.org
retitle 30569 Profile can contain the exact same entry several times
Gábor Boskovits wrote 7 years ago
Re: bug#30569: Packages count as installed twice
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAE4v=pgEpQhCYCguMHZ+7B9t0sMASdtguQwi2o6TxL9wh9m39g@mail.gmail.com
2018-02-27 22:55 GMT+01:00 Ludovic Courtès <ludo@gnu.org>:

Toggle quote (47 lines)
> Andreas Enge <andreas@enge.fr> skribis:
>
> > On Wed, Feb 21, 2018 at 11:14:21PM +0100, Ricardo Wurmus wrote:
> >> Even so, you’ll have a file called “manifest” in the profile directory.
> >> This is unrelated to whether you used a manifest to create the profile
> >> or not.
> >
> > I see! Yes, it appeared twice.
>
> Looking more closely, it’s actually possible even now to create a
> profile with the exact same entry twice:
>
> --8<---------------cut here---------------start------------->8---
> $ guix package -p foo -i gnutls gnutls
> La jenaj pakoj estos instalataj:
> gnutls 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr
> 8a-gnutls-3.5.13
> gnutls 3.5.13 /gnu/store/g09is0bw144d8zrd059fiarqmjq7vr
> 8a-gnutls-3.5.13
>
> substitute: updating list of substitutes from 'https://berlin.guixsd.org'...
> 100.0%
> substitute: updating list of substitutes from '
> https://mirror.hydra.gnu.org'... 100.0%
> La jenaj derivoj estos konstruataj:
> /gnu/store/viykf0jcxc9c51yl0p1023b75khad7jn-profile.drv
> /gnu/store/yi996sf93p8n15ijf27hcck1b6prywrl-info-dir.drv
> /gnu/store/ki7jrd29isi0l1zk93vrqd1p4by08nw7-fonts-dir.drv
> /gnu/store/0xkp49578vpjc7q96kyg052v4jhx439m-ca-certificate-bundle.drv
> /gnu/store/yxbrnjbxjcdx6nvs8l0wm8236mvx14l7-manual-database.drv
> Creating manual page database...
> 144 entries processed in 0.1 s
> pakoj 2 en profilo
> La jenaj medi-variablaj difinoj povos esti necesaj:
> export PATH="foo/bin${PATH:+:}$PATH"
> --8<---------------cut here---------------end--------------->8---
>
> Weird, but no big deal since they are really the same entry.
>
> (What’s *not* permitted is installing several “gnutls” packages having a
> different store file name. See ‘check-for-collisions’ in (guix
> profiles).)
>
> What should we do? Status quo? Throwing a ‘delete-duplicates’ call?
> Let’s have a poll! ;-)
>
>
I think if the manifest is generated automatically, then
duplicates can be removed automatically reducing clobber,
(most probably the user doesn't care anyways),
but when using a manifest file there should be a warning
about it, so the problem will not be retained.
(These users most probably care about this,
I think this can point to problematic manifest
authoring practices.)


Toggle quote (5 lines)
> Ludo’.
>
>
>
>
Attachment: file
Andreas Enge wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
20180228192217.GA2626@jurong
On Tue, Feb 27, 2018 at 10:55:05PM +0100, Ludovic Courtès wrote:
Toggle quote (3 lines)
> What should we do? Status quo? Throwing a ‘delete-duplicates’ call?
> Let’s have a poll! ;-)

The thing is confusing, and delete-duplicates should be essentially for free,
so I would support to call it. (Well, I filed the bug since I consider this
behaviour to be a bug, no big surprise then!)

Andreas
Ludovic Courtès wrote 7 years ago
(name . Ricardo Wurmus)(address . rekado@elephly.net)
87h8q06jcg.fsf@gnu.org
Ricardo Wurmus <rekado@elephly.net> skribis:

Toggle quote (13 lines)
> Andreas Enge <andreas@enge.fr> writes:
>
>> On Tue, Feb 27, 2018 at 10:55:05PM +0100, Ludovic Courtès wrote:
>>> What should we do? Status quo? Throwing a ‘delete-duplicates’ call?
>>> Let’s have a poll! ;-)
>>
>> The thing is confusing, and delete-duplicates should be essentially for free,
>> so I would support to call it. (Well, I filed the bug since I consider this
>> behaviour to be a bug, no big surprise then!)
>
> I agree. I don’t see a reason to allow for the same package to appear
> more than once in the manifest.

Alright, fixed in 435603a1d6106b535cf143d17cb030b2d0795b54, thanks!

Ludo’.
Closed
Ricardo Wurmus wrote 7 years ago
(name . Andreas Enge)(address . andreas@enge.fr)
87r2p4n5xn.fsf@elephly.net
Andreas Enge <andreas@enge.fr> writes:

Toggle quote (8 lines)
> On Tue, Feb 27, 2018 at 10:55:05PM +0100, Ludovic Courtès wrote:
>> What should we do? Status quo? Throwing a ‘delete-duplicates’ call?
>> Let’s have a poll! ;-)
>
> The thing is confusing, and delete-duplicates should be essentially for free,
> so I would support to call it. (Well, I filed the bug since I consider this
> behaviour to be a bug, no big surprise then!)

I agree. I don’t see a reason to allow for the same package to appear
more than once in the manifest.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
?
Your comment

This issue is archived.

To comment on this conversation send an email to 30569@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 30569
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help