summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-03-01 18:04:12 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-03-01 18:04:12 +0100
commit86990eeda2a85acd3640059c0b681f1eddbacba0 (patch)
treedf0d4f0b86dad2b260b7354d451993c141dde5e7 /guix/scripts/package.scm
parent6d796220c417a34100c282a7fa1f9afb6ac00339 (diff)
parent52fb59ef253d9550ca4cfa095c2c0c2360d79095 (diff)
Merge branch 'master' into staging
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm16
1 files changed, 10 insertions, 6 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 617e102d93..d8b80efe8e 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -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>
;;; Copyright © 2013, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2016 Alex Kost <alezost@gmail.com>
@@ -247,11 +247,15 @@ specified in MANIFEST, a manifest object."
description matches at least one of REGEXPS sorted by relevance, and the list
of relevance scores."
(let ((matches (fold-packages (lambda (package result)
- (match (package-relevance package regexps)
- ((? zero?)
- result)
- (score
- (cons (list package score) result))))
+ (if (package-superseded package)
+ result
+ (match (package-relevance package
+ regexps)
+ ((? zero?)
+ result)
+ (score
+ (cons (list package score)
+ result)))))
'())))
(unzip2 (sort matches
(lambda (m1 m2)