bug-guix
[Top][All Lists]
Advanced

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

bug#35387: unpack phase in the gnu-build-system is sometimes non-determi


From: Ludovic Courtès
Subject: bug#35387: unpack phase in the gnu-build-system is sometimes non-deterministic
Date: Fri, 14 Jun 2019 23:43:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Ludovic Courtès <address@hidden> skribis:

> What about writing it like this:
>
>   (define (first-subdirectory directory)
>     "Return the file name of the first sub-directory of DIRECTORY."
>     (match (scandir directory
>                     (lambda (file)
>                       (and (not (member file '("." "..")))
>                            (file-is-directory? (string-append directory "/"
>                                                               file)))))
>       ((first . _) first)))
>
> The result will be deterministic since ‘scandir’ sorts entries.

Pushed as cfd4e4d06e3cda0f3eed8d6b9277ce53e55404b8 on ‘core-updates’.

Thanks,
Ludo’.





reply via email to

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