From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 43818@debbugs.gnu.org
Subject: bug#43818: [PATCH] packages: Fix a bug in %patch-path.
Date: Tue, 27 Oct 2020 12:41:40 -0400 [thread overview]
Message-ID: <874kmfy62j.fsf@gmail.com> (raw)
In-Reply-To: <87zh487f5x.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 27 Oct 2020 00:15:06 +0100")
Hello,
Ludovic Courtès <ludo@gnu.org> writes:
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Fixes <https://issues.guix.gnu.org/43818>.
>>
>> Having the Guix root trailed by a slash in the GUILE_LOAD_PATH would
>> previously cause %patch-path to not return an entry with the patches
>> sub-directory, leading to errors such as:
>>
>> While executing meta-command:
>> ERROR:
>> 1. &formatted-message:
>> format: "~a: patch not found\n"
>> arguments: ("icecat-use-older-reveal-hidden-html.patch")
>>
>> * gnu/packages.scm (strip-trailing-slash): New procedure.
>> (%patch-path): Use it to strip any trailing slash from the %load-path entries.
>> ---
>> gnu/packages.scm | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> How can this be reproduced, outside Geiser? I tried:
>
> ./pre-inst-env sh -c 'GUILE_LOAD_PATH=$PWD/:$GUILE_LOAD_PATH guix build icecat -n'
>
> with an explicit trailing slash, but it doesn’t trigger the problem.
That's because %patch-path searches for a match in all of the entries in
GUILE_LOAD_PATH, and pre-inst-env added a correct version:
modified gnu/packages.scm
@@ -167,7 +167,7 @@ flags."
(if (string=? directory %distro-root-directory)
(string-append directory "/gnu/packages/patches")
directory))
- %load-path)))
+ (pk '%load-path %load-path))))
;;; (%load-path ("/home/maxim/src/guix/" "/home/maxim/src/guix"
"/home/maxim/src/guix"
"/gnu/store/dgnjvl87m41rmlcgskl9w1lq47wi77i3-profile/share/guile/site/3.0"
"/gnu/store/9c4l0pj3rz2kgr984fqxa8fwblkllnz1-profile/share/guile/site/3.0"
[...]
"/gnu/store/ah16zr8mmfkqy23rr7jy5a842ca1q9h1-guile-3.0.4/share/guile"))
The following should reproduce it:
$ GUILE_LOAD_PATH=$PWD/:$GUILE_LOAD_PATH GUILE_LOAD_COMPILED_PATH=$PWD:$GUILE_LOAD_COMPILED_PATH guile -c '(use-modules (gnu packages linux))'
Backtrace:
In ice-9/boot-9.scm:
3393:24 19 (_)
222:29 18 (map1 (((guix licenses) #:select (lgpl2.0+)) ((guix packages)) ((guix download)) ((guix build-system cmake)) ((guix build-system gnu)) ((gnu packages)) ((gnu packages freedesktop)) ((gnu # #)) # …))
222:29 17 (map1 (((guix packages)) ((guix download)) ((guix build-system cmake)) ((guix build-system gnu)) ((gnu packages)) ((gnu packages freedesktop)) ((gnu packages glib)) ((gnu packages gtk)) ((# …)) …))
222:29 16 (map1 (((guix download)) ((guix build-system cmake)) ((guix build-system gnu)) ((gnu packages)) ((gnu packages freedesktop)) ((gnu packages glib)) ((gnu packages gtk)) ((gnu packages gnuzilla)) …))
222:29 15 (map1 (((guix build-system cmake)) ((guix build-system gnu)) ((gnu packages)) ((gnu packages freedesktop)) ((gnu packages glib)) ((gnu packages gtk)) ((gnu packages gnuzilla)) ((gnu packages …)) …))
222:29 14 (map1 (((guix build-system gnu)) ((gnu packages)) ((gnu packages freedesktop)) ((gnu packages glib)) ((gnu packages gtk)) ((gnu packages gnuzilla)) ((gnu packages linux)) ((gnu packages nss)) # …))
222:29 13 (map1 (((gnu packages)) ((gnu packages freedesktop)) ((gnu packages glib)) ((gnu packages gtk)) ((gnu packages gnuzilla)) ((gnu packages linux)) ((gnu packages nss)) ((gnu packages perl)) ((…)) …))
222:29 12 (map1 (((gnu packages freedesktop)) ((gnu packages glib)) ((gnu packages gtk)) ((gnu packages gnuzilla)) ((gnu packages linux)) ((gnu packages nss)) ((gnu packages perl)) ((gnu packages #)) (#) #))
222:29 11 (map1 (((gnu packages glib)) ((gnu packages gtk)) ((gnu packages gnuzilla)) ((gnu packages linux)) ((gnu packages nss)) ((gnu packages perl)) ((gnu packages pkg-config)) ((gnu packages qt)) ((…))))
222:29 10 (map1 (((gnu packages gtk)) ((gnu packages gnuzilla)) ((gnu packages linux)) ((gnu packages nss)) ((gnu packages perl)) ((gnu packages pkg-config)) ((gnu packages qt)) ((gnu packages xml))))
222:17 9 (map1 (((gnu packages gnuzilla)) ((gnu packages linux)) ((gnu packages nss)) ((gnu packages perl)) ((gnu packages pkg-config)) ((gnu packages qt)) ((gnu packages xml))))
3297:17 8 (resolve-interface (gnu packages gnuzilla) #:select _ #:hide _ #:prefix _ #:renamer _ #:version _)
In ice-9/threads.scm:
390:8 7 (_ _)
In ice-9/boot-9.scm:
3223:13 6 (_)
In ice-9/threads.scm:
390:8 5 (_ _)
In ice-9/boot-9.scm:
3507:20 4 (_)
2806:4 3 (save-module-excursion #<procedure 7f27e7785030 at ice-9/boot-9.scm:3508:21 ()>)
3527:26 2 (_)
In unknown file:
1 (primitive-load-path "gnu/packages/gnuzilla" #<procedure 7f27e7795aa0 at ice-9/boot-9.scm:3514:37 ()>)
In gnu/packages/gnuzilla.scm:
598:23 0 (_)
gnu/packages/gnuzilla.scm:598:23: ERROR:
1. &formatted-message:
format: "~a: patch not found\n"
arguments: ("icecat-use-older-reveal-hidden-html.patch")
Thanks!
Maxim
prev parent reply other threads:[~2020-10-27 16:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 17:36 bug#43818: Use of local-file in icecat-source definition breaks REPL Maxim Cournoyer
2020-10-05 17:39 ` Maxim Cournoyer
2020-10-24 4:55 ` Maxim Cournoyer
[not found] ` <handler.43818.D43818.160351533211096.notifdone@debbugs.gnu.org>
2020-10-25 2:14 ` bug#43818: Use of local-file in icecat-source definition breaks REPL) Maxim Cournoyer
2020-10-25 5:52 ` bug#43818: [PATCH] packages: Fix a bug in %patch-path Maxim Cournoyer
2020-10-26 23:15 ` Ludovic Courtès
2020-10-27 16:41 ` Maxim Cournoyer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874kmfy62j.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=43818@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).