Revert "packages: Optimize 'package-transitive-supported-systems'."

This reverts commit 24420f5ffa.

This broke 'package-transitive-supported-systems', which would return
the union of supported systems instead of the intersection.
This commit is contained in:
Ludovic Courtès 2018-07-03 13:49:28 +02:00
parent f3f1d0a557
commit 86eee976f5
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 9 additions and 10 deletions

View File

@ -766,16 +766,15 @@ in INPUTS and their transitive propagated inputs."
(mlambdaq (package) (mlambdaq (package)
"Return the intersection of the systems supported by PACKAGE and those "Return the intersection of the systems supported by PACKAGE and those
supported by its dependencies." supported by its dependencies."
(set->list (fold (lambda (input systems)
(fold (lambda (input systems) (match input
(match input ((label (? package? p) . _)
((label (? package? p) . _) (lset-intersection
(fold set-insert systems string=? systems (package-transitive-supported-systems p)))
(package-transitive-supported-systems p))) (_
(_ systems)))
systems))) (package-supported-systems package)
(list->set (package-supported-systems package)) (bag-direct-inputs (package->bag package)))))
(bag-direct-inputs (package->bag package))))))
(define* (supported-package? package #:optional (system (%current-system))) (define* (supported-package? package #:optional (system (%current-system)))
"Return true if PACKAGE is supported on SYSTEM--i.e., if PACKAGE and all its "Return true if PACKAGE is supported on SYSTEM--i.e., if PACKAGE and all its