summaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-02-27 15:46:56 +0100
committerLudovic Courtès <ludo@gnu.org>2018-02-27 15:46:56 +0100
commit0fb405796cdb5579c911b30da9d40b4a18cd7f07 (patch)
treeb41063ef61ae25dfddd907b04661bd77f118a39d /tests/guix-package.sh
parent87b6305e72a0d96260716719b041bd7ae84ca230 (diff)
guix package: '--search' no longer shows superseded packages.
Fixes <https://bugs.gnu.org/30566>. Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>. * guix/scripts/package.scm (find-packages-by-description): Ignore superseded packages. * tests/guix-package.sh: Add test.
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index ffc8c64e24..760a2e4c9b 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
#
# This file is part of GNU Guix.
@@ -118,6 +118,22 @@ grep '^name: gnubg' "$tmpfile"
rm -f "$tmpfile"
+# Make sure deprecated packages don't show up: <https://bugs.gnu.org/30566>.
+mkdir "$module_dir"
+cat > "$module_dir/foo.scm"<<EOF
+(define-module (foo)
+ #:use-module (guix packages)
+ #:use-module (gnu packages base))
+
+(define-public deprecated
+ (deprecated-package "fileutils" coreutils))
+EOF
+
+guix build -L "$module_dir" -e '(@ (foo) deprecated)' -n
+test "`guix package -L "$module_dir" -s ^fileutils$ | grep ^name:`" = ""
+
+rm -rf "$module_dir"
+
# Make sure `--search' can display all the packages.
guix package --search="" > /dev/null