summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-07-03 13:49:28 +0200
committerLudovic Courtès <ludo@gnu.org>2018-07-03 17:50:04 +0200
commit86eee976f5ef21fa132de9827ad09a026bfdfd63 (patch)
tree9f34a6b4c4c08505666b9b9dda0ff556f0247342 /guix/packages.scm
parentf3f1d0a5578b4ad6d85494283eedfaa62b28fe2c (diff)
downloadgnu-guix-86eee976f5ef21fa132de9827ad09a026bfdfd63.tar
gnu-guix-86eee976f5ef21fa132de9827ad09a026bfdfd63.tar.gz
Revert "packages: Optimize 'package-transitive-supported-systems'."
This reverts commit 24420f5ffabfbdbe913a5765e5c00e17de18fb4c. This broke 'package-transitive-supported-systems', which would return the union of supported systems instead of the intersection.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm19
1 files changed, 9 insertions, 10 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index cd7d3b895c..c762fa7c39 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -766,16 +766,15 @@ in INPUTS and their transitive propagated inputs."
(mlambdaq (package)
"Return the intersection of the systems supported by PACKAGE and those
supported by its dependencies."
- (set->list
- (fold (lambda (input systems)
- (match input
- ((label (? package? p) . _)
- (fold set-insert systems
- (package-transitive-supported-systems p)))
- (_
- systems)))
- (list->set (package-supported-systems package))
- (bag-direct-inputs (package->bag package))))))
+ (fold (lambda (input systems)
+ (match input
+ ((label (? package? p) . _)
+ (lset-intersection
+ string=? systems (package-transitive-supported-systems p)))
+ (_
+ systems)))
+ (package-supported-systems package)
+ (bag-direct-inputs (package->bag package)))))
(define* (supported-package? package #:optional (system (%current-system)))
"Return true if PACKAGE is supported on SYSTEM--i.e., if PACKAGE and all its