From patchwork Sun Sep 13 05:45:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Tildesley X-Patchwork-Id: 24108 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 44F9727BBE7; Sun, 13 Sep 2020 06:47:18 +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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID, 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 E3CC627BBE8 for ; Sun, 13 Sep 2020 06:47:17 +0100 (BST) Received: from localhost ([::1]:35830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHKr7-0004Ro-1O for patchwork@mira.cbaines.net; Sun, 13 Sep 2020 01:47:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHKqs-0004Pu-Si for guix-patches@gnu.org; Sun, 13 Sep 2020 01:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHKqs-00027Y-KJ for guix-patches@gnu.org; Sun, 13 Sep 2020 01:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kHKqs-0000vw-Ig for guix-patches@gnu.org; Sun, 13 Sep 2020 01:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43367] [PATCH 2/5] utils: Rename wrapper? to wrapped-program?. Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 13 Sep 2020 05:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43367 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43367@debbugs.gnu.org Received: via spool by 43367-submit@debbugs.gnu.org id=B43367.15999759873506 (code B ref 43367); Sun, 13 Sep 2020 05:47:02 +0000 Received: (at 43367) by debbugs.gnu.org; 13 Sep 2020 05:46:27 +0000 Received: from localhost ([127.0.0.1]:49340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHKqJ-0000uT-Fm for submit@debbugs.gnu.org; Sun, 13 Sep 2020 01:46:27 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:50346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHKqG-0000tw-Sc for 43367@debbugs.gnu.org; Sun, 13 Sep 2020 01:46:25 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Bpz4p5cWPzQkmG for <43367@debbugs.gnu.org>; Sun, 13 Sep 2020 07:46:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1599975976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z2gxQwUEosdiIO6kGilY/BWyNTtagfYFScxJn3j9RLI=; b=ej51wAzD3S9Y6lmXVEAlZuO1ky4K4Gqvw54vvoLTAyRYbq4I9XL25CBlp9iIGCqCA/dmjv tDEcNncMwdCGT+9HsEX0Hvcy1DU+gOVoQhLYBtjbwWF1NTDobVnfXhzFMmaDfhdXkEagth O9NcWvHf5kN5S9ZXBtQIqReYBkfZva3CUO5pYiSjIem3fIeDkKzR7x1m5268RuDUxuqQgp rDCVWsEqQYy5CQkOfTFo4AoPd+qcfhiSOe1S6aIMdJiDY4ExDRDOsKavNyB+MSu81ZnqxU BbY3+4CIJeGbLbrgyXkeo66cKAtp0VeDe9WdsIEVyS+O54UypIqa3v5mtm+izQ== Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id LJcBWiW7319K for <43367@debbugs.gnu.org>; Sun, 13 Sep 2020 07:46:15 +0200 (CEST) From: Brendan Tildesley Date: Sun, 13 Sep 2020 15:45:54 +1000 Message-Id: <20200913054557.12911-2-mail@brendan.scot> In-Reply-To: <20200913054557.12911-1-mail@brendan.scot> References: <83311dc4-6e9b-e70b-e379-9993bfcd0554@brendan.scot> <20200913054557.12911-1-mail@brendan.scot> MIME-Version: 1.0 X-MBO-SPAM-Probability: * X-Rspamd-Score: 0.80 / 15.00 / 15.00 X-Rspamd-Queue-Id: CC504273 X-Rspamd-UID: 42e5da 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 * guix/build/utils.scm (wrap-program): The wrapper? procedure is incorrectly named as it actually checks to see if prog is the original program that was moved, not the wrapper. * guix/build/python-build-system: (wrap): Use renamed wrapped-program?. --- guix/build/python-build-system.scm | 2 +- guix/build/utils.scm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 62e7a7b305..d1dbbc1de2 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -196,7 +196,7 @@ when running checks after installing the package." (define (list-of-files dir) (find-files dir (lambda (file stat) (and (eq? 'regular (stat:type stat)) - (not (wrapper? file)))))) + (not (wrapped-program? file)))))) (define bindirs (append-map (match-lambda diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 822191f4de..4cd227a668 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -90,7 +90,7 @@ patch-/usr/bin/file fold-port-matches remove-store-references - wrapper? + wrapped-program? wrap-program wrap-script @@ -1118,8 +1118,8 @@ known as `nuke-refs' in Nixpkgs." (program wrap-error-program) (type wrap-error-type)) -(define (wrapper? prog) - "Return #t if PROG is a wrapper as produced by 'wrap-program'." +(define (wrapped-program? prog) + "Return #t if PROG is a program that was moved and wrapped by 'wrap-program'." (and (file-exists? prog) (let ((base (basename prog))) (and (string-prefix? "." base)