From: zimoun <zimon.toutoune@gmail.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>, 23874@debbugs.gnu.org
Subject: bug#23874: duplicates in manifests are “installed” more than once
Date: Mon, 14 Sep 2020 20:15:55 +0200 [thread overview]
Message-ID: <87a6xsql5w.fsf@gmail.com> (raw)
In-Reply-To: <87bn2inzvr.fsf@gnu.org> ("Ludovic Courtès"'s message of "Thu, 30 Jun 2016 23:14:00 +0200")
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>.
next prev parent reply other threads:[~2020-09-14 18:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-12-02 13:22 ` bug#23874: [PATCH 1/2] profiles: Remove duplicates in manifest transactions Leo Prikler
2020-12-02 13:22 ` bug#23874: [PATCH 2/2] profiles: Delete duplicate manifest entries in packages->manifest Leo Prikler
2020-12-02 20:26 ` bug#23874: [PATCH 1/2] profiles: Remove duplicates in manifest transactions Mark H Weaver
2020-12-02 22:25 ` Leo Prikler
2020-12-02 23:24 ` zimoun
2020-12-05 15:38 ` Ludovic Courtès
2020-12-05 16:29 ` Leo Prikler
2020-12-07 9:16 ` Ludovic Courtès
2020-12-07 15:28 ` zimoun
2020-12-02 23:39 ` bug#23874: [PATCH v2 " Leo Prikler
2020-12-02 23:39 ` bug#23874: [PATCH v2 2/2] profiles: Delete duplicate manifest entries in packages->manifest Leo Prikler
2020-12-05 16:20 ` bug#23874: [PATCH v3 1/2] profiles: Remove duplicates in manifest transactions Leo Prikler
2020-12-05 16:20 ` bug#23874: [PATCH v3 2/2] profiles: Delete duplicate manifest entries in packages->manifest Leo Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a6xsql5w.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=23874@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=ricardo.wurmus@mdc-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).