From patchwork Sun Jul 25 09:54:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 31594 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DF7E227BC78; Sun, 25 Jul 2021 10:55:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8BC1827BC6B for ; Sun, 25 Jul 2021 10:55:09 +0100 (BST) Received: from localhost ([::1]:59222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7aqi-00024F-JX for patchwork@mira.cbaines.net; Sun, 25 Jul 2021 05:55:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7aqc-000246-Lu for guix-patches@gnu.org; Sun, 25 Jul 2021 05:55:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7aqc-0005vl-9L for guix-patches@gnu.org; Sun, 25 Jul 2021 05:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7aqb-0004jH-Vc for guix-patches@gnu.org; Sun, 25 Jul 2021 05:55:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49597] [PATCH core-updates 00/15] Ajust packages to label-less input style Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Jul 2021 09:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49597 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49597@debbugs.gnu.org Cc: ludo@gnu.org Received: via spool by 49597-submit@debbugs.gnu.org id=B49597.162720687018138 (code B ref 49597); Sun, 25 Jul 2021 09:55:01 +0000 Received: (at 49597) by debbugs.gnu.org; 25 Jul 2021 09:54:30 +0000 Received: from localhost ([127.0.0.1]:47631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7aq6-0004iU-2W for submit@debbugs.gnu.org; Sun, 25 Jul 2021 05:54:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7aq2-0004iE-EW for 49597@debbugs.gnu.org; Sun, 25 Jul 2021 05:54:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34744) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7apw-0005Vt-8O; Sun, 25 Jul 2021 05:54:20 -0400 Received: from [2a01:e0a:19b:d9a0:45b5:a14a:5c75:5737] (port=36876 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7apw-0008Nd-0C; Sun, 25 Jul 2021 05:54:20 -0400 From: Mathieu Othacehe References: <20210716155009.32118-1-ludo@gnu.org> <87o8araiph.fsf@gnu.org> Date: Sun, 25 Jul 2021 11:54:18 +0200 In-Reply-To: <87o8araiph.fsf@gnu.org> ("Ludovic =?utf-8?q?Court=C3=A8s?= "'s message of "Sat, 24 Jul 2021 16:29:30 +0200") Message-ID: <877dhehg6t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hey Ludo, > I went ahead and pushed as d468a03a00738bb0742148e056f7a557aae08f2f. The CI reports that core-updates evaluation is broken. That's because "search-input-file" expects a relative FILE whereas some calls, such as the one in the glib package provide an absolute one: --8<---------------cut here---------------start------------->8--- (search-input-file (or native-inputs inputs) (string-append "/bin/python" ,(version-major+minor (package-version python)))))))) --8<---------------cut here---------------end--------------->8--- We could edit all those calls to use relative FILE arguments. Another solution would be to make sure that search-input-file treats "/bin/python" and "bin/python" the same way as proposed in the attached patch. That would be consistent with search-input-directory that already accepts both "/include/xxx" and "include/xxx". WDYT? Thanks, Mathieu From 6920b87a9cb22c0a5c2ceaf6b6ca852a8e094732 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sun, 25 Jul 2021 11:43:05 +0200 Subject: [PATCH] build: utils: Trim trailing slashes from search-input-file input. Make sure that both: (search-input-file inputs "/bin/sh") and (search-input-file inputs "bin/sh") are supported. * guix/build/utils (search-input-file): Trim starting slash character from FILE. --- guix/build/utils.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index e7782d3e08..3beb7da67a 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -631,8 +631,11 @@ FILE must be a string like \"bin/sh\". If FILE is not found, an exception is raised." (match inputs (((_ . directories) ...) - (or (search-path directories file) - (raise (condition (&search-error (path directories) (file file)))))))) + ;; Accept both "bin/sh" and "/bin/sh" as FILE argument. + (let ((file (string-trim file #\/))) + (or (search-path directories file) + (raise + (condition (&search-error (path directories) (file file))))))))) (define (search-input-directory inputs directory) "Find a sub-directory named DIRECTORY among the INPUTS and return its -- 2.32.0