From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4PatKiETlV84GAAA0tVLHw (envelope-from ) for ; Sun, 25 Oct 2020 05:54:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cMxgJiETlV89MAAAbx9fmQ (envelope-from ) for ; Sun, 25 Oct 2020 05:54:41 +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 3E92C940111 for ; Sun, 25 Oct 2020 05:54:41 +0000 (UTC) Received: from localhost ([::1]:57558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWYzH-000760-Su for larch@yhetil.org; Sun, 25 Oct 2020 01:54:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWYyj-00075O-Kb for bug-guix@gnu.org; Sun, 25 Oct 2020 01:54:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWYyf-0000Jh-T5 for bug-guix@gnu.org; Sun, 25 Oct 2020 01:54:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWYyf-0000b6-Rn for bug-guix@gnu.org; Sun, 25 Oct 2020 01:54:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43818: [PATCH] packages: Fix a bug in %patch-path. References: <878sckk22g.fsf@gmail.com> In-Reply-To: <878sckk22g.fsf@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 25 Oct 2020 05:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43818 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 43818@debbugs.gnu.org Received: via spool by 43818-submit@debbugs.gnu.org id=B43818.16036052032232 (code B ref 43818); Sun, 25 Oct 2020 05:54:01 +0000 Received: (at 43818) by debbugs.gnu.org; 25 Oct 2020 05:53:23 +0000 Received: from localhost ([127.0.0.1]:35619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWYy2-0000Zw-Ly for submit@debbugs.gnu.org; Sun, 25 Oct 2020 01:53:22 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:47078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWYxz-0000Zg-Sa for 43818@debbugs.gnu.org; Sun, 25 Oct 2020 01:53:20 -0400 Received: by mail-io1-f66.google.com with SMTP id b15so6587767iod.13 for <43818@debbugs.gnu.org>; Sat, 24 Oct 2020 22:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HbDeNY4V9OEDsf6cun2TsuVlfBvGmcMKH7x1NI183K4=; b=lqBIzpBD4LZx0Tkq6duhqsFK9QIzoKlfBeE28olSElkaFznzJHkxPpJNZD7lXt2y+T vgqHUAX98QL/ihdhhE8pYsnW/ZD/qm8G8gaXyUBOiNlVwHGD+2qsmykVa9dpLcbvPoyQ KogWo/y7SC6jHLsxJOhfhF/l6zh4xAVDDGGFFPA4HmcDmwUjVYfXPfhqviW0tj137R4U JFhFPeZ1+kDCYP7JQW4/H9mPNy4UfSR6AH9pp4AqddLyD3sHsgjwYwzcEi0IApuf+gYX sKVrJzgv3f+rBsoVK5XseqXdAVpKftIFcMOQFFMAc8ZJvUA+ksb+SxDDoejM5pMYsU6I lpwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HbDeNY4V9OEDsf6cun2TsuVlfBvGmcMKH7x1NI183K4=; b=AR/SBFPt/cwlwbHL21VgSt8F6IVwupg0bl+IsQ62wBBV7dTVD1VT1umnQ6TImbhmUa VKHMNunJ+PZyAwdqvefFk4fj8LrSqUqhvZVMTQrTHaCWJAOTwwJQgTs8j4slC4MG5tfG hmfsMoYR/GTc0X79kkuXFlfSOe8w6KJ595XMlE/mmDcdz/NSOTrcm30IbmUR1YSxNZhN z1f6wWzI4iTZ1OhKspNlQimrr8vcb1XX6BYA8CLaDs2xd5E3Gsx4CVUQDdrZOam67GvG 9dtLjWbJ8h2+FJNlq64BdBL8IjvDtCkftXzX66QT0p2anQcUsinbC1yG67LqLHRRsWd/ xjyw== X-Gm-Message-State: AOAM530kMJwbViAE/fqlduVzDcLStqXFbj+J5oE0XcrmU0bWVv/ixQeJ YdbVLAN1DaMpRpmoXDUKs6z59UwP1U/adg== X-Google-Smtp-Source: ABdhPJxtlpV+r+ntGi4SiMAvSccc2KxBmj+9/lq0aWHtqfwfWdgWFIebSp1+nFA9NjjD688k/diAiQ== X-Received: by 2002:a05:6602:2b90:: with SMTP id r16mr6835800iov.31.1603605194086; Sat, 24 Oct 2020 22:53:14 -0700 (PDT) Received: from localhost.localdomain (dsl-159-173.b2b2c.ca. [66.158.159.173]) by smtp.gmail.com with ESMTPSA id p4sm3761561ilg.79.2020.10.24.22.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 22:53:13 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 25 Oct 2020 01:52:34 -0400 Message-Id: <20201025055234.19912-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=yes Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Cournoyer Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=lqBIzpBD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: 5lFoYiPjCFkS Fixes . 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(-) diff --git a/gnu/packages.scm b/gnu/packages.scm index ccfc83dd11..f5acbda897 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016, 2017 Alex Kost ;;; Copyright © 2016 Mathieu Lirzin +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -159,6 +160,12 @@ flags." %default-package-module-path channels-scm)))) +(define (strip-trailing-slash s) + ;; Strip the trailing slash of a string, if present. + (if (string-suffix? "/" s) + (string-drop-right s 1) + s)) + (define %patch-path ;; Define it after '%package-module-path' so that '%load-path' contains user ;; directories, allowing patches in $GUIX_PACKAGE_PATH to be found. @@ -167,7 +174,7 @@ flags." (if (string=? directory %distro-root-directory) (string-append directory "/gnu/packages/patches") directory)) - %load-path))) + (map strip-trailing-slash %load-path)))) ;; This procedure is used by Emacs-Guix up to 0.5.1.1, so keep it for now. ;; See . -- 2.28.0