[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/06: profiles: Remove workaround for an old Guile 'scandir' bug.
From: |
Ludovic Courtès |
Subject: |
06/06: profiles: Remove workaround for an old Guile 'scandir' bug. |
Date: |
Thu, 20 Jul 2017 05:57:22 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit da036496406f60e591786f89e8a51ad75cb0e5c7
Author: Ludovic Courtès <address@hidden>
Date: Thu Jul 20 11:44:12 2017 +0200
profiles: Remove workaround for an old Guile 'scandir' bug.
* guix/profiles.scm (generation-numbers)[scandir]: Remove.
---
guix/profiles.scm | 34 ----------------------------------
1 file changed, 34 deletions(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 85c1722..b3732f6 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1313,40 +1313,6 @@ are cross-built for TARGET."
(define (generation-numbers profile)
"Return the sorted list of generation numbers of PROFILE, or '(0) if no
former profiles were found."
- (define* (scandir name #:optional (select? (const #t))
- (entry<? (@ (ice-9 i18n) string-locale<?)))
- ;; XXX: Bug-fix version introduced in Guile v2.0.6-62-g139ce19.
- (define (enter? dir stat result)
- (and stat (string=? dir name)))
-
- (define (visit basename result)
- (if (select? basename)
- (cons basename result)
- result))
-
- (define (leaf name stat result)
- (and result
- (visit (basename name) result)))
-
- (define (down name stat result)
- (visit "." '()))
-
- (define (up name stat result)
- (visit ".." result))
-
- (define (skip name stat result)
- ;; All the sub-directories are skipped.
- (visit (basename name) result))
-
- (define (error name* stat errno result)
- (if (string=? name name*) ; top-level NAME is unreadable
- result
- (visit (basename name*) result)))
-
- (and=> (file-system-fold enter? leaf down up skip error #f name lstat)
- (lambda (files)
- (sort files entry<?))))
-
(match (scandir (dirname profile)
(cute regexp-exec (profile-regexp profile) <>))
(#f ; no profile directory
- branch master updated (ab466d7 -> da03649), Ludovic Courtès, 2017/07/20
- 01/06: gnu: Update g-wrap to use guile-2.2., Ludovic Courtès, 2017/07/20
- 02/06: gnu: Add address@hidden, Ludovic Courtès, 2017/07/20
- 04/06: vm: Add a <virtual-machine> type and associated gexp compiler., Ludovic Courtès, 2017/07/20
- 03/06: gnu: Add premake4., Ludovic Courtès, 2017/07/20
- 06/06: profiles: Remove workaround for an old Guile 'scandir' bug.,
Ludovic Courtès <=
- 05/06: tests: Use 'virtual-machine' records instead of monadic procedures., Ludovic Courtès, 2017/07/20