summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-07-20 11:44:12 +0200
committerLudovic Courtès <ludo@gnu.org>2017-07-20 11:57:13 +0200
commitda036496406f60e591786f89e8a51ad75cb0e5c7 (patch)
tree128aab0514199820bc66f076fc390fdaf86a13dc
parent8b113790fa3bfd2300c737901ba161f079fedbdf (diff)
downloadguix-da036496406f60e591786f89e8a51ad75cb0e5c7.tar.gz
profiles: Remove workaround for an old Guile 'scandir' bug.
* guix/profiles.scm (generation-numbers)[scandir]: Remove.
-rw-r--r--guix/profiles.scm34
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