Subject: bug#43818: [PATCH] packages: Fix a bug in %patch-path.

From: Ludovic Courtès <[email-masked]>
Date: Tue, 27 Oct 2020 00:15:06 +0100

Hi,

Maxim Cournoyer <[email-masked]> 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.

Thanks,
Ludo’.