GNU bug report logs -
#32102
[PATCH] utils: Fix wrap-program filename generation.
Previous Next
Reported by: Arun Isaac <arunisaac <at> systemreboot.net>
Date: Mon, 9 Jul 2018 01:32:02 UTC
Severity: normal
Tags: patch
Done: Arun Isaac <arunisaac <at> systemreboot.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Arun Isaac <arunisaac <at> systemreboot.net> writes:
> * guix/build/python-build-system.scm (wrap): Only wrap non-hidden executable
> files. This prevents wrapped executables from being wrapped once again.
> ---
> guix/build/python-build-system.scm | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
> index 376ea81f1..37e35eec0 100644
> --- a/guix/build/python-build-system.scm
> +++ b/guix/build/python-build-system.scm
> @@ -5,6 +5,7 @@
> ;;; Copyright © 2015, 2018 Mark H Weaver <mhw <at> netris.org>
> ;;; Copyright © 2016 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
> ;;; Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
> +;;; Copyright © 2018 Arun Isaac <arunisaac <at> systemreboot.net>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -189,7 +190,11 @@ when running checks after installing the package."
> (map (cut string-append dir "/" <>)
> (or (scandir dir (lambda (f)
> (let ((s (stat (string-append dir "/" f))))
> - (eq? 'regular (stat:type s)))))
> + (and (eq? 'regular (stat:type s))
> + ;; Only wrap non-hidden files. This
> + ;; prevents wrapped executables from being
> + ;; wrapped again.
> + (not (string-prefix? "." f))))))
> '())))
>
> (define bindirs
What about adding a function like 'is-wrapped?'? Because it could be
used somewhere else, and it would make the code self-descriptive.
It would check that the name looks like .xxx-real, and also check that
xxx exists. (And check that it's an executable.)
WDYT?
Clément
This bug report was last modified 6 years and 256 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.