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 +BT7ODV9nV+sYAAA0tVLHw (envelope-from ) for ; Sat, 31 Oct 2020 15:05:25 +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 MEntNDV9nV8mewAA1q6Kng (envelope-from ) for ; Sat, 31 Oct 2020 15:05:25 +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 916CD94023B for ; Sat, 31 Oct 2020 15:05:25 +0000 (UTC) Received: from localhost ([::1]:48174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYs4J-000415-KU for larch@yhetil.org; Sat, 31 Oct 2020 10:41:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYs3y-00040y-9t for guix-patches@gnu.org; Sat, 31 Oct 2020 10:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50877) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYs3x-00032A-Vi for guix-patches@gnu.org; Sat, 31 Oct 2020 10:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYs3x-0007Mj-UQ for guix-patches@gnu.org; Sat, 31 Oct 2020 10:41:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44344] [PATCH] guix: describe: Improve package provenance tracking. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 31 Oct 2020 14:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44344 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44344@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160415523228268 (code B ref -1); Sat, 31 Oct 2020 14:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 31 Oct 2020 14:40:32 +0000 Received: from localhost ([127.0.0.1]:34190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYs3T-0007Ls-Jy for submit@debbugs.gnu.org; Sat, 31 Oct 2020 10:40:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:36932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYs3S-0007Ll-CQ for submit@debbugs.gnu.org; Sat, 31 Oct 2020 10:40:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYs3R-0003vT-U6 for guix-patches@gnu.org; Sat, 31 Oct 2020 10:40:30 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:38036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYs3P-0002uJ-J8 for guix-patches@gnu.org; Sat, 31 Oct 2020 10:40:29 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id a97a7fea for ; Sat, 31 Oct 2020 14:40:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=dkim; bh=S864rJtuir2JdV2fA07vzk6B9UlNA/mDegMB8282Nq8=; b=U9O4 Yp0wDraF5sZgGkma74pJbda6XO4idAZeuAfdBjediemQ6rdNOQ54//hBESiHXHNK MuH6STk6hFdjLLZB4R8KQZ1wX3XsmkdcWNMq+hy8eV1dWt/kHu+NTTy6cU9GkFGD PT2fY7tu4GGsVpPDIwhkYzSFhA7rY5lFKJEcrXk5gZxp8qLOoLG+/XRZ5AoILi4l 0SS31/056jXjfephNr8ADY+I7zRsRNn0n/KnSzpJoiV3vQOxw3T2stkCwDFStu+S ctXN8brKMcXw8zgkyrQ7xJT7zzZcVojwoxhrER159iunksWSWrpLovV7VcwICivG NUypMOxUhfj9Aa1YEQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 81eb3ea4 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sat, 31 Oct 2020 14:40:20 +0000 (UTC) From: Julien Lepiller Date: Sat, 31 Oct 2020 15:40:07 +0100 Message-Id: <20201031144007.25531-1-julien@lepiller.eu> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=lepiller.eu header.s=dkim header.b=U9O4 Yp0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 5.09 X-TUID: RybV0o/BXWtb %load-path lists ~/.config/guix/current before individual channels. We use canonicalize-path to get the store path for channel packages. * guix/describe.scm (package-provenance): Use canonicalize-path. --- guix/describe.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/guix/describe.scm b/guix/describe.scm index 05bf99eb58..fe5921a3b3 100644 --- a/guix/describe.scm +++ b/guix/describe.scm @@ -132,25 +132,25 @@ property of manifest entries, or #f if it could not be determined." (file (let ((file (if (string-prefix? "/" file) file - (search-path %load-path file)))) + (canonicalize-path (search-path %load-path file))))) (and file (string-prefix? (%store-prefix) file) ;; Always store information about the 'guix' channel and ;; optionally about the specific channel FILE comes from. - (or (let ((main (and=> (find (lambda (entry) - (string=? "guix" - (manifest-entry-name entry))) - (current-profile-entries)) - entry-source)) - (extra (any (lambda (entry) - (let ((item (manifest-entry-item entry))) - (and (string-prefix? item file) - (entry-source entry)))) - (current-profile-entries)))) - (and main - `(,main - ,@(if extra (list extra) '())))))))))) + (let ((main (and=> (find (lambda (entry) + (string=? "guix" + (manifest-entry-name entry))) + (current-profile-entries)) + entry-source)) + (extra (any (lambda (entry) + (let ((item (manifest-entry-item entry))) + (and (string-prefix? item file) + (entry-source entry)))) + (current-profile-entries)))) + (and main + `(,main + ,@(if extra (list extra) '()))))))))) (define (manifest-entry-with-provenance entry) "Return ENTRY with an additional 'provenance' property if it's not already -- 2.28.0