From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27271: [PATCH 0/4] Catch collisions at profile creation time Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Jun 2017 09:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27271@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14968273919581 (code B ref -1); Wed, 07 Jun 2017 09:24:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jun 2017 09:23:11 +0000 Received: from localhost ([127.0.0.1]:60313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXBH-0002UT-Bk for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:23:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXBG-0002UA-4M for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:23:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIXB9-0000Z8-Li for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:23:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42338) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIXB9-0000Z2-Ii for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:23:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIXB8-0007kl-7w for guix-patches@gnu.org; Wed, 07 Jun 2017 05:23:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIXB6-0000Wf-SJ for guix-patches@gnu.org; Wed, 07 Jun 2017 05:23:02 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIXAz-0000P5-V5; Wed, 07 Jun 2017 05:22:53 -0400 Received: from wifi-eduroam-161098.inria.fr ([128.93.161.98]:56826 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dIXAy-0001WS-Qz; Wed, 07 Jun 2017 05:22:53 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 7 Jun 2017 11:22:42 +0200 Message-Id: <20170607092242.20565-1-ludo@gnu.org> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello Guix! These patches allow us to catch problematic collisions when computing a profile derivation. As we know, the profile builder often spits out a number of warnings about collisions but that is not very useful because users cannot distinguish the problematic cases from the harmless cases (an example of a harmless case is when GDB and Binutils provide an almost-identical .info file twice). Concretely, what happens is something like this: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix package -i guile-cairo -n The following package would be upgraded: guile-cairo 1.4.1 → 1.4.1 /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guix package: error: profile contains conflicting entries for guile-cairo:out guix package: error: first entry: guile-cairo@1.4.1:out /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guix package: error: second entry: guile-cairo@1.4.1:out /gnu/store/x0jp2q06snx7skrqdmlkn0r5fhyvvn00-guile-cairo-1.4.1 guix package: error: ... propagated from guile-rsvg@2.18.1 $ ./pre-inst-env guix package -i guile-cairo guile-rsvg guile-present -n The following packages would be upgraded: guile-cairo 1.4.1 → 1.4.1 /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guile-rsvg 2.18.1 → 2.18.1 /gnu/store/xp8wcyvhplsv45gkj9r4n6zmcdancfkn-guile-rsvg-2.18.1 guile-present 0.3.0 → 0.3.0 /gnu/store/qwk8fzijyllaxv4vw114gqzix1qvfmp2-guile-present-0.3.0 guix package: error: profile contains conflicting entries for guile-cairo:out guix package: error: first entry: guile-cairo@1.4.1:out /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guix package: error: second entry: guile-cairo@1.4.1:out /gnu/store/x0jp2q06snx7skrqdmlkn0r5fhyvvn00-guile-cairo-1.4.1 guix package: error: ... propagated from guile-charting@0.2.0 $ ./pre-inst-env guix package -i guile-cairo guile-rsvg guile-charting guile-present -n The following packages would be upgraded: guile-cairo 1.4.1 → 1.4.1 /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guile-rsvg 2.18.1 → 2.18.1 /gnu/store/xp8wcyvhplsv45gkj9r4n6zmcdancfkn-guile-rsvg-2.18.1 guile-charting 0.2.0 → 0.2.0 /gnu/store/11368xymyhk4zz8zwvbdmp5dzcl0vxvc-guile-charting-0.2.0 guile-present 0.3.0 → 0.3.0 /gnu/store/qwk8fzijyllaxv4vw114gqzix1qvfmp2-guile-present-0.3.0 substitute: updating list of substitutes from 'https://bayfront.guixsd.org'... 100.0% substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0% The following derivations would be built: /gnu/store/r361w7fa57vm7js8lk4bnsc7lwv2avby-profile.drv /gnu/store/l5hf8cg5fx6par39659ihkhdgp3kls1n-xdg-mime-database.drv /gnu/store/k8jmvc8yjk3qg8xbgcfgpgngq7vkygld-info-dir.drv /gnu/store/ivnqmwwxwric5lhw5gqnpkxq6gbzj23i-fonts-dir.drv /gnu/store/hdaasxvm64h06xxzwrnx2gch981h88wf-ca-certificate-bundle.drv /gnu/store/axzp9vj4h59nnbmf6ccaajb9qq97xwb8-gtk-icon-themes.drv /gnu/store/8dkb7k53x1c0zhb9qdgrgr53j5j3biwf-gtk-im-modules.drv /gnu/store/v2w6qpf0kk2d70wv01f3ln1v758sgzqm-manual-database.drv --8<---------------cut here---------------end--------------->8--- As in the example above, conflicts may arise when doing a partial upgrade of a profile, because this is a situation where you can easily end up with conflicting versions of a given package. It’s much less likely when using ‘guix package -m’ or similar. An open question is whether there are commonly used combinations of packages that trigger conflicts. I haven’t had any problems with my profile (with 234 packages) nor with my GuixSD config, but I encourage you to test it on your profile! Thoughts? Ludo’. Ludovic Courtès (3): profiles: Represent propagated inputs as manifest entries. profiles: Manifest entries keep a reference to their parent entry. profiles: Catch and report collisions in the profile. guix/profiles.scm | 241 +++++++++++++++++++++++++++++++++++++++++------------ guix/ui.scm | 27 ++++++ tests/profiles.scm | 87 +++++++++++++++++++ 3 files changed, 301 insertions(+), 54 deletions(-) -- 2.13.0 From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27271: [PATCH 1/4] profiles: Represent propagated inputs as manifest entries. References: <20170607092242.20565-1-ludo@gnu.org> In-Reply-To: <20170607092242.20565-1-ludo@gnu.org> Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Jun 2017 09:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27271@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.14968275369836 (code B ref 27271); Wed, 07 Jun 2017 09:26:01 +0000 Received: (at 27271) by debbugs.gnu.org; 7 Jun 2017 09:25:36 +0000 Received: from localhost ([127.0.0.1]:60318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXDa-0002YO-S4 for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXDY-0002Y8-T1 for 27271@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIXDS-0001cR-EV for 27271@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIXDM-0001Zw-15; Wed, 07 Jun 2017 05:25:20 -0400 Received: from wifi-eduroam-161098.inria.fr ([128.93.161.98]:56836 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dIXDL-0001f6-By; Wed, 07 Jun 2017 05:25:19 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 7 Jun 2017 11:25:03 +0200 Message-Id: <20170607092506.20844-1-ludo@gnu.org> X-Mailer: git-send-email 2.13.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * guix/profiles.scm (package->manifest-entry): Turn DEPS into a list of manifest entries. (manifest->gexp)[entry->gexp]: Call 'entry->gexp' on DEPS. Bump version to 3. (sexp->manifest)[infer-dependency]: New procedure. Use it for versions 1 and 2. Parse version 3. (manifest-inputs)[entry->gexp]: New procedure. Adjust to 'dependencies' being a list of . * tests/profiles.scm ("packages->manifest, propagated inputs") ("read-manifest"): New fields. --- guix/profiles.scm | 73 +++++++++++++++++++++++++++++++++++++++--------------- tests/profiles.scm | 36 +++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 20 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index 6733f105e..a66add3e0 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -154,7 +154,7 @@ (output manifest-entry-output ; string (default "out")) (item manifest-entry-item) ; package | store path - (dependencies manifest-entry-dependencies ; (store path | package)* + (dependencies manifest-entry-dependencies ; * (default '())) (search-paths manifest-entry-search-paths ; search-path-specification* (default '()))) @@ -179,10 +179,10 @@ "Return a manifest entry for the OUTPUT of package PACKAGE." (let ((deps (map (match-lambda ((label package) - (gexp-input package)) + (package->manifest-entry package)) ((label package output) - (gexp-input package output))) - (package-transitive-propagated-inputs package)))) + (package->manifest-entry package output))) + (package-propagated-inputs package)))) (manifest-entry (name (package-name package)) (version (package-version package)) @@ -210,20 +210,20 @@ denoting a specific output of a package." (($ name version output (? string? path) (deps ...) (search-paths ...)) #~(#$name #$version #$output #$path - (propagated-inputs #$deps) + (propagated-inputs #$(map entry->gexp deps)) (search-paths #$(map search-path-specification->sexp search-paths)))) (($ name version output (? package? package) (deps ...) (search-paths ...)) #~(#$name #$version #$output (ungexp package (or output "out")) - (propagated-inputs #$deps) + (propagated-inputs #$(map entry->gexp deps)) (search-paths #$(map search-path-specification->sexp search-paths)))))) (match manifest (($ (entries ...)) - #~(manifest (version 2) + #~(manifest (version 3) (packages #$(map entry->gexp entries)))))) (define (find-package name version) @@ -254,17 +254,27 @@ procedure is here for backward-compatibility and will eventually vanish." (package-native-search-paths package) '()))) + (define (infer-dependency item) + ;; Return a for ITEM. + (let-values (((name version) + (package-name->name+version + (store-path-package-name item)))) + (manifest-entry + (name name) + (version version) + (item item)))) + (match sexp (('manifest ('version 0) ('packages ((name version output path) ...))) (manifest (map (lambda (name version output path) (manifest-entry - (name name) - (version version) - (output output) - (item path) - (search-paths (infer-search-paths name version)))) + (name name) + (version version) + (output output) + (item path) + (search-paths (infer-search-paths name version)))) name version output path))) ;; Version 1 adds a list of propagated inputs to the @@ -286,7 +296,7 @@ procedure is here for backward-compatibility and will eventually vanish." (version version) (output output) (item path) - (dependencies deps) + (dependencies (map infer-dependency deps)) (search-paths (infer-search-paths name version))))) name version output path deps))) @@ -304,10 +314,30 @@ procedure is here for backward-compatibility and will eventually vanish." (version version) (output output) (item path) - (dependencies deps) + (dependencies (map infer-dependency deps)) (search-paths (map sexp->search-path-specification search-paths)))) name version output path deps search-paths))) + + ;; Version 3 represents DEPS as full-blown manifest entries. + (('manifest ('version 3 minor-version ...) + ('packages (entries ...))) + (letrec ((sexp->manifest-entry + (match-lambda + ((name version output path + ('propagated-inputs deps) + ('search-paths search-paths) + extra-stuff ...) + (manifest-entry + (name name) + (version version) + (output output) + (item path) + (dependencies (map sexp->manifest-entry deps)) + (search-paths (map sexp->search-path-specification + search-paths))))))) + + (manifest (map sexp->manifest-entry entries)))) (_ (raise (condition (&message (message "unsupported manifest format"))))))) @@ -471,12 +501,15 @@ replace it." (define (manifest-inputs manifest) "Return a list of objects for MANIFEST." - (append-map (match-lambda - (($ name version output thing deps) - ;; THING may be a package or a file name. In the latter case, - ;; assume it's already valid. Ditto for DEPS. - (cons (gexp-input thing output) deps))) - (manifest-entries manifest))) + (define entry->input + (match-lambda + (($ name version output thing deps) + ;; THING may be a package or a file name. In the latter case, assume + ;; it's already valid. + (cons (gexp-input thing output) + (append-map entry->input deps))))) + + (append-map entry->input (manifest-entries manifest))) (define* (manifest-lookup-package manifest name #:optional version) "Return as a monadic value the first package or store path referenced by diff --git a/tests/profiles.scm b/tests/profiles.scm index 093422792..e8b1bb832 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -288,6 +288,42 @@ (manifest-entry-search-paths (package->manifest-entry mpl))))) +(test-equal "packages->manifest, propagated inputs" + (map (match-lambda + ((label package) + (list (package-name package) (package-version package) + package))) + (package-propagated-inputs packages:guile-2.2)) + (map (lambda (entry) + (list (manifest-entry-name entry) + (manifest-entry-version entry) + (manifest-entry-item entry))) + (manifest-entry-dependencies + (package->manifest-entry packages:guile-2.2)))) + +(test-assertm "read-manifest" + (mlet* %store-monad ((manifest -> (packages->manifest + (list (package + (inherit %bootstrap-guile) + (native-search-paths + (package-native-search-paths + packages:guile-2.0)))))) + (drv (profile-derivation manifest + #:hooks '() + #:locales? #f)) + (out -> (derivation->output-path drv))) + (define (entry->sexp entry) + (list (manifest-entry-name entry) + (manifest-entry-version entry) + (manifest-entry-search-paths entry) + (manifest-entry-dependencies entry))) + + (mbegin %store-monad + (built-derivations (list drv)) + (let ((manifest2 (profile-manifest out))) + (return (equal? (map entry->sexp (manifest-entries manifest)) + (map entry->sexp (manifest-entries manifest2)))))))) + (test-assertm "etc/profile" ;; Make sure we get an 'etc/profile' file that at least defines $PATH. (mlet* %store-monad -- 2.13.0 From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27271: [PATCH 3/4] guix package: Always upgrade packages that have propagated inputs. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Jun 2017 09:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27271@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.14968275379851 (code B ref 27271); Wed, 07 Jun 2017 09:26:02 +0000 Received: (at 27271) by debbugs.gnu.org; 7 Jun 2017 09:25:37 +0000 Received: from localhost ([127.0.0.1]:60323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXDd-0002Yo-Fz for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXDa-0002YB-Fs for 27271@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIXDU-0001df-DU for 27271@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIXDS-0001cH-3k; Wed, 07 Jun 2017 05:25:26 -0400 Received: from wifi-eduroam-161098.inria.fr ([128.93.161.98]:56836 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dIXDR-0001f6-HY; Wed, 07 Jun 2017 05:25:25 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 7 Jun 2017 11:25:05 +0200 Message-Id: <20170607092506.20844-3-ludo@gnu.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170607092506.20844-1-ludo@gnu.org> References: <20170607092506.20844-1-ludo@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * guix/scripts/package.scm (transaction-upgrade-entry): Always upgrade packages that have propagated inputs. --- guix/scripts/package.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index f050fad97..4de95869f 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -298,7 +298,10 @@ synopsis or description matches all of REGEXPS." ((=) (let ((candidate-path (derivation->output-path (package-derivation (%store) pkg)))) - (if (string=? path candidate-path) + ;; XXX: When there are propagated inputs, assume we need to + ;; upgrade the whole entry. + (if (and (string=? path candidate-path) + (null? (package-propagated-inputs pkg))) transaction (manifest-transaction-install-entry (package->manifest-entry pkg output) -- 2.13.0 From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27271: [PATCH 2/4] profiles: Manifest entries keep a reference to their parent entry. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Jun 2017 09:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27271@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.14968275389858 (code B ref 27271); Wed, 07 Jun 2017 09:26:02 +0000 Received: (at 27271) by debbugs.gnu.org; 7 Jun 2017 09:25:38 +0000 Received: from localhost ([127.0.0.1]:60325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXDd-0002Yq-Nb for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXDa-0002YD-VQ for 27271@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIXDU-0001dZ-7Q for 27271@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIXDR-0001bp-5O; Wed, 07 Jun 2017 05:25:25 -0400 Received: from wifi-eduroam-161098.inria.fr ([128.93.161.98]:56836 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dIXDQ-0001f6-GZ; Wed, 07 Jun 2017 05:25:24 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 7 Jun 2017 11:25:04 +0200 Message-Id: <20170607092506.20844-2-ludo@gnu.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170607092506.20844-1-ludo@gnu.org> References: <20170607092506.20844-1-ludo@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * guix/profiles.scm ()[parent]: New field. (package->manifest-entry): Add #:parent parameter. Fill out the 'parent' field of ; pass #:parent in recursive calls. * guix/profiles.scm (sexp->manifest)[sexp->manifest-entry]: New procedure. Use it for version 3. * tests/profiles.scm ("manifest-entry-parent"): New procedure. ("read-manifest")[entry->sexp]: Add 'manifest-entry-parent' to the result. --- guix/profiles.scm | 120 ++++++++++++++++++++++++++++++++--------------------- tests/profiles.scm | 12 +++++- 2 files changed, 83 insertions(+), 49 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index a66add3e0..c85d7ef5c 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -68,6 +68,7 @@ manifest-entry-item manifest-entry-dependencies manifest-entry-search-paths + manifest-entry-parent manifest-pattern manifest-pattern? @@ -157,7 +158,9 @@ (dependencies manifest-entry-dependencies ; * (default '())) (search-paths manifest-entry-search-paths ; search-path-specification* - (default '()))) + (default '())) + (parent manifest-entry-parent ; promise (#f | ) + (default (delay #f)))) (define-record-type* manifest-pattern make-manifest-pattern @@ -175,21 +178,28 @@ (call-with-input-file file read-manifest) (manifest '())))) -(define* (package->manifest-entry package #:optional (output "out")) +(define* (package->manifest-entry package #:optional (output "out") + #:key (parent (delay #f))) "Return a manifest entry for the OUTPUT of package PACKAGE." - (let ((deps (map (match-lambda - ((label package) - (package->manifest-entry package)) - ((label package output) - (package->manifest-entry package output))) - (package-propagated-inputs package)))) - (manifest-entry - (name (package-name package)) - (version (package-version package)) - (output output) - (item package) - (dependencies (delete-duplicates deps)) - (search-paths (package-transitive-native-search-paths package))))) + ;; For each dependency, keep a promise pointing to its "parent" entry. + (letrec* ((deps (map (match-lambda + ((label package) + (package->manifest-entry package + #:parent (delay entry))) + ((label package output) + (package->manifest-entry package output + #:parent (delay entry)))) + (package-propagated-inputs package))) + (entry (manifest-entry + (name (package-name package)) + (version (package-version package)) + (output output) + (item package) + (dependencies (delete-duplicates deps)) + (search-paths + (package-transitive-native-search-paths package)) + (parent parent)))) + entry)) (define (packages->manifest packages) "Return a list of manifest entries, one for each item listed in PACKAGES. @@ -254,7 +264,7 @@ procedure is here for backward-compatibility and will eventually vanish." (package-native-search-paths package) '()))) - (define (infer-dependency item) + (define (infer-dependency item parent) ;; Return a for ITEM. (let-values (((name version) (package-name->name+version @@ -262,7 +272,28 @@ procedure is here for backward-compatibility and will eventually vanish." (manifest-entry (name name) (version version) - (item item)))) + (item item) + (parent parent)))) + + (define* (sexp->manifest-entry sexp #:optional (parent (delay #f))) + (match sexp + ((name version output path + ('propagated-inputs deps) + ('search-paths search-paths) + extra-stuff ...) + ;; For each of DEPS, keep a promise pointing to ENTRY. + (letrec* ((deps* (map (cut sexp->manifest-entry <> (delay entry)) + deps)) + (entry (manifest-entry + (name name) + (version version) + (output output) + (item path) + (dependencies deps*) + (search-paths (map sexp->search-path-specification + search-paths)) + (parent parent)))) + entry)))) (match sexp (('manifest ('version 0) @@ -291,13 +322,17 @@ procedure is here for backward-compatibility and will eventually vanish." directories) ((directories ...) directories)))) - (manifest-entry - (name name) - (version version) - (output output) - (item path) - (dependencies (map infer-dependency deps)) - (search-paths (infer-search-paths name version))))) + (letrec* ((deps* (map (cute infer-dependency <> (delay entry)) + deps)) + (entry (manifest-entry + (name name) + (version version) + (output output) + (item path) + (dependencies deps*) + (search-paths + (infer-search-paths name version))))) + entry))) name version output path deps))) ;; Version 2 adds search paths and is slightly more verbose. @@ -309,35 +344,24 @@ procedure is here for backward-compatibility and will eventually vanish." ...))) (manifest (map (lambda (name version output path deps search-paths) - (manifest-entry - (name name) - (version version) - (output output) - (item path) - (dependencies (map infer-dependency deps)) - (search-paths (map sexp->search-path-specification - search-paths)))) + (letrec* ((deps* (map (cute infer-dependency <> (delay entry)) + deps)) + (entry (manifest-entry + (name name) + (version version) + (output output) + (item path) + (dependencies deps*) + (search-paths + (map sexp->search-path-specification + search-paths))))) + entry)) name version output path deps search-paths))) ;; Version 3 represents DEPS as full-blown manifest entries. (('manifest ('version 3 minor-version ...) ('packages (entries ...))) - (letrec ((sexp->manifest-entry - (match-lambda - ((name version output path - ('propagated-inputs deps) - ('search-paths search-paths) - extra-stuff ...) - (manifest-entry - (name name) - (version version) - (output output) - (item path) - (dependencies (map sexp->manifest-entry deps)) - (search-paths (map sexp->search-path-specification - search-paths))))))) - - (manifest (map sexp->manifest-entry entries)))) + (manifest (map sexp->manifest-entry entries))) (_ (raise (condition (&message (message "unsupported manifest format"))))))) diff --git a/tests/profiles.scm b/tests/profiles.scm index e8b1bb832..94759c05e 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -301,6 +301,15 @@ (manifest-entry-dependencies (package->manifest-entry packages:guile-2.2)))) +(test-assert "manifest-entry-parent" + (let ((entry (package->manifest-entry packages:guile-2.2))) + (match (manifest-entry-dependencies entry) + ((dependencies ..1) + (and (every (lambda (parent) + (eq? entry (force parent))) + (map manifest-entry-parent dependencies)) + (not (force (manifest-entry-parent entry)))))))) + (test-assertm "read-manifest" (mlet* %store-monad ((manifest -> (packages->manifest (list (package @@ -316,7 +325,8 @@ (list (manifest-entry-name entry) (manifest-entry-version entry) (manifest-entry-search-paths entry) - (manifest-entry-dependencies entry))) + (manifest-entry-dependencies entry) + (force (manifest-entry-parent entry)))) (mbegin %store-monad (built-derivations (list drv)) -- 2.13.0 From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27271: [PATCH 4/4] profiles: Catch and report collisions in the profile. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Jun 2017 09:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27271@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.14968275409867 (code B ref 27271); Wed, 07 Jun 2017 09:26:03 +0000 Received: (at 27271) by debbugs.gnu.org; 7 Jun 2017 09:25:40 +0000 Received: from localhost ([127.0.0.1]:60327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXDg-0002Z5-4u for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXDc-0002YF-ON for 27271@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIXDW-0001eE-8t for 27271@debbugs.gnu.org; Wed, 07 Jun 2017 05:25:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIXDT-0001cr-91; Wed, 07 Jun 2017 05:25:27 -0400 Received: from wifi-eduroam-161098.inria.fr ([128.93.161.98]:56836 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dIXDS-0001f6-Hm; Wed, 07 Jun 2017 05:25:27 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 7 Jun 2017 11:25:06 +0200 Message-Id: <20170607092506.20844-4-ludo@gnu.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170607092506.20844-1-ludo@gnu.org> References: <20170607092506.20844-1-ludo@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * guix/profiles.scm (&profile-collision-error): New error condition. (manifest-entry-lookup, lower-manifest-entry, check-for-collisions): New procedures. (profile-derivation): Add call to 'check-for-collisions'. * guix/ui.scm (call-with-error-handling): Handle '&profile-collision-error'. * tests/profiles.scm ("collision", "no collision"): New tests. --- guix/profiles.scm | 94 ++++++++++++++++++++++++++++++++++++++++++++++++------ guix/ui.scm | 27 ++++++++++++++++ tests/profiles.scm | 41 ++++++++++++++++++++++++ 3 files changed, 153 insertions(+), 9 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index c85d7ef5c..980229ca7 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -35,6 +35,7 @@ #:use-module (guix gexp) #:use-module (guix monads) #:use-module (guix store) + #:use-module (ice-9 vlist) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 ftw) @@ -51,6 +52,10 @@ profile-error-profile &profile-not-found-error profile-not-found-error? + &profile-collistion-error + profile-collision-error? + profile-collision-error-entry + profile-collision-error-conflict &missing-generation-error missing-generation-error? missing-generation-error-generation @@ -130,6 +135,11 @@ (define-condition-type &profile-not-found-error &profile-error profile-not-found-error?) +(define-condition-type &profile-collision-error &error + profile-collision-error? + (entry profile-collision-error-entry) ; + (conflict profile-collision-error-conflict)) ; + (define-condition-type &missing-generation-error &profile-error missing-generation-error? (generation missing-generation-error-generation)) @@ -178,6 +188,70 @@ (call-with-input-file file read-manifest) (manifest '())))) +(define (manifest-entry-lookup manifest) + "Return a lookup procedure for the entries of MANIFEST. The lookup +procedure takes two arguments: the entry name and output." + (define mapping + (let loop ((entries (manifest-entries manifest)) + (mapping vlist-null)) + (fold (lambda (entry result) + (vhash-cons (cons (manifest-entry-name entry) + (manifest-entry-output entry)) + entry + (loop (manifest-entry-dependencies entry) + result))) + mapping + entries))) + + (lambda (name output) + (match (vhash-assoc (cons name output) mapping) + ((_ . entry) entry) + (#f #f)))) + +(define* (lower-manifest-entry entry system #:key target) + "Lower ENTRY for SYSTEM and TARGET such that its 'item' field is a store +file name." + (let ((item (manifest-entry-item entry))) + (if (string? item) + (with-monad %store-monad + (return entry)) + (mlet %store-monad ((drv (lower-object item system + #:target target)) + (output -> (manifest-entry-output entry))) + (return (manifest-entry + (inherit entry) + (item (derivation->output-path drv output)))))))) + +(define* (check-for-collisions manifest system #:key target) + "Check whether the entries of MANIFEST conflict with one another; raise a +'&profile-collision-error' when a conflict is encountered." + (define lookup + (manifest-entry-lookup manifest)) + + (with-monad %store-monad + (foldm %store-monad + (lambda (entry result) + (match (lookup (manifest-entry-name entry) + (manifest-entry-output entry)) + ((? manifest-entry? second) ;potential conflict + (mlet %store-monad ((first (lower-manifest-entry entry system + #:target + target)) + (second (lower-manifest-entry second system + #:target + target))) + (if (string=? (manifest-entry-item first) + (manifest-entry-item second)) + (return result) + (raise (condition + (&profile-collision-error + (entry first) + (conflict second))))))) + (#f ;no conflict + (return result)))) + #t + (manifest-entries manifest)))) + (define* (package->manifest-entry package #:optional (output "out") #:key (parent (delay #f))) "Return a manifest entry for the OUTPUT of package PACKAGE." @@ -1116,15 +1190,17 @@ a dependency on the 'glibc-utf8-locales' package. When TARGET is true, it must be a GNU triplet, and the packages in MANIFEST are cross-built for TARGET." - (mlet %store-monad ((system (if system - (return system) - (current-system))) - (extras (if (null? (manifest-entries manifest)) - (return '()) - (sequence %store-monad - (map (lambda (hook) - (hook manifest)) - hooks))))) + (mlet* %store-monad ((system (if system + (return system) + (current-system))) + (ok? (check-for-collisions manifest system + #:target target)) + (extras (if (null? (manifest-entries manifest)) + (return '()) + (sequence %store-monad + (map (lambda (hook) + (hook manifest)) + hooks))))) (define inputs (append (filter-map (lambda (drv) (and (derivation? drv) diff --git a/guix/ui.scm b/guix/ui.scm index 5060fd6dc..82be0311d 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -476,6 +476,33 @@ interpreted." (leave (G_ "generation ~a of profile '~a' does not exist~%") (missing-generation-error-generation c) (profile-error-profile c))) + ((profile-collision-error? c) + (let ((entry (profile-collision-error-entry c)) + (conflict (profile-collision-error-conflict c))) + (define (report-parent-entries entry) + (let ((parent (force (manifest-entry-parent entry)))) + (when (manifest-entry? parent) + (report-error (G_ " ... propagated from ~a@~a~%") + (manifest-entry-name parent) + (manifest-entry-version parent)) + (report-parent-entries parent)))) + + (report-error (G_ "profile contains conflicting entries for ~a:~a~%") + (manifest-entry-name entry) + (manifest-entry-output entry)) + (report-error (G_ " first entry: ~a@~a:~a ~a~%") + (manifest-entry-name entry) + (manifest-entry-version entry) + (manifest-entry-output entry) + (manifest-entry-item entry)) + (report-parent-entries entry) + (report-error (G_ " second entry: ~a@~a:~a ~a~%") + (manifest-entry-name conflict) + (manifest-entry-version conflict) + (manifest-entry-output conflict) + (manifest-entry-item conflict)) + (report-parent-entries conflict) + (exit 1))) ((nar-error? c) (let ((file (nar-error-file c)) (port (nar-error-port c))) diff --git a/tests/profiles.scm b/tests/profiles.scm index 94759c05e..ac9e2181d 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -35,6 +35,7 @@ #:use-module (rnrs io ports) #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) + #:use-module (srfi srfi-34) #:use-module (srfi srfi-64)) ;; Test the (guix profiles) module. @@ -334,6 +335,46 @@ (return (equal? (map entry->sexp (manifest-entries manifest)) (map entry->sexp (manifest-entries manifest2)))))))) +(test-equal "collision" + '(("guile-bootstrap" "2.0") ("guile-bootstrap" "42")) + (guard (c ((profile-collision-error? c) + (let ((entry1 (profile-collision-error-entry c)) + (entry2 (profile-collision-error-conflict c))) + (list (list (manifest-entry-name entry1) + (manifest-entry-version entry1)) + (list (manifest-entry-name entry2) + (manifest-entry-version entry2)))))) + (run-with-store %store + (mlet* %store-monad ((p0 -> (package + (inherit %bootstrap-guile) + (version "42"))) + (p1 -> (dummy-package "p1" + (propagated-inputs `(("p0" ,p0))))) + (manifest -> (packages->manifest + (list %bootstrap-guile p1))) + (drv (profile-derivation manifest + #:hooks '() + #:locales? #f))) + (return #f))))) + +(test-assertm "no collision" + ;; Here we have an entry that is "lowered" (its 'item' field is a store file + ;; name) and another entry (its 'item' field is a package) that is + ;; equivalent. + (mlet* %store-monad ((p -> (dummy-package "p" + (propagated-inputs + `(("guile" ,%bootstrap-guile))))) + (guile (package->derivation %bootstrap-guile)) + (entry -> (manifest-entry + (inherit (package->manifest-entry + %bootstrap-guile)) + (item (derivation->output-path guile)))) + (manifest -> (manifest + (list entry + (package->manifest-entry p)))) + (drv (profile-derivation manifest))) + (return (->bool drv)))) + (test-assertm "etc/profile" ;; Make sure we get an 'etc/profile' file that at least defines $PATH. (mlet* %store-monad -- 2.13.0 From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27271: [PATCH 0/4] Catch collisions at profile creation time Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jun 2017 01:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 27271@debbugs.gnu.org Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.14969725887844 (code B ref 27271); Fri, 09 Jun 2017 01:44:01 +0000 Received: (at 27271) by debbugs.gnu.org; 9 Jun 2017 01:43:08 +0000 Received: from localhost ([127.0.0.1]:35681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJ8xA-00022S-Gf for submit@debbugs.gnu.org; Thu, 08 Jun 2017 21:43:08 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJ8x9-00022K-3L for 27271@debbugs.gnu.org; Thu, 08 Jun 2017 21:43:07 -0400 Received: from localhost (x59cc8b7e.dyn.telefonica.de [89.204.139.126]) by mx.zohomail.com with SMTPS id 14969725830561007.9891111578012; Thu, 8 Jun 2017 18:43:03 -0700 (PDT) References: <20170607092242.20565-1-ludo@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Ricardo Wurmus In-reply-to: <20170607092242.20565-1-ludo@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Fri, 09 Jun 2017 03:42:59 +0200 Message-ID: <878tl2djh8.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi Ludo, > These patches allow us to catch problematic collisions when computing > a profile derivation. As we know, the profile builder often spits out > a number of warnings about collisions but that is not very useful because > users cannot distinguish the problematic cases from the harmless cases > (an example of a harmless case is when GDB and Binutils provide an > almost-identical .info file twice). This is very good! Thanks for implementing it! > An open question is whether there are commonly used combinations of > packages that trigger conflicts. I haven’t had any problems with my > profile (with 234 packages) nor with my GuixSD config, but I encourage > you to test it on your profile! We often see this at the MDC because some people don’t use manifests and I may have upgraded the shared Guix instance between invocations of “guix package”. This happens particularly often with numpy because that’s propagated quite often. (I’d *love* to get rid of propagated inputs in Python! They are so annoying!) > Thoughts? I’ll give this a try soon and report my experience with it. Thanks again! -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27271: [PATCH 0/4] Catch collisions at profile creation time Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jun 2017 09:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ricardo Wurmus Cc: 27271@debbugs.gnu.org Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.149700130617678 (code B ref 27271); Fri, 09 Jun 2017 09:42:02 +0000 Received: (at 27271) by debbugs.gnu.org; 9 Jun 2017 09:41:46 +0000 Received: from localhost ([127.0.0.1]:35852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJGQM-0004b4-F0 for submit@debbugs.gnu.org; Fri, 09 Jun 2017 05:41:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJGQK-0004ar-W0 for 27271@debbugs.gnu.org; Fri, 09 Jun 2017 05:41:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJGQA-0003sa-Oy for 27271@debbugs.gnu.org; Fri, 09 Jun 2017 05:41:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJGQA-0003sW-Lf; Fri, 09 Jun 2017 05:41:34 -0400 Received: from [193.50.110.119] (port=54182 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dJGQ9-0007d4-RX; Fri, 09 Jun 2017 05:41:34 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170607092242.20565-1-ludo@gnu.org> <878tl2djh8.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 Prairial an 225 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Fri, 09 Jun 2017 11:41:31 +0200 In-Reply-To: <878tl2djh8.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 09 Jun 2017 03:42:59 +0200") Message-ID: <871sqtpkfo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Heya, Ricardo Wurmus skribis: >> These patches allow us to catch problematic collisions when computing >> a profile derivation. As we know, the profile builder often spits out >> a number of warnings about collisions but that is not very useful because >> users cannot distinguish the problematic cases from the harmless cases >> (an example of a harmless case is when GDB and Binutils provide an >> almost-identical .info file twice). > > This is very good! Thanks for implementing it! > >> An open question is whether there are commonly used combinations of >> packages that trigger conflicts. I haven=E2=80=99t had any problems wit= h my >> profile (with 234 packages) nor with my GuixSD config, but I encourage >> you to test it on your profile! > > We often see this at the MDC because some people don=E2=80=99t use manife= sts and > I may have upgraded the shared Guix instance between invocations of > =E2=80=9Cguix package=E2=80=9D. This happens particularly often with num= py because > that=E2=80=99s propagated quite often. (I=E2=80=99d *love* to get rid of= propagated > inputs in Python! They are so annoying!) Perhaps we could modify =E2=80=98sys.path=E2=80=99 from the top of =E2=80= =98__init__.py=E2=80=99 file to get something similar to RUNPATH. I=E2=80=99m not sure if there are any downsides or gotchas. Thoughts? > I=E2=80=99ll give this a try soon and report my experience with it. Great, thanks for your feedback! Ludo=E2=80=99. From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27271: [PATCH 0/4] Catch collisions at profile creation time Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jun 2017 20:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Ricardo Wurmus Cc: 27271@debbugs.gnu.org Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.14970403701652 (code B ref 27271); Fri, 09 Jun 2017 20:33:01 +0000 Received: (at 27271) by debbugs.gnu.org; 9 Jun 2017 20:32:50 +0000 Received: from localhost ([127.0.0.1]:37462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJQaP-0000Qa-M0 for submit@debbugs.gnu.org; Fri, 09 Jun 2017 16:32:49 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJQaN-0000QR-4q for 27271@debbugs.gnu.org; Fri, 09 Jun 2017 16:32:48 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 779262082B; Fri, 9 Jun 2017 16:32:46 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Fri, 09 Jun 2017 16:32:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=VbISfWeD14/waiy/TeIUmUodNpjSAYeQ5zNwWZwUG yo=; b=FyD23VmlTixly+0Ap/3Ez1Us41CsFVsgNNlL361cuobuaIm56thXaxgKl TIKqb6zKSmu5CKBiSquGnb4wqKbxBJ4cipyqnGX1bxpQzeVtkGrb/ABEbEMOyvyF 8AbZNnCk2EAESeuchr/Cst8ojEVR8etBGfymFneWUK00oFaG9WHSB3vAhTkeUQqR gvcKx8hCqkhANxvnIjxKE5GEJRLM+dLi6tg+1SH2D5ZF8mstzNpR1fATgstybrGX 6szNVg+/ySs0EWrGIunGma4STC798VZlcS4DJDOSSVoBlNTwPdxaZa2y0U6UGkZp 7SumTNpQbTZft3nJ3Y0TBOH/qpBiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=VbISfWeD14/waiy/Te IUmUodNpjSAYeQ5zNwWZwUGyo=; b=sfEvGL89xFGnMmVBy/f9NIPmN9i5QR5vGQ HMNrF/zmdwf6RjQOOV7355dXx0dKgrVxkSEyAShJ8Zr87uy9jpPm5QNCToBoTC+y RkgVhYEM0Blcrvoztg26q8KsbXeOeYRDlG/VythWGtVfNTK4c8WPHuIexXIVEOtC t3ZmK2eYFr7XIr/y0IvTLWoTooMQyOlc4H5Tg2eUA/gpZg/yz1Qnieldh72zcza3 /5OEM5FczeCh1CyZvo2u3CF3fz9mEiokg435JB8DUSHKaeVHd5Xomu92ouuAU+zY Lnc/6hDWaErwiYrb6Hs6vBaC5flk0wErR1i6VPTCn4+lzNJNgnQA== X-ME-Sender: X-Sasl-enc: 86l0Cs7mvT6sEdPzhQzCuOb7nvdloHZETZS3r2s3vToO 1497040366 Received: from localhost (unknown [188.113.81.93]) by mail.messagingengine.com (Postfix) with ESMTPA id 073A124407; Fri, 9 Jun 2017 16:32:45 -0400 (EDT) From: Marius Bakke In-Reply-To: <871sqtpkfo.fsf@gnu.org> References: <20170607092242.20565-1-ludo@gnu.org> <878tl2djh8.fsf@elephly.net> <871sqtpkfo.fsf@gnu.org> User-Agent: Notmuch/0.24.2 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) Date: Fri, 09 Jun 2017 22:32:44 +0200 Message-ID: <87fuf8nbpv.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Heya, > > Ricardo Wurmus skribis: > >>> These patches allow us to catch problematic collisions when computing >>> a profile derivation. As we know, the profile builder often spits out >>> a number of warnings about collisions but that is not very useful becau= se >>> users cannot distinguish the problematic cases from the harmless cases >>> (an example of a harmless case is when GDB and Binutils provide an >>> almost-identical .info file twice). >> >> This is very good! Thanks for implementing it! >> >>> An open question is whether there are commonly used combinations of >>> packages that trigger conflicts. I haven=E2=80=99t had any problems wi= th my >>> profile (with 234 packages) nor with my GuixSD config, but I encourage >>> you to test it on your profile! >> >> We often see this at the MDC because some people don=E2=80=99t use manif= ests and >> I may have upgraded the shared Guix instance between invocations of >> =E2=80=9Cguix package=E2=80=9D. This happens particularly often with nu= mpy because >> that=E2=80=99s propagated quite often. (I=E2=80=99d *love* to get rid o= f propagated >> inputs in Python! They are so annoying!) > > Perhaps we could modify =E2=80=98sys.path=E2=80=99 from the top of =E2=80= =98__init__.py=E2=80=99 file to > get something similar to RUNPATH. I=E2=80=99m not sure if there are any > downsides or gotchas. Thoughts? Python actually has a native mechanism for setting up package-specific search paths: https://docs.python.org/3/library/site.html In short, it looks for a file "package.pth" where additional search paths can be specified (other sys.path manipulations are allowed too). I asked Hartmut about this during the python-build-system refactoring, and the counter-argument was that if package A and B depends on different versions of package C, odd failures could occur. I'm not convinced propagation sidesteps this problem, however: https://lists.gnu.org/archive/html/guix-devel/2016-10/msg00856.html It would be good to try it out. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlk7BewACgkQoqBt8qM6 VPr7Tgf/WgGFF/0mhYBQ+dxF6QUaee7xcBqN0VncacdcI3cuDU/gsD+zCN2quKf2 MdDoD68RTqWEBRCmncrselHJilfpZGfAjpIU7ZymdwIfOnN9R8CbthRi9bHP1vCC JvBqQC0i1Vx8CZt9m3psoAk2HjQmofet+z979VFdHPUU0EBJuEYrWxEjdO7YsST3 ruf8TCYH3ryrVjzCQvxLfeCgogOm7dJOHz++28B0NIfPg4LVE15PUu6pdGDJyVnC gpQIax5A/ap0j9WDqh7xSEi1iHJke/vAKjQmqp8Xo2Mmb7AueULrohlf/VvmaRzD 7Vx9xTEFqGJiRbqP2KXYKhJBgLofJw== =H5/n -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27271: Avoiding =?UTF-8?Q?=E2=80=98propagated-inputs=E2=80=99?= for Python dependencies Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Jun 2017 13:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Marius Bakke Cc: Ricardo Wurmus , Hartmut Goebel , 27271@debbugs.gnu.org Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.149710201515588 (code B ref 27271); Sat, 10 Jun 2017 13:41:02 +0000 Received: (at 27271) by debbugs.gnu.org; 10 Jun 2017 13:40:15 +0000 Received: from localhost ([127.0.0.1]:37904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJgcg-00043M-PL for submit@debbugs.gnu.org; Sat, 10 Jun 2017 09:40:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJgcf-00043A-Fd for 27271@debbugs.gnu.org; Sat, 10 Jun 2017 09:40:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJgcZ-00061c-GG for 27271@debbugs.gnu.org; Sat, 10 Jun 2017 09:40:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJgcS-0005zO-K2; Sat, 10 Jun 2017 09:40:00 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60286 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dJgcR-0003r4-NX; Sat, 10 Jun 2017 09:40:00 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170607092242.20565-1-ludo@gnu.org> <878tl2djh8.fsf@elephly.net> <871sqtpkfo.fsf@gnu.org> <87fuf8nbpv.fsf@fastmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Prairial an 225 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sat, 10 Jun 2017 15:39:56 +0200 In-Reply-To: <87fuf8nbpv.fsf@fastmail.com> (Marius Bakke's message of "Fri, 09 Jun 2017 22:32:44 +0200") Message-ID: <8737b80xn7.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Heya, (+Cc: Hartmut.) Marius Bakke skribis: > Ludovic Court=C3=A8s writes: [...] >> Perhaps we could modify =E2=80=98sys.path=E2=80=99 from the top of =E2= =80=98__init__.py=E2=80=99 file to >> get something similar to RUNPATH. I=E2=80=99m not sure if there are any >> downsides or gotchas. Thoughts? > > Python actually has a native mechanism for setting up package-specific > search paths: https://docs.python.org/3/library/site.html > > In short, it looks for a file "package.pth" where additional search > paths can be specified (other sys.path manipulations are allowed too). Looks good at first sight. > I asked Hartmut about this during the python-build-system refactoring, > and the counter-argument was that if package A and B depends on > different versions of package C, odd failures could occur. I'm not > convinced propagation sidesteps this problem, however: > > https://lists.gnu.org/archive/html/guix-devel/2016-10/msg00856.html I think we=E2=80=99re in trouble anyway if multiple versions of a package e= nd up in the dependency graph because that=E2=80=99s not something Python supports (the same is probably true for most languages, with the notable exception of Node.) Perhaps it would be worth making a PoC to see what happens with a small set of packages? (I=E2=80=99m not volunteering though, just trying to tweak others into doing it. :-)) Ludo=E2=80=99. From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27271] Avoiding =?UTF-8?Q?=E2=80=98propagated-inputs=E2=80=99?= for Python dependencies Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jun 2017 08:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Marius Bakke Cc: Ricardo Wurmus , 27271@debbugs.gnu.org Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.14976888579768 (code B ref 27271); Sat, 17 Jun 2017 08:41:02 +0000 Received: (at 27271) by debbugs.gnu.org; 17 Jun 2017 08:40:57 +0000 Received: from localhost ([127.0.0.1]:52062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM9Ht-0002XU-5K for submit@debbugs.gnu.org; Sat, 17 Jun 2017 04:40:57 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:58414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM9Hr-0002XM-1u for 27271@debbugs.gnu.org; Sat, 17 Jun 2017 04:40:55 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3wqW0j6wXFz1qrMk; Sat, 17 Jun 2017 10:40:53 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3wqW0j5SXDz3jRBj; Sat, 17 Jun 2017 10:40:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id fKRPAmzgEvzi; Sat, 17 Jun 2017 10:40:52 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-93-104-78-245.dynamic.mnet-online.de [93.104.78.245]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Sat, 17 Jun 2017 10:40:52 +0200 (CEST) Received: from [192.168.110.2] (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 633FF606A4; Sat, 17 Jun 2017 11:00:44 +0200 (CEST) From: Hartmut Goebel References: <20170607092242.20565-1-ludo@gnu.org> <878tl2djh8.fsf@elephly.net> <871sqtpkfo.fsf@gnu.org> <87fuf8nbpv.fsf@fastmail.com> <8737b80xn7.fsf_-_@gnu.org> Organization: crazy-compilers.com Message-ID: <5944EB13.5080100@crazy-compilers.com> Date: Sat, 17 Jun 2017 10:40:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <8737b80xn7.fsf_-_@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am 10.06.2017 um 15:39 schrieb Ludovic Court=C3=A8s: >> > I asked Hartmut about this during the python-build-system refactorin= g, >> > and the counter-argument was that if package A and B depends on >> > different versions of package C, odd failures could occur. I'm not >> > convinced propagation sidesteps this problem, however: >> > >> > https://lists.gnu.org/archive/html/guix-devel/2016-10/msg00856.html > I think we=E2=80=99re in trouble anyway if multiple versions of a packa= ge end up > in the dependency graph because that=E2=80=99s not something Python sup= ports > (the same is probably true for most languages, with the notable > exception of Node.) That's true, you will have trouble anyway. But when adding the paths via .pth file, we will get more problems and =E2= =80=93 even more important =E2=80=93 these problems will not be reported. Obscur= e bugs will the the result. The Zen of Python [1] says: Errors should never pass silently. When using .pth-files, we will get a ot of silent errors. Analysis -------------- 1. Paths searched for .pth files are processed in the order of sys.path (PYTHONPATH) 2. Within each path, .pth files are processed alphabetically (see site.addsitedir()) 3. Within the .pth file, paths are processed in top-down order. Let's assume, we add a file ".package-name.pth" to each package. Now if a user installs packages AAA in his/her profile, AAA's dependencies will be listed in ".AAA.pth". AAA depends on SOME-PACKAGE, which at the time of AAA's installation is @>=3D1.0. Some time later, he user installs package BBB, which requires SOME-PACKAGE @>=3D1.3.(being backward-compatible with 1.0). Since from guix's point of view AAA and BBB are not interfering, both packages are installed fine. No warnings will be reported. But BBB is bound to fail! .AAA.pth is always processed prior to =2EBBB.pth, so SOME-PACKAGE will always be @1.0 - which is to old for BBB= =2E [1] https://www.python.org/dev/peps/pep-0020/ --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible | From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27271] Avoiding =?UTF-8?Q?=E2=80=98propagated-inputs=E2=80=99?= for Python dependencies Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jun 2017 09:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Marius Bakke Cc: Ricardo Wurmus , 27271@debbugs.gnu.org Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.149769003411567 (code B ref 27271); Sat, 17 Jun 2017 09:01:02 +0000 Received: (at 27271) by debbugs.gnu.org; 17 Jun 2017 09:00:34 +0000 Received: from localhost ([127.0.0.1]:52084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM9as-00030V-Jt for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:00:34 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:32789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM9aq-00030N-Hf for 27271@debbugs.gnu.org; Sat, 17 Jun 2017 05:00:33 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3wqWRM0YgGz1rQjL; Sat, 17 Jun 2017 11:00:30 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3wqWRL5gbJz3j36p; Sat, 17 Jun 2017 11:00:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id WeDz3kjF8lky; Sat, 17 Jun 2017 11:00:30 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-93-104-78-245.dynamic.mnet-online.de [93.104.78.245]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Sat, 17 Jun 2017 11:00:30 +0200 (CEST) Received: from [192.168.110.2] (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 2DC67606A4; Sat, 17 Jun 2017 11:20:23 +0200 (CEST) From: Hartmut Goebel References: <20170607092242.20565-1-ludo@gnu.org> <878tl2djh8.fsf@elephly.net> <871sqtpkfo.fsf@gnu.org> <87fuf8nbpv.fsf@fastmail.com> <8737b80xn7.fsf_-_@gnu.org> Organization: crazy-compilers.com Message-ID: <5944EFAD.1020309@crazy-compilers.com> Date: Sat, 17 Jun 2017 11:00:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <8737b80xn7.fsf_-_@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi, in addition to what I just wrote, you should be aware of this implementation restriction: =2Epth-files are searched only in directories listed in sys.path (PYTHONPATH), they are not searched recursively. Assuming the dependency-graph AAA -> SOME-PACKAGE -> PPP, guix (after implementing this proposal) will only install AAA into the profile and only .AAA.pth will be processes. This will result into PPP to be not foun= d. This could be worked around by adding a module "sitecustomize.py" to our python setup, which could implement the recursive addition of paths. BTW: The corresponding patch for python-2.7-site-prefixes.patch is missing for Python 3, so for Python 3 no .pth-files are processed at all =E2=80=93 I assume. (I have no time ATM for testing. Sorry.) --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible | From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27271] [PATCH 0/4] Catch collisions at profile creation time Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jun 2017 09:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 27271@debbugs.gnu.org Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.149769171814048 (code B ref 27271); Sat, 17 Jun 2017 09:29:02 +0000 Received: (at 27271) by debbugs.gnu.org; 17 Jun 2017 09:28:38 +0000 Received: from localhost ([127.0.0.1]:52115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMA22-0003eV-85 for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:28:38 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMA20-0003eM-9E for 27271@debbugs.gnu.org; Sat, 17 Jun 2017 05:28:37 -0400 Received: from localhost (port-92-200-26-174.dynamic.qsc.de [92.200.26.174]) by mx.zohomail.com with SMTPS id 1497691711252541.2251490116336; Sat, 17 Jun 2017 02:28:31 -0700 (PDT) References: <20170607092242.20565-1-ludo@gnu.org> <878tl2djh8.fsf@elephly.net> <871sqtpkfo.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Ricardo Wurmus In-reply-to: <871sqtpkfo.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Sat, 17 Jun 2017 11:28:28 +0200 Message-ID: <87shiz6k03.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hi Ludo, L> These patches allow us to catch problematic collisions when computing L> a profile derivation. As we know, the profile builder often spits out L> a number of warnings about collisions but that is not very useful because L> users cannot distinguish the problematic cases from the harmless cases L> (an example of a harmless case is when GDB and Binutils provide an L> almost-identical .info file twice). […] R> I’ll give this a try soon and report my experience with it. I just tried it and I didn’t work the way I thought it would. Here’s what I did: # install old numpy guix package -p /tmp/test -i /gnu/store/s02iw98l234ngkcnxqi7jz54vqqgx6hj-python2-numpy-1.10.4 # install a package depending on a later version of numpy guix package -p /tmp/test -i bamm It built bamm and then proceeded to build a profile, while spitting out hundreds of lines about conflicts between python2-numpy-1.10.4 and python2-numpy-1.12.0. This is the profile’s manifest: --8<---------------cut here---------------start------------->8--- (manifest (version 3) (packages (("bamm" "1.7.3" "out" "/gnu/store/lcb2s2x3s50gmf24asl2mvv34jhx8n1x-bamm-1.7.3" (propagated-inputs (("python2-numpy" "1.12.0" "out" "/gnu/store/pzf5yszv5dlzmk71w7srdi2qdqh2j40a-python2-numpy-1.12.0" (propagated-inputs ()) (search-paths ())))) (search-paths ())) ("python2-numpy" "1.10.4" "out" "/gnu/store/s02iw98l234ngkcnxqi7jz54vqqgx6hj-python2-numpy-1.10.4" (propagated-inputs ()) (search-paths ()))))) --8<---------------cut here---------------end--------------->8--- Did I do something wrong? I also wonder if we should add a way to force Guix to build the profile despite the detected conflict. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net From unknown Fri Sep 12 16:03:31 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#27271] [PATCH 0/4] Catch collisions at profile creation time Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jun 2017 12:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ricardo Wurmus Cc: 27271@debbugs.gnu.org Received: via spool by 27271-submit@debbugs.gnu.org id=B27271.14977026174776 (code B ref 27271); Sat, 17 Jun 2017 12:31:01 +0000 Received: (at 27271) by debbugs.gnu.org; 17 Jun 2017 12:30:17 +0000 Received: from localhost ([127.0.0.1]:52198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMCro-0001Ey-Rr for submit@debbugs.gnu.org; Sat, 17 Jun 2017 08:30:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMCrn-0001El-4U for 27271@debbugs.gnu.org; Sat, 17 Jun 2017 08:30:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMCre-0007Hr-Lr for 27271@debbugs.gnu.org; Sat, 17 Jun 2017 08:30:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMCre-0007Ha-Hq; Sat, 17 Jun 2017 08:30:06 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:45834 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dMCrd-00012q-RA; Sat, 17 Jun 2017 08:30:06 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170607092242.20565-1-ludo@gnu.org> <878tl2djh8.fsf@elephly.net> <871sqtpkfo.fsf@gnu.org> <87shiz6k03.fsf@elephly.net> Date: Sat, 17 Jun 2017 14:30:03 +0200 In-Reply-To: <87shiz6k03.fsf@elephly.net> (Ricardo Wurmus's message of "Sat, 17 Jun 2017 11:28:28 +0200") Message-ID: <87poe2bxv8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Ricardo Wurmus skribis: > I just tried it and I didn=E2=80=99t work the way I thought it would. > > Here=E2=80=99s what I did: > > # install old numpy > guix package -p /tmp/test -i /gnu/store/s02iw98l234ngkcnxqi7jz54vqqgx6h= j-python2-numpy-1.10.4 > > # install a package depending on a later version of numpy > guix package -p /tmp/test -i bamm > > It built bamm and then proceeded to build a profile, while spitting out > hundreds of lines about conflicts between python2-numpy-1.10.4 and > python2-numpy-1.12.0. Oops, good catch. This is fixed with the attached patch. Now I get: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix package -p /tmp/test -i bamm substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org= '... 100.0% The following package will be installed: bamm 1.7.3 /gnu/store/lcb2s2x3s50gmf24asl2mvv34jhx8n1x-bamm-1.7.3 guix package: error: profile contains conflicting entries for python2-numpy= :out guix package: error: first entry: python2-numpy@1.12.0:out /gnu/store/pzf= 5yszv5dlzmk71w7srdi2qdqh2j40a-python2-numpy-1.12.0 guix package: error: ... propagated from bamm@1.7.3 guix package: error: second entry: python2-numpy@1.10.4:out /gnu/store/py= kndifwj34mc1h7m78d1b6c03gb5zq1-python2-numpy-1.10.4 --8<---------------cut here---------------end--------------->8--- I=E2=80=99ll add a test case for this. > I also wonder if we should add a way to force Guix to build the profile > despite the detected conflict. Good question. I wouldn=E2=80=99t be hard to do, but maybe we can wait unt= il there=E2=80=99s demand so we can analyze the use case better? Thanks for testing! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/profiles.scm b/guix/profiles.scm index 980229ca7..52a8bd2ea 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -157,6 +157,19 @@ ;; Convenient alias, to avoid name clashes. (define make-manifest manifest) +(define (manifest-transitive-entries manifest) + "Return the entries of MANIFEST along with their propagated inputs, +recursively." + (let loop ((entries (manifest-entries manifest)) + (result '())) + (match entries + (() + (reverse result)) + ((head . tail) + (loop (append (manifest-entry-dependencies head) + tail) + (cons head result)))))) + (define-record-type* manifest-entry make-manifest-entry manifest-entry? @@ -250,7 +263,7 @@ file name." (#f ;no conflict (return result)))) #t - (manifest-entries manifest)))) + (manifest-transitive-entries manifest)))) (define* (package->manifest-entry package #:optional (output "out") #:key (parent (delay #f))) --=-=-=-- From unknown Fri Sep 12 16:03:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#27271: closed (Re: [bug#27271] [PATCH 0/4] Catch collisions at profile creation time) Message-ID: References: <87injpk8ui.fsf@gnu.org> <20170607092242.20565-1-ludo@gnu.org> X-Gnu-PR-Message: they-closed 27271 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 27271@debbugs.gnu.org Date: Wed, 21 Jun 2017 09:08:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1498036082-30040-1" This is a multi-part message in MIME format... ------------=_1498036082-30040-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #27271: [PATCH 0/4] Catch collisions at profile creation time which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 27271@debbugs.gnu.org. --=20 27271: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D27271 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1498036082-30040-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 27271-done) by debbugs.gnu.org; 21 Jun 2017 09:07:17 +0000 Received: from localhost ([127.0.0.1]:58851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNbbY-0007nV-WB for submit@debbugs.gnu.org; Wed, 21 Jun 2017 05:07:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNbbW-0007nG-SA for 27271-done@debbugs.gnu.org; Wed, 21 Jun 2017 05:07:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNbbN-0005yS-J4 for 27271-done@debbugs.gnu.org; Wed, 21 Jun 2017 05:07:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNbbN-0005yN-Gf; Wed, 21 Jun 2017 05:07:05 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60858 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dNbbL-0002Nz-Vh; Wed, 21 Jun 2017 05:07:05 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Ricardo Wurmus Subject: Re: [bug#27271] [PATCH 0/4] Catch collisions at profile creation time References: <20170607092242.20565-1-ludo@gnu.org> <878tl2djh8.fsf@elephly.net> <871sqtpkfo.fsf@gnu.org> <87shiz6k03.fsf@elephly.net> <87poe2bxv8.fsf@gnu.org> Date: Wed, 21 Jun 2017 11:07:01 +0200 In-Reply-To: <87poe2bxv8.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 17 Jun 2017 14:30:03 +0200") Message-ID: <87injpk8ui.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27271-done Cc: 27271-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Pushed, thanks! Ludo=E2=80=99. ------------=_1498036082-30040-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Jun 2017 09:23:11 +0000 Received: from localhost ([127.0.0.1]:60313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXBH-0002UT-Bk for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:23:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIXBG-0002UA-4M for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:23:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIXB9-0000Z8-Li for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:23:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42338) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIXB9-0000Z2-Ii for submit@debbugs.gnu.org; Wed, 07 Jun 2017 05:23:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIXB8-0007kl-7w for guix-patches@gnu.org; Wed, 07 Jun 2017 05:23:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIXB6-0000Wf-SJ for guix-patches@gnu.org; Wed, 07 Jun 2017 05:23:02 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIXAz-0000P5-V5; Wed, 07 Jun 2017 05:22:53 -0400 Received: from wifi-eduroam-161098.inria.fr ([128.93.161.98]:56826 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dIXAy-0001WS-Qz; Wed, 07 Jun 2017 05:22:53 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/4] Catch collisions at profile creation time Date: Wed, 7 Jun 2017 11:22:42 +0200 Message-Id: <20170607092242.20565-1-ludo@gnu.org> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello Guix! These patches allow us to catch problematic collisions when computing a profile derivation. As we know, the profile builder often spits out a number of warnings about collisions but that is not very useful because users cannot distinguish the problematic cases from the harmless cases (an example of a harmless case is when GDB and Binutils provide an almost-identical .info file twice). Concretely, what happens is something like this: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix package -i guile-cairo -n The following package would be upgraded: guile-cairo 1.4.1 → 1.4.1 /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guix package: error: profile contains conflicting entries for guile-cairo:out guix package: error: first entry: guile-cairo@1.4.1:out /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guix package: error: second entry: guile-cairo@1.4.1:out /gnu/store/x0jp2q06snx7skrqdmlkn0r5fhyvvn00-guile-cairo-1.4.1 guix package: error: ... propagated from guile-rsvg@2.18.1 $ ./pre-inst-env guix package -i guile-cairo guile-rsvg guile-present -n The following packages would be upgraded: guile-cairo 1.4.1 → 1.4.1 /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guile-rsvg 2.18.1 → 2.18.1 /gnu/store/xp8wcyvhplsv45gkj9r4n6zmcdancfkn-guile-rsvg-2.18.1 guile-present 0.3.0 → 0.3.0 /gnu/store/qwk8fzijyllaxv4vw114gqzix1qvfmp2-guile-present-0.3.0 guix package: error: profile contains conflicting entries for guile-cairo:out guix package: error: first entry: guile-cairo@1.4.1:out /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guix package: error: second entry: guile-cairo@1.4.1:out /gnu/store/x0jp2q06snx7skrqdmlkn0r5fhyvvn00-guile-cairo-1.4.1 guix package: error: ... propagated from guile-charting@0.2.0 $ ./pre-inst-env guix package -i guile-cairo guile-rsvg guile-charting guile-present -n The following packages would be upgraded: guile-cairo 1.4.1 → 1.4.1 /gnu/store/k9p7j9ijb9vfkmvcgr4vqy20vkg6nsbg-guile-cairo-1.4.1 guile-rsvg 2.18.1 → 2.18.1 /gnu/store/xp8wcyvhplsv45gkj9r4n6zmcdancfkn-guile-rsvg-2.18.1 guile-charting 0.2.0 → 0.2.0 /gnu/store/11368xymyhk4zz8zwvbdmp5dzcl0vxvc-guile-charting-0.2.0 guile-present 0.3.0 → 0.3.0 /gnu/store/qwk8fzijyllaxv4vw114gqzix1qvfmp2-guile-present-0.3.0 substitute: updating list of substitutes from 'https://bayfront.guixsd.org'... 100.0% substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0% The following derivations would be built: /gnu/store/r361w7fa57vm7js8lk4bnsc7lwv2avby-profile.drv /gnu/store/l5hf8cg5fx6par39659ihkhdgp3kls1n-xdg-mime-database.drv /gnu/store/k8jmvc8yjk3qg8xbgcfgpgngq7vkygld-info-dir.drv /gnu/store/ivnqmwwxwric5lhw5gqnpkxq6gbzj23i-fonts-dir.drv /gnu/store/hdaasxvm64h06xxzwrnx2gch981h88wf-ca-certificate-bundle.drv /gnu/store/axzp9vj4h59nnbmf6ccaajb9qq97xwb8-gtk-icon-themes.drv /gnu/store/8dkb7k53x1c0zhb9qdgrgr53j5j3biwf-gtk-im-modules.drv /gnu/store/v2w6qpf0kk2d70wv01f3ln1v758sgzqm-manual-database.drv --8<---------------cut here---------------end--------------->8--- As in the example above, conflicts may arise when doing a partial upgrade of a profile, because this is a situation where you can easily end up with conflicting versions of a given package. It’s much less likely when using ‘guix package -m’ or similar. An open question is whether there are commonly used combinations of packages that trigger conflicts. I haven’t had any problems with my profile (with 234 packages) nor with my GuixSD config, but I encourage you to test it on your profile! Thoughts? Ludo’. Ludovic Courtès (3): profiles: Represent propagated inputs as manifest entries. profiles: Manifest entries keep a reference to their parent entry. profiles: Catch and report collisions in the profile. guix/profiles.scm | 241 +++++++++++++++++++++++++++++++++++++++++------------ guix/ui.scm | 27 ++++++ tests/profiles.scm | 87 +++++++++++++++++++ 3 files changed, 301 insertions(+), 54 deletions(-) -- 2.13.0 ------------=_1498036082-30040-1--