packages: 'package->bag' keys cache by replacement.
* guix/packages.scm (package->bag): When GRAFT? is true, use PACKAGE's replacement as the cache key. Remove GRAFT? from the list of secondary cache keys.
This commit is contained in:
parent
18c8a4396b
commit
9f78552996
|
@ -1029,15 +1029,15 @@ information in exceptions."
|
|||
#:key (graft? (%graft?)))
|
||||
"Compile PACKAGE into a bag for SYSTEM, possibly cross-compiled to TARGET,
|
||||
and return it."
|
||||
(let ((package (or (and graft? (package-replacement package))
|
||||
package)))
|
||||
(cached (=> %bag-cache)
|
||||
package (list system target graft?)
|
||||
package (list system target)
|
||||
;; Bind %CURRENT-SYSTEM and %CURRENT-TARGET-SYSTEM so that thunked
|
||||
;; field values can refer to it.
|
||||
(parameterize ((%current-system system)
|
||||
(%current-target-system target))
|
||||
(match (if graft?
|
||||
(or (package-replacement package) package)
|
||||
package)
|
||||
(match package
|
||||
((and self
|
||||
($ <package> name version source build-system
|
||||
args inputs propagated-inputs native-inputs
|
||||
|
@ -1061,7 +1061,7 @@ and return it."
|
|||
(package package)))
|
||||
(condition
|
||||
(&package-error
|
||||
(package package)))))))))))
|
||||
(package package))))))))))))
|
||||
|
||||
(define %graft-cache
|
||||
;; 'eq?' cache mapping package objects to a graft corresponding to their
|
||||
|
|
Loading…
Reference in New Issue