guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#32102] [PATCH v2 1/2] build-system: python: Only wrap non-hidden ex


From: Clément Lassieur
Subject: [bug#32102] [PATCH v2 1/2] build-system: python: Only wrap non-hidden executable files.
Date: Fri, 13 Jul 2018 09:42:02 +0200
User-agent: mu4e 1.0; emacs 26.1

Arun Isaac <address@hidden> 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 <address@hidden>
>  ;;; Copyright © 2016 Hartmut Goebel <address@hidden>
>  ;;; Copyright © 2018 Ricardo Wurmus <address@hidden>
> +;;; Copyright © 2018 Arun Isaac <address@hidden>
>  ;;;
>  ;;; 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]