From unknown Sat Aug 16 18:40:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67048: guix refresh -u -L does not work with relative path Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 10 Nov 2023 17:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67048 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 67048@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16996363526587 (code B ref -1); Fri, 10 Nov 2023 17:13:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Nov 2023 17:12:32 +0000 Received: from localhost ([127.0.0.1]:50765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1V3X-0001iA-JV for submit@debbugs.gnu.org; Fri, 10 Nov 2023 12:12:32 -0500 Received: from lists.gnu.org ([2001:470:142::17]:52922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1V3S-0001hs-Ou for submit@debbugs.gnu.org; Fri, 10 Nov 2023 12:12:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1V2j-0002Ma-AS for bug-guix@gnu.org; Fri, 10 Nov 2023 12:11:41 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1V2g-0007Yl-VN for bug-guix@gnu.org; Fri, 10 Nov 2023 12:11:41 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D3F462B2; Fri, 10 Nov 2023 18:11:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sOSIaAcYe5_M; Fri, 10 Nov 2023 18:11:32 +0100 (CET) Received: from jurong (unknown [IPv6:2a04:cec0:122a:5fe0:e8fc:614c:3a86:e6f2]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D9ECE12C; Fri, 10 Nov 2023 18:11:31 +0100 (CET) Date: Fri, 10 Nov 2023 18:11:29 +0100 From: Andreas Enge Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1qQLKUBUpGfVJvC0" Content-Disposition: inline Received-SPF: pass client-ip=2a0c:e300::1; envelope-from=andreas@enge.fr; helo=hera.aquilenet.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: -1.0 (-) --1qQLKUBUpGfVJvC0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, to reproduce this weird (and very specific!) problem, do the following: cd /tmp mkdir proj copy the attached example.scm into /tmp/proj Now guix refresh -u -L proj python-numpy-illustrated yields the error proj/example.scm:10:2: python-numpy-illustrated: updating from version 0.3 to version 0.3.1... proj/example.scm:10:2: warning: python-numpy-illustrated: no `version' field in source; skipping and does not update the package; whereas guix refresh -u -L /tmp/proj python-numpy-illustrated works as expected. Without the "-u" things work with a relative path (as indicated by the first line before the error message above), and I have not found other guix commands that pose problems with relative paths. Andreas --1qQLKUBUpGfVJvC0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="example.scm" (define-module (example) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix packages) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (gnu packages python-xyz)) (define-public python-numpy-illustrated (package (name "python-numpy-illustrated") (version "0.3.1") (source (origin (method url-fetch) (uri (pypi-uri "numpy-illustrated" version)) (sha256 (base32 "0s7ki6lm9xwd4pj7rx6al230wbywqk11wjvgdk44lbdq2fz7kfxd")))) (build-system pyproject-build-system) (propagated-inputs (list python-numpy)) (home-page "https://github.com/axil/numpy-illustrated") (synopsis "Helper functions from the NumPy Illustrated guide") (description "This package provides helper functions for the @url{https://betterprogramming.pub/numpy-illustrated-the-visual-guide-to-numpy-3b1d4976de1d?sk=57b908a77aa44075a49293fa1631dd9b, NumPy Illustrated} programming guide.") (license license:expat))) --1qQLKUBUpGfVJvC0-- From unknown Sat Aug 16 18:40:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67048: Acknowledgement (guix refresh -u -L does not work with relative path) Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 10 Nov 2023 17:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67048 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 67048@debbugs.gnu.org Received: via spool by 67048-submit@debbugs.gnu.org id=B67048.16996365236946 (code B ref 67048); Fri, 10 Nov 2023 17:16:02 +0000 Received: (at 67048) by debbugs.gnu.org; 10 Nov 2023 17:15:23 +0000 Received: from localhost ([127.0.0.1]:50776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1V6J-0001ny-AE for submit@debbugs.gnu.org; Fri, 10 Nov 2023 12:15:23 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:35536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1V6G-0001ng-VS for 67048@debbugs.gnu.org; Fri, 10 Nov 2023 12:15:22 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id ABE17D19; Fri, 10 Nov 2023 18:14:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5yrJax8CPasq; Fri, 10 Nov 2023 18:14:35 +0100 (CET) Received: from jurong (unknown [IPv6:2a04:cec0:122a:5fe0:e8fc:614c:3a86:e6f2]) by hera.aquilenet.fr (Postfix) with ESMTPSA id EBF23672; Fri, 10 Nov 2023 18:14:34 +0100 (CET) Date: Fri, 10 Nov 2023 18:14:17 +0100 From: Andreas Enge Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Ou782oIi9REoj+Xm" Content-Disposition: inline In-Reply-To: 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: -1.0 (-) --Ou782oIi9REoj+Xm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline My mail client has secretly updated the file while I was carrying out the experiment; the attached version should be the one before refreshing. Andreas --Ou782oIi9REoj+Xm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="example.scm" (define-module (example) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix packages) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (gnu packages python-xyz)) (define-public python-numpy-illustrated (package (name "python-numpy-illustrated") (version "0.3") (source (origin (method url-fetch) (uri (pypi-uri "numpy-illustrated" version)) (sha256 (base32 "1x3gd19hhmlg51i5aj070y7w0lk47gx6yx3r3f45396bgdfnsw4i")))) (build-system pyproject-build-system) (propagated-inputs (list python-numpy)) (home-page "https://github.com/axil/numpy-illustrated") (synopsis "Helper functions from the NumPy Illustrated guide") (description "This package provides helper functions for the @url{https://betterprogramming.pub/numpy-illustrated-the-visual-guide-to-numpy-3b1d4976de1d?sk=57b908a77aa44075a49293fa1631dd9b, NumPy Illustrated} programming guide.") (license license:expat))) --Ou782oIi9REoj+Xm-- From unknown Sat Aug 16 18:40:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67048: guix refresh -u -L does not work with relative path Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 13 Nov 2023 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67048 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Andreas Enge , 67048@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 67048-submit@debbugs.gnu.org id=B67048.169990015729124 (code B ref 67048); Mon, 13 Nov 2023 18:30:02 +0000 Received: (at 67048) by debbugs.gnu.org; 13 Nov 2023 18:29:17 +0000 Received: from localhost ([127.0.0.1]:59324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2bgT-0007Zg-4Z for submit@debbugs.gnu.org; Mon, 13 Nov 2023 13:29:17 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:41402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2bgR-0007ZS-2u for 67048@debbugs.gnu.org; Mon, 13 Nov 2023 13:29:16 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-408fd07bb78so5198935e9.1 for <67048@debbugs.gnu.org>; Mon, 13 Nov 2023 10:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699900107; x=1700504907; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TaupDSGCVXkr8pdvvYdsgyLDIf48skAZG/K2r/gKI4Q=; b=aYT/1U7QX1ZFN9YLjSSacnZoH5XnhihccelrNd5uBvURj3RX2QI512t/AG1Nh9leyr ZAW1QOZBZgHvTRSQ+PmuLTIFEyt8Xcg6psxRQMyO3PNIP8adD43E7yMaxClqFhVbCdoU x4ruccfF21CfNXdi3UzniQstEJSa/xt9EReY7wOOnRayW9t9QqZBF4jpHPEBIY813gCv sGmQxdNc714eZSbkkbsEOtXlD2Cthil7NS0NfFcfeR+WAR0sF8IsC7LtDAWmkEQV9HD8 BBxg3nMbD0pMXng+WMv+vc19LY91SAvcrble2BnM5w05PuWqimviBeAtVyV7EeqnIfnG YBbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699900107; x=1700504907; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TaupDSGCVXkr8pdvvYdsgyLDIf48skAZG/K2r/gKI4Q=; b=DfdalQ5yMdZ1PZHgdJd+P2H9DAikPh+lg37j9SjDpCjtKa+PYspTJv21AvW3fTlfTE GSkjubwaDJKQdB5GNPM9hdghjKh/Ws474ze3JM7dGWfq2+WgDMdvRB+F7NIaejDR+P9h W0rEGQJ2MnaCMmLvDNxMGQ7uM4e81CIvSGt8aPxPOhhWQMBpdtd/DFxdPPuhaol8wh+m knwzoGfpUY2JyZOG66R7dpQt2XEvOiUqQyRZ/6IMWkvvPHSrKTG4IDSswmkYmcbCC146 QRI9Ik/yoVQle7WlKWFnVLsG4mDtTPXPzr/deoRPr83LB/QhbOmnpY5X4ffwVtwtRkZD h3HQ== X-Gm-Message-State: AOJu0YzGqdmhHrAchUusOwGj8KvHTH638Buruw0zU0335xvh3ceCCvCS H6GxOPELhuOlZ93rskNLayLnJgFfhEM= X-Google-Smtp-Source: AGHT+IFA05AzJI+Qz/favGE3sKFFo+FfqCmyeplppPmAiIkPcekLFubErOK1cFdtSXpWH+94lVidwQ== X-Received: by 2002:a05:600c:28f:b0:403:334:fb0d with SMTP id 15-20020a05600c028f00b004030334fb0dmr6220936wmk.4.1699900107191; Mon, 13 Nov 2023 10:28:27 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id s19-20020a7bc393000000b00405391f485fsm8758107wmj.41.2023.11.13.10.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 10:28:26 -0800 (PST) From: Simon Tournier In-Reply-To: References: Date: Mon, 13 Nov 2023 19:28:25 +0100 Message-ID: <8734x9fqye.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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, On Fri, 10 Nov 2023 at 18:11, Andreas Enge wrote: > guix refresh -u -L proj python-numpy-illustrated > yields the error > proj/example.scm:10:2: python-numpy-illustrated: updating from version 0.= 3 to version 0.3.1... > proj/example.scm:10:2: warning: python-numpy-illustrated: no `version' fi= eld in source; skipping The issue is from several layers; (search-path %load-path file) returns #false. See: 1. package-field-location from (guix packages) called by update-package-source from (guix upstream) 2. update-package-source from (guix upstream) called by package-update from same module called by update-package from (guix scripts refresh) The issue looks similar as #66901 [1]. Well, I have tried to improve the situation by setting some =E2=80=99canonicalize-path=E2=80=99 here or t= here. However, then the next issue is from the call =E2=80=99(absolute-location l= oc)=E2=80=99 in =E2=80=99update-package-source=E2=80=99 from module (guix upstream); it = returns: --8<---------------cut here---------------start------------->8--- Backtrace: In ice-9/boot-9.scm: 724:2 19 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 18 (_ #(#(#))) In guix/ui.scm: 2324:7 17 (run-guix . _) 2287:10 16 (run-guix-command _ . _) In ice-9/boot-9.scm: 1752:10 15 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) 1752:10 14 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In guix/store.scm: 659:37 13 (thunk) 2168:25 12 (run-with-store # # #:guile-for-build _ #:syst= em _ =E2=80=A6) In ice-9/eval.scm: 191:27 11 (_ #(#(# #) (#< package= =E2=80=A6>) =E2=80=A6)) In ice-9/boot-9.scm: 152:2 10 (with-fluid* _ _ _) 152:2 9 (with-fluid* _ _ _) 152:2 8 (with-fluid* _ _ _) In ice-9/eval.scm: 619:8 7 (_ #(#(# (#< package: #) =E2=80=A6))) In srfi/srfi-1.scm: 634:9 6 (for-each # (#< package: #)) In ice-9/eval.scm: 619:8 5 (_ #(#(#(#(#(#(#(#(#(#(#(#(#) # =E2=80=A6) =E2=80= =A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2= =80=A6) =E2=80=A6) =E2=80=A6)) 155:9 4 (_ #(#(#(#(#(#(#(#(#(#(#(#(#) # =E2=80=A6) =E2=80= =A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2= =80=A6) =E2=80=A6) =E2=80=A6)) In guix/diagnostics.scm: 354:20 3 (absolute-location #< file: "proj/example.scm" line:= 10 column: 2>) In unknown file: 2 (raise #<&formatted-message format: "file '~a' not found on lo= ad path\n" arguments: ("proj/example.scm")>) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Wrong type (expecting exact integer): #<&formatted-message format: "file '~= a' not found on load path\n" arguments: ("proj/example.scm")> --8<---------------cut here---------------end--------------->8--- Hum, it needs to be investigated=E2=80=A6 1: https://issues.guix.gnu.org/66901 Cheers, simon From unknown Sat Aug 16 18:40:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67048: [PATCH] DRAFT guix: upstream: Allow relative file name. References: In-Reply-To: Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, bug-guix@gnu.org Resent-Date: Tue, 14 Nov 2023 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67048 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 67048@debbugs.gnu.org Cc: Simon Tournier , Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 67048-submit@debbugs.gnu.org id=B67048.16999829689907 (code B ref 67048); Tue, 14 Nov 2023 17:30:02 +0000 Received: (at 67048) by debbugs.gnu.org; 14 Nov 2023 17:29:28 +0000 Received: from localhost ([127.0.0.1]:34113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2xE7-0002Zi-QR for submit@debbugs.gnu.org; Tue, 14 Nov 2023 12:29:28 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:39320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2xE4-0002ZT-Uk for 67048@debbugs.gnu.org; Tue, 14 Nov 2023 12:29:26 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40837396b1eso2998015e9.1 for <67048@debbugs.gnu.org>; Tue, 14 Nov 2023 09:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699982917; x=1700587717; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=f6jo43ftX85XHXAzDQ5ks6xrMqB0NN14DsVo9mAWIN4=; b=g6wXltbbHliO7WYZ3X16bYoPkrZZF5hLn3lLgiTKUzYcmXV/lez4ytwHTy5c9AeNlR 77fWOSaYcOMp0qsNjSdU3ZacCXCsrdWVIuBa9yoDq+otsSAlg3tNAUwsGJXOkHZrDSRD viuW+T75O+IqW8SdTHmqCo4lVRsn0N5Xa7tcfFhEkK9BW28keOU8FsFtdrs/TZH/dAQM Rn/14jT6wl9uNNwBnnjFQwozMIXdIaSKYEVBRJ9+PNVOixUDuqUoKjQGPaiLSAyC0d96 bQllL8itI0Ox98+LU9Wv5D0N7Oa+pEdSFRuNqk5XbQUr0fi6ubuAqNrFqmdZWKGw8+nC VDkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699982917; x=1700587717; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f6jo43ftX85XHXAzDQ5ks6xrMqB0NN14DsVo9mAWIN4=; b=RpMvV+BK5b8NqiTEz0KevwbgXtc6PwD90UToIGbWKT8VWkb7rFYAxYz246VrtkgVnU sTOAE8WQVmIsPc4dv/34yJNHae0wmdiWIX9UtO6a2sVveR0uj8Fl9VZKlg3iRuEzXt8L qdneHcm2RupfdZjtKXFiHbb2oR+2Lki48Wm4J/lNAumLPki7uloQkvfiBwcAcWRcGEvx +0bPHgmJlOFaqNGSKIn33vbGFLCs4qJmYT69Tqk8eAdkRdYz0NN81QNVIkY91JqVfgzB cs17rY8cZuCNsLKFCaCHCXDpNmjV9JYtbUZ68yPeAoG6HMec10KCcc0gvPPSoEqnMqty 8NgQ== X-Gm-Message-State: AOJu0YykiWdNdS8vf1Ynwq6AcwOGCxR7RvZcptsTuYzDV/SrZKJDwqEo Z5iUS+Z/2gc8e2Tb71ISlMwnaYVJV98= X-Google-Smtp-Source: AGHT+IHL58P9VqIu9OLXKTr8WmpZjh2Tv+PknYlzdzTHJ5p5kQDbJUx7fjRAa9W+rvSHHrBwjCaExw== X-Received: by 2002:a05:600c:1f13:b0:405:4280:341d with SMTP id bd19-20020a05600c1f1300b004054280341dmr2002918wmb.4.1699982916471; Tue, 14 Nov 2023 09:28:36 -0800 (PST) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id d3-20020adfa403000000b00331424a1266sm8158920wra.84.2023.11.14.09.28.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 09:28:35 -0800 (PST) From: Simon Tournier Date: Tue, 14 Nov 2023 18:28:28 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: -1.0 (-) Fixes . Reported by Andreas Enge . * guix/diagnostics.scm (absolute-location): Return FILE from 'canonicalize-path' when 'search-path' fails. * guix/packages.scm (package-field-location): New procedure 'file-name' and use it. When 'search-path' does not find FILE in %LOAD-PATH, try 'canonicalize-path'. * guix/upstream.scm (update-package-source): When 'search-path' fails, test if FILE exists. Change-Id: I9337041b43e17ace82416db5840f04113f9544fc --- guix/diagnostics.scm | 13 +++++----- guix/packages.scm | 57 +++++++++++++++++++++++++------------------- guix/upstream.scm | 6 +++-- 3 files changed, 43 insertions(+), 33 deletions(-) diff --git a/guix/diagnostics.scm b/guix/diagnostics.scm index 3f1f527b43..f79df1ca2d 100644 --- a/guix/diagnostics.scm +++ b/guix/diagnostics.scm @@ -349,12 +349,13 @@ (define (absolute-location loc) ;; 'search-path' might return #f in obscure cases, such as ;; when %LOAD-PATH includes "." or ".." and LOC comes from a ;; file in a subdirectory thereof. - (match (search-path %load-path (location-file loc)) - (#f - (raise (formatted-message - (G_ "file '~a' not found on load path") - (location-file loc)))) - (str str))) + (let ((file (location-file loc))) + (or (search-path %load-path file) + (and (file-exists? file) + (canonicalize-path file)) + (raise (formatted-message + (G_ "file '~a' not found on load path") + file))))) (location-line loc) (location-column loc))) diff --git a/guix/packages.scm b/guix/packages.scm index e2e82692ad..ea05b739a8 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -750,37 +750,44 @@ (define (deprecated-package old-name p) (define (package-field-location package field) "Return the source code location of the definition of FIELD for PACKAGE, or #f if it could not be determined." + (define (file-name relative-file file-found line column) + (catch 'system-error + (lambda () + ;; In general we want to keep relative file names for modules. + (call-with-input-file file-found + (lambda (port) + (go-to-location port line column) + (match (read port) + ((or ('package inits ...) + ('package/inherit _ inits ...)) + (let ((field (assoc field inits))) + (match field + ((_ value) + (let ((loc (and=> (source-properties value) + source-properties->location))) + (and loc + ;; Preserve the original file name, which may be a + ;; relative file name. + (set-field loc (location-file) relative-file)))) + (_ + #f)))) + (_ + #f))))) + (lambda _ + #f))) + (match (package-location package) (($ file line column) (match (search-path %load-path file) ((? string? file-found) - (catch 'system-error - (lambda () - ;; In general we want to keep relative file names for modules. - (call-with-input-file file-found - (lambda (port) - (go-to-location port line column) - (match (read port) - ((or ('package inits ...) - ('package/inherit _ inits ...)) - (let ((field (assoc field inits))) - (match field - ((_ value) - (let ((loc (and=> (source-properties value) - source-properties->location))) - (and loc - ;; Preserve the original file name, which may be a - ;; relative file name. - (set-field loc (location-file) file)))) - (_ - #f)))) - (_ - #f))))) - (lambda _ - #f))) + (file-name file file-found line column)) (#f ;; FILE could not be found in %LOAD-PATH. - #f))) + (let ((file-found (and (file-exists? file) + (canonicalize-path file)))) + (if file-found + (file-name file file-found line column) + #f))))) (_ #f))) (define-syntax-rule (this-package-input name) diff --git a/guix/upstream.scm b/guix/upstream.scm index e28ae12f3f..5403aa833d 100644 --- a/guix/upstream.scm +++ b/guix/upstream.scm @@ -645,8 +645,10 @@ (define* (update-package-source package source hash) ((? git-reference? ref) (git-reference-commit ref)) (_ #f))) - (file (and=> (location-file loc) - (cut search-path %load-path <>)))) + (file (or (and=> (location-file loc) + (cut search-path %load-path <>)) + (and=> (location-file loc) + file-exists?)))) (if file ;; Be sure to use absolute filename. Replace the URL directory ;; when OLD-URL is available; this is useful notably for base-commit: 3d15e9e5bcd7cdad33f9832e4956f494c47e1937 -- 2.41.0 From unknown Sat Aug 16 18:40:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67048: guix refresh -u -L does not work with relative path Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 14 Nov 2023 17:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67048 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Andreas Enge , 67048@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 67048-submit@debbugs.gnu.org id=B67048.169998442612665 (code B ref 67048); Tue, 14 Nov 2023 17:54:01 +0000 Received: (at 67048) by debbugs.gnu.org; 14 Nov 2023 17:53:46 +0000 Received: from localhost ([127.0.0.1]:34139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2xbe-0003ID-Cg for submit@debbugs.gnu.org; Tue, 14 Nov 2023 12:53:46 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:38269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2xbc-0003Hz-Cz for 67048@debbugs.gnu.org; Tue, 14 Nov 2023 12:53:45 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32da4180ca2so693611f8f.1 for <67048@debbugs.gnu.org>; Tue, 14 Nov 2023 09:53:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699984376; x=1700589176; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9aLEWFrDP57xrdgo2QQRxuOpGw3YE9UEoxpCn75GiWk=; b=No7ag0R84ONLwlnbrm00PHAcfYnDwyfX9mbhtyxNWoNBXrWBI4TPNf/O2kNeABhWHq Fq4o9w6koy6EdAhKmEVht80DzBGrsklWUmD3svbuCnDS3Co19m7W65MzoGEPpX8aHhak 1Z0tqzB/YUCKVLNFLfVhwXfw0y2KdMSVPqTbZA7i1+1xyAASPaz+bGXY4AigyePvJoQD 2td08eR1Fm8wFmc49BZbNuWe4d5Ifkj1QAZyCj98QkDlfJZEqIXeyde0iWPpjRNxfq7M 9ndFQU1JRFdrvgXpk4c7T9RA4IC8YdD7NsnL6tsYW/0TjlP67uJATXsq2+t+GqnK6Sn6 1O/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699984376; x=1700589176; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9aLEWFrDP57xrdgo2QQRxuOpGw3YE9UEoxpCn75GiWk=; b=tklOS4OpYRYlxpz7H6ybNI4StWIcAxOVSUFOYSgsR+QSLsro2L31DyORuaA3WIjrqV +xIHQlbqwI/9r2hNkPNkvpgrZcHphcOJEexChoL4y3G9YTnkZC65pbJ3qy6ajHkEU/wo RwImy09Bm4ZDPII1BN97Mrw+zpWNsRPLNk3G7OuIHMiLwi+R40jU8P3k7VVPZEPhAPI0 2bM9fx0GQXEa3f5lfegcdVpgISEkeQUzepRTQOQ5eyypC6dnm7mknvL9/Fe7W5E46v2W TOUYRr5JD/g8kT0HhyCfOhRR6STEmBHiWny1CCqlIKx0kj0m0Eghptte+KI6spASEiW8 poMA== X-Gm-Message-State: AOJu0YxlBoJpa9QBfhj8I6cVbxXC8MbU00iUk/VLkwMBefXI0agWkF6r s8Ln4axnPyM1icFmNJHucgM= X-Google-Smtp-Source: AGHT+IG++zFrsxhRQU0dFJqn3qrW51/e1xTrophQUyvjQhhKaMUpPhet+UPc5Fo1Qj3Lh/yni6clEg== X-Received: by 2002:a5d:59a1:0:b0:32f:dca2:de2b with SMTP id p1-20020a5d59a1000000b0032fdca2de2bmr1981751wrr.7.1699984376116; Tue, 14 Nov 2023 09:52:56 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id e15-20020a5d594f000000b0032d9337e7d1sm8413244wri.11.2023.11.14.09.52.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 09:52:55 -0800 (PST) From: Simon Tournier In-Reply-To: <8734x9fqye.fsf@gmail.com> References: <8734x9fqye.fsf@gmail.com> Date: Tue, 14 Nov 2023 18:52:53 +0100 Message-ID: <87fs18dxxm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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, On Mon, 13 Nov 2023 at 19:28, Simon Tournier wro= te: >> guix refresh -u -L proj python-numpy-illustrated >> yields the error >> proj/example.scm:10:2: python-numpy-illustrated: updating from version 0= .3 to version 0.3.1... >> proj/example.scm:10:2: warning: python-numpy-illustrated: no `version' f= ield in source; skipping As mentioned in [1], the issue is from =E2=80=99search-path=E2=80=99 =E2=80= =93 it returns #false =E2=80=93 it is involved in several layers. See for a patch proposal. Some details: When invoking =E2=80=9Cguix refresh=E2=80=9D (guix scripts re= fresh): + It calls the procedure =E2=80=99update-package=E2=80=99 + which calls =E2=80=99update-package-source=E2=80=99; see guix/upstream.= scm + which calls =E2=80=99package-field-location=E2=80=99; see guix/packag= e.scm (match (search-path %load-path file) ((? string? file-found) [...] (#f ;; FILE could not be found in %LOAD-PATH. #f))) -> Therefore in =E2=80=99update-package-source=E2=80=99, the variable =E2= =80=99version-loc=E2=80=99 is false: (version-loc (package-field-location package 'version))) (if version-loc + Once fixed, later in =E2=80=99update-package-source=E2=80=99, it reads, (file (and=3D> (location-file loc) (cut search-path %load-path <>)))) (if file -> Therefore, the variable =E2=80=99file=E2=80=99 is false. + Once fixed, later in =E2=80=99update-package-source=E2=80=99 it calls =E2=80=99absolute-location=E2=80=99; see guix/diagnostics.scm. (if (string-prefix? "/" (location-file loc)) [...] (match (search-path %load-path (location-file loc)) (#f (raise (formatted-message Well, I do not know how to do better than . WDYT? Cheers, simon 1: bug#67048: guix refresh -u -L does not work with relative path Simon Tournier Mon, 13 Nov 2023 19:28:25 +0100 id:8734x9fqye.fsf@gmail.com https://issues.guix.gnu.org/67048 https://issues.guix.gnu.org/msgid/8734x9fqye.fsf@gmail.com https://yhetil.org/guix/8734x9fqye.fsf@gmail.com From unknown Sat Aug 16 18:40:41 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: Andreas Enge Subject: bug#67048: closed (Close) Message-ID: References: X-Gnu-PR-Message: they-closed 67048 X-Gnu-PR-Package: guix Reply-To: 67048@debbugs.gnu.org Date: Sun, 06 Jul 2025 20:21:07 +0000 Content-Type: multipart/mixed; boundary="----------=_1751833267-27614-1" This is a multi-part message in MIME format... ------------=_1751833267-27614-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #67048: guix refresh -u -L does not work with relative path which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 67048@debbugs.gnu.org. --=20 67048: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67048 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1751833267-27614-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67048-done) by debbugs.gnu.org; 6 Jul 2025 20:20:26 +0000 Received: from localhost ([127.0.0.1]:59019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uYVqb-000742-PP for submit@debbugs.gnu.org; Sun, 06 Jul 2025 16:20:26 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:59160) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uYVqT-00071D-IG; Sun, 06 Jul 2025 16:20:18 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 4178618D; Sun, 6 Jul 2025 22:20:11 +0200 (CEST) Authentication-Results: hera.aquilenet.fr; none X-Virus-Scanned: Debian amavis at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP id NiX3Yy4yx8of; Sun, 6 Jul 2025 22:20:10 +0200 (CEST) Received: from jurong (86.56.141.77.rev.sfr.net [77.141.56.86]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 665C813E; Sun, 6 Jul 2025 22:20:10 +0200 (CEST) Date: Sun, 6 Jul 2025 22:20:09 +0200 From: Andreas Enge To: 23666-done@debbugs.gnu.org, 30706-done@debbugs.gnu.org, 43274-done@debbugs.gnu.org, 67048-done@debbugs.gnu.org Subject: Close Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spamd-Result: default: False [-3.22 / 15.00]; NEURAL_HAM(-3.00)[-1.000]; BAYES_HAM(-0.62)[82.05%]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; ARC_NA(0.00)[] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 4178618D X-Rspamd-Server: hera X-Spamd-Bar: --- X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 67048-done 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 (-) Closing old issues. Andreas ------------=_1751833267-27614-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 Nov 2023 17:12:32 +0000 Received: from localhost ([127.0.0.1]:50765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1V3X-0001iA-JV for submit@debbugs.gnu.org; Fri, 10 Nov 2023 12:12:32 -0500 Received: from lists.gnu.org ([2001:470:142::17]:52922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1V3S-0001hs-Ou for submit@debbugs.gnu.org; Fri, 10 Nov 2023 12:12:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1V2j-0002Ma-AS for bug-guix@gnu.org; Fri, 10 Nov 2023 12:11:41 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1V2g-0007Yl-VN for bug-guix@gnu.org; Fri, 10 Nov 2023 12:11:41 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D3F462B2; Fri, 10 Nov 2023 18:11:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sOSIaAcYe5_M; Fri, 10 Nov 2023 18:11:32 +0100 (CET) Received: from jurong (unknown [IPv6:2a04:cec0:122a:5fe0:e8fc:614c:3a86:e6f2]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D9ECE12C; Fri, 10 Nov 2023 18:11:31 +0100 (CET) Date: Fri, 10 Nov 2023 18:11:29 +0100 From: Andreas Enge To: bug-guix@gnu.org Subject: guix refresh -u -L does not work with relative path Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1qQLKUBUpGfVJvC0" Content-Disposition: inline Received-SPF: pass client-ip=2a0c:e300::1; envelope-from=andreas@enge.fr; helo=hera.aquilenet.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit 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 (-) --1qQLKUBUpGfVJvC0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, to reproduce this weird (and very specific!) problem, do the following: cd /tmp mkdir proj copy the attached example.scm into /tmp/proj Now guix refresh -u -L proj python-numpy-illustrated yields the error proj/example.scm:10:2: python-numpy-illustrated: updating from version 0.3 to version 0.3.1... proj/example.scm:10:2: warning: python-numpy-illustrated: no `version' field in source; skipping and does not update the package; whereas guix refresh -u -L /tmp/proj python-numpy-illustrated works as expected. Without the "-u" things work with a relative path (as indicated by the first line before the error message above), and I have not found other guix commands that pose problems with relative paths. Andreas --1qQLKUBUpGfVJvC0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="example.scm" (define-module (example) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix packages) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (gnu packages python-xyz)) (define-public python-numpy-illustrated (package (name "python-numpy-illustrated") (version "0.3.1") (source (origin (method url-fetch) (uri (pypi-uri "numpy-illustrated" version)) (sha256 (base32 "0s7ki6lm9xwd4pj7rx6al230wbywqk11wjvgdk44lbdq2fz7kfxd")))) (build-system pyproject-build-system) (propagated-inputs (list python-numpy)) (home-page "https://github.com/axil/numpy-illustrated") (synopsis "Helper functions from the NumPy Illustrated guide") (description "This package provides helper functions for the @url{https://betterprogramming.pub/numpy-illustrated-the-visual-guide-to-numpy-3b1d4976de1d?sk=57b908a77aa44075a49293fa1631dd9b, NumPy Illustrated} programming guide.") (license license:expat))) --1qQLKUBUpGfVJvC0-- ------------=_1751833267-27614-1--