summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2017-06-08 21:44:17 +0300
committerAlex Kost <alezost@gmail.com>2017-06-08 21:44:17 +0300
commit15ae0a08a72bf804a0ad684e10fd176f30953714 (patch)
tree099b2c47b781129bd353ded500f9e1c07f7e860f
parentelisp/ui-package: Add key bindings for several commands (diff)
downloadguix-wigust-15ae0a08a72bf804a0ad684e10fd176f30953714.tar.gz
elisp/ui-package: Support obsolete packages for size command
* elisp/guix-ui-package.el (guix-package-info-size): Display size for an output if package is obsolete.
-rw-r--r--elisp/guix-ui-package.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/elisp/guix-ui-package.el b/elisp/guix-ui-package.el
index a7c6d33..2e2d1bb 100644
--- a/elisp/guix-ui-package.el
+++ b/elisp/guix-ui-package.el
@@ -802,11 +802,16 @@ See `guix-find-location' for the meaning of DIRECTORY."
"Show size of the package ENTRY.
See `guix-package-size' for the meaning of TYPE."
(interactive
- (let ((entry (guix-read-package-entry-by-name)))
- (guix-package-entry-ensure-non-obsolete entry)
- (list entry
- (guix-read-package-size-type))))
- (guix-package-size (guix-package-entry->name-specification entry)
+ (list (guix-read-package-entry-by-name)
+ (guix-read-package-size-type)))
+ (guix-package-size (if (bui-entry-non-void-value entry 'obsolete)
+ ;; Take file name of the first output.
+ ;; FIXME It is better to ask for an output, if
+ ;; there are several outputs.
+ (bui-entry-value
+ (car (bui-entry-value entry 'installed))
+ 'file-name)
+ (guix-package-entry->name-specification entry))
type))
(defun guix-package-info-lint (entry &optional checkers)