lint: 'check-derivation' fully disables grafts.

Previously grafting could take place indirectly, for instance when
lowering origins.

* guix/scripts/lint.scm (check-derivation)[try]: Parameterize
'%graft?'.
This commit is contained in:
Ludovic Courtès 2018-11-20 18:28:34 +01:00
parent 3b32891b12
commit 40bbcaa65d
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 10 additions and 8 deletions

View File

@ -33,6 +33,7 @@
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix licenses) #:use-module (guix licenses)
#:use-module (guix records) #:use-module (guix records)
#:use-module (guix grafts)
#:use-module (guix ui) #:use-module (guix ui)
#:use-module (guix upstream) #:use-module (guix upstream)
#:use-module (guix utils) #:use-module (guix utils)
@ -789,6 +790,7 @@ descriptions maintained upstream."
(condition-message c))))) (condition-message c)))))
(with-store store (with-store store
;; Disable grafts since it can entail rebuilds. ;; Disable grafts since it can entail rebuilds.
(parameterize ((%graft? #f))
(package-derivation store package system #:graft? #f) (package-derivation store package system #:graft? #f)
;; If there's a replacement, make sure we can compute its ;; If there's a replacement, make sure we can compute its
@ -797,7 +799,7 @@ descriptions maintained upstream."
(#f #t) (#f #t)
(replacement (replacement
(package-derivation store replacement system (package-derivation store replacement system
#:graft? #f)))))) #:graft? #f)))))))
(lambda args (lambda args
(emit-warning package (emit-warning package
(format #f (G_ "failed to create ~a derivation: ~s") (format #f (G_ "failed to create ~a derivation: ~s")