GNU bug report logs -
#37722
[PATCH] python-build-system: Fix build of packages without sbin directory.
Previous Next
Full log
View this message in rfc822 format
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
This bug report was last modified 5 years and 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.