[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/06: describe: Work correctly on generation-less profiles.
From: |
Ludovic Courtès |
Subject: |
03/06: describe: Work correctly on generation-less profiles. |
Date: |
Tue, 18 Sep 2018 17:23:58 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 912adda316886cef5f3f870e53d607bf8d02222f
Author: Ludovic Courtès <address@hidden>
Date: Tue Sep 18 22:49:41 2018 +0200
describe: Work correctly on generation-less profiles.
Previously a command like:
$(readlink -f ~/.config/guix/current)/bin/guix describe
would succeed without printing anything.
* guix/scripts/describe.scm (display-profile-info): Don't call
'generation-file-name' when NUMBER is zero.
* guix/scripts/pull.scm (display-profile-content): Likewise.
---
guix/scripts/describe.scm | 6 ++++--
guix/scripts/pull.scm | 4 +++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index fdff07d..c1a20fe 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -134,8 +134,10 @@ in the format specified by FMT."
;; Show most recently installed packages last.
(reverse
(manifest-entries
- (profile-manifest (generation-file-name profile
- number)))))))))
+ (profile-manifest
+ (if (zero? number)
+ profile
+ (generation-file-name profile number))))))))))
(display-package-search-path fmt))
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 976e054..c0686f1 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -233,7 +233,9 @@ way and displaying details about the channel's source code."
;; Show most recently installed packages last.
(reverse
(manifest-entries
- (profile-manifest (generation-file-name profile number))))))
+ (profile-manifest (if (zero? number)
+ profile
+ (generation-file-name profile number)))))))
(define (indented-string str indent)
"Return STR with each newline preceded by IDENT spaces."
- branch master updated (32b3611 -> 20f8d73), Ludovic Courtès, 2018/09/18
- 01/06: store: Add another missing buffer flush., Ludovic Courtès, 2018/09/18
- 02/06: tests: Skip 'self-contained-tarball' test unconditionally., Ludovic Courtès, 2018/09/18
- 06/06: pull: Use /etc/ssl/certs by default if it exists and is non-empty., Ludovic Courtès, 2018/09/18
- 03/06: describe: Work correctly on generation-less profiles.,
Ludovic Courtès <=
- 04/06: gnu: Add guile-debbugs., Ludovic Courtès, 2018/09/18
- 05/06: pull: Assume 'set-tls-certificate-locations!' is available., Ludovic Courtès, 2018/09/18