diff options
Diffstat (limited to 'guix')
-rw-r--r-- | guix/profiles.scm | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm index 85c1722d62..b3732f61ed 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 |