unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Jonathan Frederickson <jonathan@terracrypt.net>
To: 37722@debbugs.gnu.org
Cc: Jonathan Frederickson <jonathan@terracrypt.net>
Subject: [bug#37722] [PATCH] python-build-system: Fix build of packages without sbin directory.
Date: Sat, 12 Oct 2019 18:54:04 -0400	[thread overview]
Message-ID: <20191012225404.11901-1-jonathan@terracrypt.net> (raw)

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

             reply	other threads:[~2019-10-12 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-12 22:54 Jonathan Frederickson [this message]
     [not found] ` <handler.37722.B.157092086718725.ack@debbugs.gnu.org>
2019-10-12 22:59   ` bug#37722: Acknowledgement ([PATCH] python-build-system: Fix build of packages without sbin directory.) Jonathan Frederickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191012225404.11901-1-jonathan@terracrypt.net \
    --to=jonathan@terracrypt.net \
    --cc=37722@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).