diff options
| author | Alex Kost <alezost@gmail.com> | 2017-06-08 21:44:17 +0300 |
|---|---|---|
| committer | Alex Kost <alezost@gmail.com> | 2017-06-08 21:44:17 +0300 |
| commit | 15ae0a08a72bf804a0ad684e10fd176f30953714 (patch) | |
| tree | 099b2c47b781129bd353ded500f9e1c07f7e860f | |
| parent | elisp/ui-package: Add key bindings for several commands (diff) | |
| download | guix-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.el | 15 |
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) |
