From unknown Wed Aug 20 01:21:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19364: search-patch fails to consult GUIX_PACKAGE_PATH Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 13 Dec 2014 08:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19364 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 19364@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.141846034025391 (code B ref -1); Sat, 13 Dec 2014 08:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Dec 2014 08:45:40 +0000 Received: from localhost ([127.0.0.1]:44377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XziKY-0006bP-HK for submit@debbugs.gnu.org; Sat, 13 Dec 2014 03:45:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53641) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XziKW-0006b9-9l for submit@debbugs.gnu.org; Sat, 13 Dec 2014 03:45:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XziKJ-0007VW-Pl for submit@debbugs.gnu.org; Sat, 13 Dec 2014 03:45:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XziKJ-0007VS-N8 for submit@debbugs.gnu.org; Sat, 13 Dec 2014 03:45:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XziKD-0002k1-LN for bug-guix@gnu.org; Sat, 13 Dec 2014 03:45:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XziK6-0007Tt-5d for bug-guix@gnu.org; Sat, 13 Dec 2014 03:45:17 -0500 Received: from world.peace.net ([50.252.239.5]:35689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XziK6-0007To-1r for bug-guix@gnu.org; Sat, 13 Dec 2014 03:45:10 -0500 Received: from c-24-62-95-23.hsd1.ma.comcast.net ([24.62.95.23] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XziJz-0006s4-Kw; Sat, 13 Dec 2014 03:45:03 -0500 From: Mark H Weaver Date: Sat, 13 Dec 2014 03:43:14 -0500 Message-ID: <87fvck549p.fsf@yeeloong.lan> 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.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.15 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 (-----) Tom=C3=A1=C5=A1 =C4=8Cech reported on IRC that 'sear= ch-patch' failed to find a patch he had put into DIR/gnu/packages/patches/, where DIR was in $GUIX_PACKAGE_PATH. Adding DIR to GUILE_LOAD_PATH fixed the problem. Also, it would be good to improve the error message when 'search-patch' fails. This is what he reported seeing: --8<---------------cut here---------------start------------->8--- guix/packages.scm:374:17: In procedure #: guix/packages.scm:374:17: Throw to key `match-error' with args `("match" "n= o matching pattern" #f)'. --8<---------------cut here---------------end--------------->8--- Mark From unknown Wed Aug 20 01:21:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Mark H Weaver Subject: bug#19364: closed (Re: bug#19364: search-patch fails to consult GUIX_PACKAGE_PATH) Message-ID: References: <87vbkn79kw.fsf@gnu.org> <87fvck549p.fsf@yeeloong.lan> X-Gnu-PR-Message: they-closed 19364 X-Gnu-PR-Package: guix Reply-To: 19364@debbugs.gnu.org Date: Sat, 03 Jan 2015 23:02:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1420326123-9579-1" This is a multi-part message in MIME format... ------------=_1420326123-9579-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #19364: search-patch fails to consult GUIX_PACKAGE_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 19364@debbugs.gnu.org. --=20 19364: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D19364 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1420326123-9579-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 19364-done) by debbugs.gnu.org; 3 Jan 2015 23:01:22 +0000 Received: from localhost ([127.0.0.1]:35872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7XhB-0002Tc-MP for submit@debbugs.gnu.org; Sat, 03 Jan 2015 18:01:22 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:33664) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7Xh8-0002TO-JL for 19364-done@debbugs.gnu.org; Sat, 03 Jan 2015 18:01:19 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 29F6A4283; Sun, 4 Jan 2015 00:01:17 +0100 (CET) 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 SmPT6dMRawDG; Sun, 4 Jan 2015 00:01:17 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id B55366BE; Sun, 4 Jan 2015 00:01:16 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mark H Weaver Subject: Re: bug#19364: search-patch fails to consult GUIX_PACKAGE_PATH References: <87fvck549p.fsf@yeeloong.lan> Date: Sun, 04 Jan 2015 00:01:19 +0100 In-Reply-To: <87fvck549p.fsf@yeeloong.lan> (Mark H. Weaver's message of "Sat, 13 Dec 2014 03:43:14 -0500") Message-ID: <87vbkn79kw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19364-done Cc: 19364-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (+) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark H Weaver skribis: > Tom=C3=A1=C5=A1 =C4=8Cech reported on IRC that 'se= arch-patch' > failed to find a patch he had put into DIR/gnu/packages/patches/, where > DIR was in $GUIX_PACKAGE_PATH. Adding DIR to GUILE_LOAD_PATH fixed the > problem. Fixed in ee06af5. > Also, it would be good to improve the error message when 'search-patch' > fails. This is what he reported seeing: > > guix/packages.scm:374:17: In procedure #: > guix/packages.scm:374:17: Throw to key `match-error' with args `("match" = "no matching pattern" #f)'. I came up with this patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages.scm b/gnu/packages.scm index 7f0b58b..57a3e21 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -30,6 +30,8 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module (srfi srfi-39) #:export (search-patch search-bootstrap-binary @@ -70,13 +72,23 @@ %load-path))) (define (search-patch file-name) - "Search the patch FILE-NAME." - (search-path (%patch-path) file-name)) + "Search the patch FILE-NAME. Raise an error if not found." + (or (search-path (%patch-path) file-name) + (raise (condition + (&message (message (format #f (_ "~a: patch not found") + file-name))))))) (define (search-bootstrap-binary file-name system) - "Search the bootstrap binary FILE-NAME for SYSTEM." - (search-path (%bootstrap-binaries-path) - (string-append system "/" file-name))) + "Search the bootstrap binary FILE-NAME for SYSTEM. Raise an error if not +found." + (or (search-path (%bootstrap-binaries-path) + (string-append system "/" file-name)) + (raise (condition + (&message + (message + (format #f (_ "could not find bootstrap binary '~a' \ +for system '~a'") + file-name system))))))) (define %distro-root-directory ;; Absolute file name of the module hierarchy. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable However, since =E2=80=98search-patch=E2=80=99 errors happen at load time, t= he actual exception is hidden, and one just gets a =E2=80=9Cpackage not found=E2=80= =9D error. To fix that, we=E2=80=99d need to make =E2=80=98patches=E2=80=99 a thunked = field, which sounds reasonable to me. WDYT? Thanks, Ludo=E2=80=99. --=-=-=-- ------------=_1420326123-9579-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Dec 2014 08:45:40 +0000 Received: from localhost ([127.0.0.1]:44377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XziKY-0006bP-HK for submit@debbugs.gnu.org; Sat, 13 Dec 2014 03:45:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53641) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XziKW-0006b9-9l for submit@debbugs.gnu.org; Sat, 13 Dec 2014 03:45:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XziKJ-0007VW-Pl for submit@debbugs.gnu.org; Sat, 13 Dec 2014 03:45:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XziKJ-0007VS-N8 for submit@debbugs.gnu.org; Sat, 13 Dec 2014 03:45:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XziKD-0002k1-LN for bug-guix@gnu.org; Sat, 13 Dec 2014 03:45:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XziK6-0007Tt-5d for bug-guix@gnu.org; Sat, 13 Dec 2014 03:45:17 -0500 Received: from world.peace.net ([50.252.239.5]:35689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XziK6-0007To-1r for bug-guix@gnu.org; Sat, 13 Dec 2014 03:45:10 -0500 Received: from c-24-62-95-23.hsd1.ma.comcast.net ([24.62.95.23] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XziJz-0006s4-Kw; Sat, 13 Dec 2014 03:45:03 -0500 From: Mark H Weaver To: bug-guix@gnu.org Subject: search-patch fails to consult GUIX_PACKAGE_PATH Date: Sat, 13 Dec 2014 03:43:14 -0500 Message-ID: <87fvck549p.fsf@yeeloong.lan> 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.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (-----) Tom=C3=A1=C5=A1 =C4=8Cech reported on IRC that 'sear= ch-patch' failed to find a patch he had put into DIR/gnu/packages/patches/, where DIR was in $GUIX_PACKAGE_PATH. Adding DIR to GUILE_LOAD_PATH fixed the problem. Also, it would be good to improve the error message when 'search-patch' fails. This is what he reported seeing: --8<---------------cut here---------------start------------->8--- guix/packages.scm:374:17: In procedure #: guix/packages.scm:374:17: Throw to key `match-error' with args `("match" "n= o matching pattern" #f)'. --8<---------------cut here---------------end--------------->8--- Mark ------------=_1420326123-9579-1--