unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / Atom feed
* bug#23874: duplicates in manifests are “installed” more than once
@ 2016-06-30 13:59 Ricardo Wurmus
  2016-06-30 21:14 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2016-06-30 13:59 UTC (permalink / raw)
  To: 23874

When there are duplicate references to package variables in a manifest,
the same package will appear to be installed into the same profile
multiple times.

Here’s a manitest:

~~~~~~~~~~~~~~~~~~~~~~
(use-package-modules admin)

;; so stressed!
(packages->manifest
 (list stress stress stress))
~~~~~~~~~~~~~~~~~~~~~~

And here I’m instantiating it:

~~~~~~~~~~~~~~~~~~~~~~
guix package -p /tmp/test --manifest=manitest
installing new manifest from 'manitest' with 3 entries
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0%
substitute: updating list of substitutes from 'https://hydra.gnu.org'... 100.0%
The following derivations will be built:
   /gnu/store/1w51615has971qjwb9xxxvms8q99zr1n-profile.drv
   /gnu/store/jv7a1bm41gjgakb70nym65gp370dd4xs-ca-certificate-bundle.drv
   /gnu/store/1rgv811cqd4qk45y28lbzf8199m4zasv-info-dir.drv
The following file will be downloaded:
   /gnu/store/m31bvg97q7zmd9bvbss81ilyka5gq2hf-stress-1.0.1

Found valid signature for /gnu/store/m31bvg97q7zmd9bvbss81ilyka5gq2hf-stress-1.0.1
From https://mirror.hydra.gnu.org/nar/m31bvg97q7zmd9bvbss81ilyka5gq2hf-stress-1.0.1
Downloading m31bvg…-stress-1.0.1 (29KiB installed)...
 stress-1.0.1                                                 7.2MiB/s 00:00 | 14KiB transferred
3 packages in profile
The following environment variable definitions may be needed:
   export PATH="/tmp/test/bin"
rwurmus in guix: guix package -p /tmp/test -I
stress	1.0.1	out	/gnu/store/m31bvg97q7zmd9bvbss81ilyka5gq2hf-stress-1.0.1
stress	1.0.1	out	/gnu/store/m31bvg97q7zmd9bvbss81ilyka5gq2hf-stress-1.0.1
stress	1.0.1	out	/gnu/store/m31bvg97q7zmd9bvbss81ilyka5gq2hf-stress-1.0.1
rwurmus in guix:
~~~~~~~~~~~~~~~~~~~~~~

No conflicts are reported, so no harm is done, but seemingly having the
very same package more than once in a profile might be confusing.

Should Guix issue a warning when the same variable is referenced more
than once (I don’t like this because there really is no problem), or
should Guix delete duplicates from the list before creating a profile
generation?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#23874: duplicates in manifests are “installed” more than once
  2016-06-30 13:59 bug#23874: duplicates in manifests are “installed” more than once Ricardo Wurmus
@ 2016-06-30 21:14 ` Ludovic Courtès
  2020-09-14 18:15   ` zimoun
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2016-06-30 21:14 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 23874

Hi!

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> No conflicts are reported, so no harm is done, but seemingly having the
> very same package more than once in a profile might be confusing.
>
> Should Guix issue a warning when the same variable is referenced more
> than once (I don’t like this because there really is no problem), or
> should Guix delete duplicates from the list before creating a profile
> generation?

I think it should both delete duplicates, and then error out when two or
more packages with the same name remain.  Further, this should take into
account propagated inputs.

I think this is a pretty radical change, though, and I wonder about the
amount of breakage it would create.  For instance, it means that one
could create a profile containing both magit-referring-to-git-2.8 and
git-2.9, or emms-referring-to-vorbis-tools-1.0 and vorbis-tools-2.0.
Concretely, that means one will no longer be able to upgrade magit
without also upgrading git, for instance (assuming they live in the same
profile.)

WDYT?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#23874: duplicates in manifests are “installed” more than once
  2016-06-30 21:14 ` Ludovic Courtès
@ 2020-09-14 18:15   ` zimoun
  0 siblings, 0 replies; 3+ messages in thread
From: zimoun @ 2020-09-14 18:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Ricardo Wurmus, 23874

Dear,

Reminder: the manifest containing duplicates packages, such that:

--8<---------------cut here---------------start------------->8---
(use-package-modules admin)

;; so stressed!
(packages->manifest
 (list stress stress stress))
--8<---------------cut here---------------end--------------->8---

using “guix package -m manif.scm” leads to:

--8<---------------cut here---------------start------------->8---
The following packages will be installed:
   stress 1.0.4
   stress 1.0.4
   stress 1.0.4

[...]

building profile with 3 packages...
--8<---------------cut here---------------end--------------->8---

And, another UI issue:

--8<---------------cut here---------------start------------->8---
$ guix package -p /tmp/test -I
stress  1.0.4   out     /gnu/store/cm2fg1h2ad6v6zqwiiv1avg1mv2jzn66-stress-1.0.4
stress  1.0.4   out     /gnu/store/cm2fg1h2ad6v6zqwiiv1avg1mv2jzn66-stress-1.0.4
stress  1.0.4   out     /gnu/store/cm2fg1h2ad6v6zqwiiv1avg1mv2jzn66-stress-1.0.4
--8<---------------cut here---------------end--------------->8---


Note that the same kind of issue appears with:

--8<---------------cut here---------------start------------->8---
$ guix package -p /tmp/stress -i stress -i htop -i stress -i htop -i stress
The following packages will be installed:
   htop   3.0.1
   htop   3.0.1
   stress 1.0.4
   stress 1.0.4
   stress 1.0.4

[...]

building profile with 2 packages
--8<---------------cut here---------------end--------------->8---

but list the installed packages is correct:

--8<---------------cut here---------------start------------->8---
$ guix package -p /tmp/stress -I
htop    3.0.1   out     /gnu/store/pb0q52cfy7vld42xbnys26179wcm4k89-htop-3.0.1
stress  1.0.4   out     /gnu/store/cm2fg1h2ad6v6zqwiiv1avg1mv2jzn66-stress-1.0.4
--8<---------------cut here---------------end--------------->8---


On Thu, 30 Jun 2016 at 23:14, ludo@gnu.org (Ludovic Courtès) wrote:
> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
>
>> No conflicts are reported, so no harm is done, but seemingly having the
>> very same package more than once in a profile might be confusing.
>>
>> Should Guix issue a warning when the same variable is referenced more
>> than once (I don’t like this because there really is no problem), or
>> should Guix delete duplicates from the list before creating a profile
>> generation?
>
> I think it should both delete duplicates, and then error out when two or
> more packages with the same name remain.  Further, this should take into
> account propagated inputs.

The duplicates in the list of ’packages->manifest’ could be deleted.  I
mean in guix/scripts/packages.scm:process-action tweak the
’concatenate-manifests’

--8<---------------cut here---------------start------------->8---
           (manifest (match files
                       (() (profile-manifest profile))
                       (_  (map-manifest-entries
                            manifest-entry-with-provenance
                            (concatenate-manifests
                             (map load-manifest files))))))
--8<---------------cut here---------------end--------------->8---

However, why should propagated inputs take into account?

> I think this is a pretty radical change, though, and I wonder about the
> amount of breakage it would create.  For instance, it means that one
> could create a profile containing both magit-referring-to-git-2.8 and
> git-2.9, or emms-referring-to-vorbis-tools-1.0 and vorbis-tools-2.0.
> Concretely, that means one will no longer be able to upgrade magit
> without also upgrading git, for instance (assuming they live in the same
> profile.)

Well, it seems going further that only detects the same package asked to
be installed several times with the same transaction.

All the best,
simon

For reference: <http://issues.guix.gnu.org/issue/23874>.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-14 18:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30 13:59 bug#23874: duplicates in manifests are “installed” more than once Ricardo Wurmus
2016-06-30 21:14 ` Ludovic Courtès
2020-09-14 18:15   ` zimoun

unofficial mirror of bug-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-bugs/0 guix-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-bugs guix-bugs/ https://yhetil.org/guix-bugs \
		bug-guix@gnu.org
	public-inbox-index guix-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.bugs
	nntp://news.gmane.io/gmane.comp.gnu.guix.bugs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git