summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/scripts/package.scm3
-rw-r--r--tests/guix-package-aliases.sh3
2 files changed, 5 insertions, 1 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 21737f43da..f03741aa9e 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -764,7 +764,8 @@ processed, #f otherwise."
(('show requested-name)
(let-values (((name version)
(package-name->name+version requested-name)))
- (match (find-packages-by-name name version)
+ (match (remove package-superseded
+ (find-packages-by-name name version))
(()
(leave (G_ "~a~@[@~a~]: package not found~%") name version))
(packages
diff --git a/tests/guix-package-aliases.sh b/tests/guix-package-aliases.sh
index 9c038b99a5..4beed2e5b7 100644
--- a/tests/guix-package-aliases.sh
+++ b/tests/guix-package-aliases.sh
@@ -62,3 +62,6 @@ guix search '\<board\>' game | grep '^name: gnubg'
guix show --version
guix show guile
guix show python@3 | grep "^name: python"
+
+# "python@2" exists but is deprecated; make sure it doesn't show up.
+if guix show python@2; then false; else true; fi