From mboxrd@z Thu Jan 1 00:00:00 1970 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 Subject: [bug#37722] [PATCH] python-build-system: Fix build of packages without sbin directory. Resent-Message-ID: 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 From: Jonathan Frederickson Date: Sat, 12 Oct 2019 18:54:04 -0400 Message-Id: <20191012225404.11901-1-jonathan@terracrypt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 37722@debbugs.gnu.org Cc: Jonathan Frederickson 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 -- 2.23.0