From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iBuYHq2zX1+zBgAA0tVLHw (envelope-from ) for ; Mon, 14 Sep 2020 18:17:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MOoSGa2zX19aXgAA1q6Kng (envelope-from ) for ; Mon, 14 Sep 2020 18:17:17 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B002A940215 for ; Mon, 14 Sep 2020 18:17:16 +0000 (UTC) Received: from localhost ([::1]:59400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHt2R-0006Ck-L4 for larch@yhetil.org; Mon, 14 Sep 2020 14:17:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHt2E-0006AW-4B for bug-guix@gnu.org; Mon, 14 Sep 2020 14:17:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHt2D-0005DS-Rk for bug-guix@gnu.org; Mon, 14 Sep 2020 14:17:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kHt2D-0003Hb-MT for bug-guix@gnu.org; Mon, 14 Sep 2020 14:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#23874: duplicates in manifests are =?UTF-8?Q?=E2=80=9Cinstalled=E2=80=9D?= more than once Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 14 Sep 2020 18:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23874 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Received: via spool by 23874-submit@debbugs.gnu.org id=B23874.160010738012556 (code B ref 23874); Mon, 14 Sep 2020 18:17:01 +0000 Received: (at 23874) by debbugs.gnu.org; 14 Sep 2020 18:16:20 +0000 Received: from localhost ([127.0.0.1]:56198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHt1Y-0003GS-H3 for submit@debbugs.gnu.org; Mon, 14 Sep 2020 14:16:20 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:43389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHt1T-0003G9-7Y for 23874@debbugs.gnu.org; Mon, 14 Sep 2020 14:16:18 -0400 Received: by mail-wr1-f54.google.com with SMTP id k15so614086wrn.10 for <23874@debbugs.gnu.org>; Mon, 14 Sep 2020 11:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=3gwURCynxwerO8FoyH78btNxfKfJIjJfRElFniCUKfg=; b=df4JZQ10Gt5Z5HTlkpL6t3HcLvly//1S7Y4ZbhVbkvr1Kw7dMUAdU8UTp4bCdgc4ij AC3i+Cyo5KFSblG5EGz29SKiqYLEtOEwJTTl1ktHW1Fd5tyrxoyPrufzKugA3kvEZf7B B5m/PW9Yz0gRgCalwiqIkpH/wsRuX3VKNIlKIAZkzvctsJM5vxEWVrwo0w0qmV6uo1Kg m3xoY9sJksly+dG5pabesERW9wQCLY7tAjfZXrwSJlZHZhd7llG0PIN4vEx6SOPI7ICf WL4yruQw8NJfc9XqdX66n4d4rhMyFRGiJ7RuKa9BxMRHC9qw1rnWOzgOLWhRhMfARL9e GIfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=3gwURCynxwerO8FoyH78btNxfKfJIjJfRElFniCUKfg=; b=lXLFuVZ0dkSbYd6m8vAnL0iaocGO9J0/HgNKZjTtv2vwT1hPUbjlWP8LsXijEhklS/ LvScFaCb4AkzXyHYMp/zQHN+HVZ+DWnuChnWgG6lB1wR5LnPw+9tIlhoEHFVRDcL5L0g 9tTbRD1zmbRM3Qd+mzaie4v9cgQo60AqdUh/3TtD4ehvmgTCPZ7LDh7SKmXIQ23QkM2E j8KGAkFUBIe5wh2qTRHlpiqlvvTNj9eygdQAbcAlrWGYOw1w/HSGbys1luRH6ggVQTie FDX+LxVghuAYF4vHKILHsv/O6PLMgJ2wIe53/f8fBGdHdjqF7VCGYhMO771SsfkCvPLX UmEQ== X-Gm-Message-State: AOAM530qQMVf9f3UoiTuEt59ColfY5e0N2Lg/jn5c4LKUkvbGWOafAM4 Tfoz+RMwWs+QqK7OJtSRswCicWM37ig= X-Google-Smtp-Source: ABdhPJy9kYnNUqh9nvXiZa+LZIwXJmbSHnPHnYl6DsL0GMGaDNq4dxemRnRAFAENEKTGAZPOb/FCXA== X-Received: by 2002:adf:f843:: with SMTP id d3mr18425559wrq.226.1600107368777; Mon, 14 Sep 2020 11:16:08 -0700 (PDT) Received: from pfiuh02 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id v204sm21026018wmg.20.2020.09.14.11.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 11:16:08 -0700 (PDT) From: zimoun References: <87bn2inzvr.fsf@gnu.org> Date: Mon, 14 Sep 2020 20:15:55 +0200 In-Reply-To: <87bn2inzvr.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 30 Jun 2016 23:14:00 +0200") Message-ID: <87a6xsql5w.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ricardo Wurmus , 23874@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=df4JZQ10; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: 0mZ1kbvY5XWk 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 =E2=80=9Cguix package -m manif.scm=E2=80=9D 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=C3=A8s) wrote: > Ricardo Wurmus 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=E2=80=99t 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 =E2=80=99packages->manifest=E2=80=99 could be= deleted. I mean in guix/scripts/packages.scm:process-action tweak the =E2=80=99concatenate-manifests=E2=80=99 --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: .