From patchwork Sat Oct 12 22:54:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Frederickson X-Patchwork-Id: 15708 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 61C091749C; Sat, 12 Oct 2019 23:55:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 282EC173D5 for ; Sat, 12 Oct 2019 23:55:11 +0100 (BST) Received: from localhost ([::1]:36436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJQI2-0004Xu-Hb for patchwork@mira.cbaines.net; Sat, 12 Oct 2019 18:55:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42862) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJQHv-0004Wj-Gi for guix-patches@gnu.org; Sat, 12 Oct 2019 18:55:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJQHu-0000UI-Fg for guix-patches@gnu.org; Sat, 12 Oct 2019 18:55:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53859) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJQHu-0000U6-Cc for guix-patches@gnu.org; Sat, 12 Oct 2019 18:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iJQHu-0004st-6E for guix-patches@gnu.org; Sat, 12 Oct 2019 18:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37722] [PATCH] python-build-system: Fix build of packages without sbin directory. Resent-From: Jonathan Frederickson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Oct 2019 22:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37722 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37722@debbugs.gnu.org Cc: Jonathan Frederickson X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157092086718725 (code B ref -1); Sat, 12 Oct 2019 22:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Oct 2019 22:54:27 +0000 Received: from localhost ([127.0.0.1]:34447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJQHL-0004rx-Gr for submit@debbugs.gnu.org; Sat, 12 Oct 2019 18:54:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:59588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJQHJ-0004ro-97 for submit@debbugs.gnu.org; Sat, 12 Oct 2019 18:54:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42820) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJQHH-0004RA-Q3 for guix-patches@gnu.org; Sat, 12 Oct 2019 18:54:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJQHG-0000Fk-L3 for guix-patches@gnu.org; Sat, 12 Oct 2019 18:54:23 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:58795) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iJQHG-0000Ex-4R for guix-patches@gnu.org; Sat, 12 Oct 2019 18:54:22 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 7FCE142C; Sat, 12 Oct 2019 18:54:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 12 Oct 2019 18:54:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=terracrypt.net; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=nIpmewpSMePR7YPtnS1RYBBOcY 16patrInRgWgwznOs=; b=gMeYoXzLk0ssPGJ4LuFo1NFgXnzJ1xAurVkgAQVP0z asx2PPGzxYRgisLkabe0CcCENMS6toa9/4GfACW3QGqzhUZpr6lhJJIXjvmLkOaV vAFTPGIwfZlpELPOUMA+yyWGgqarzgFw1wx4TrRdEl12G0MGqLmbNHcPSIKYqWJZ hzcX1I8hxZCxvhxaIvi7VlOU+CzLeh+q8UZhDlwEiqvK5HaWg3IVypSjOiwyjfrX SZW+Nqpf1uD/7DSx3aMniJMZ7opRyVvqHMfIvByXsQgvgvpLPaEz4Jr7A4pZ1xJO o5zeL/JfpMWhf2+0LeN1Ss/Rm/SdKqYWQvghN/8TFKtw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=nIpmewpSMePR7YPtn S1RYBBOcY16patrInRgWgwznOs=; b=Cvb2mR5fbY6qHhinTNDB8sDZv9RIneYIw RtiRjfT2znWYPVA8hhI5IpK3cYgGvePC9+q9MscsrDXrTaPwsb91+r6Q0zYJlpaW DQMVC3ewdcifXiPh1+UEfw/0RceDRLGm+APxb48f7ua91PS0PLVn/yy2ub9rw6hD /+aWDFzpPFk+wmD9e++R2PA5eVD7ZTj+ESZa/2TYhiN6FUlKn7v+Z8hlPCxwdBRL Z25l/eAI1H1iEwsM7tcIvKdsdxs1bWc3WZOt1e09ir0hyBiMmbYJrntvXtfQ8Ml/ FL6KOCKVvrMO0DUVnLgScCuJfflBqRF2QOCdGVkG01BQSlaWg8Xvw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrieekgdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpeflohhnrghthhgrnhcuhfhrvgguvghrihgtkhhsohhnuceojhhonhgr thhhrghnsehtvghrrhgrtghrhihpthdrnhgvtheqnecukfhppedutdekrdegrddvvdekrd dukeeknecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhnrghthhgrnhesthgvrhhrrggt rhihphhtrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from terrabase.lan (pool-108-4-228-188.phlapa.fios.verizon.net [108.4.228.188]) by mail.messagingengine.com (Postfix) with ESMTPA id 556658005B; Sat, 12 Oct 2019 18:54:18 -0400 (EDT) From: Jonathan Frederickson Date: Sat, 12 Oct 2019 18:54:04 -0400 Message-Id: <20191012225404.11901-1-jonathan@terracrypt.net> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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 Prior to this change, some packages (at least Ansible for example) would fail to build with an error like: starting phase `wrap' find-files: /gnu/store/va1qkgv1qwv1hy6iynzjafqshakqkjs7-ansible-2.8.1/sbin: No such file or directory That directory in the store contained a 'bin' directory, but not an 'sbin directory, and 'find-files' throws an error in that case. * guix/build/python-build-system.scm (list-of-files): Handle case in which directory passed as argument does not exist. --- guix/build/python-build-system.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 09bd8465c8..15c7d2e613 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -188,9 +188,11 @@ when running checks after installing the package." (define* (wrap #:key inputs outputs #:allow-other-keys) (define (list-of-files dir) - (find-files dir (lambda (file stat) - (and (eq? 'regular (stat:type stat)) - (not (wrapper? file)))))) + (if (not (directory-exists? dir)) + '() + (find-files dir (lambda (file stat) + (and (eq? 'regular (stat:type stat)) + (not (wrapper? file))))))) (define bindirs (append-map (match-lambda