((name version output location _)
(format #t " ~a\t~a\t~a\t~a~%"
name version output location)))
- (manifest-packages
- (profile-manifest
- (format #f "~a-~a-link" profile number))))
+
+ ;; Show most recently installed packages last.
+ (reverse
+ (manifest-packages
+ (profile-manifest
+ (format #f "~a-~a-link" profile number)))))
(newline)))
(cond ((not (file-exists? profile)) ; XXX: race condition
(leave (_ "profile '~a' does not exist~%")
profile))
((string-null? pattern)
- (for-each list-generation
- (generation-numbers profile)))
+ (let ((numbers (generation-numbers profile)))
+ (if (equal? numbers '(0))
+ (exit 1)
+ (for-each list-generation numbers))))
((matching-generations pattern profile)
=>
- (cut for-each list-generation <>))
+ (lambda (numbers)
+ (if (null-list? numbers)
+ (exit 1)
+ (for-each list-generation numbers))))
(else
(leave (_ "invalid syntax: ~a~%")
pattern)))
(regexp-exec regexp name))
(format #t "~a\t~a\t~a\t~a~%"
name (or version "?") output path))))
- installed)
+
+ ;; Show most recently installed packages last.
+ (reverse installed))
#t))
(('list-available regexp)