aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-20 18:28:34 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-20 18:36:05 +0100
commit40bbcaa65d90a8c869d9732af26cb6ceb8e81ca8 (patch)
tree0504aaee347589c0d61143d6ca3465675eaf9f82
parent3b32891b12ee18c57b0fc346ed7dce8b6976066b (diff)
downloadguix-40bbcaa65d90a8c869d9732af26cb6ceb8e81ca8.tar
guix-40bbcaa65d90a8c869d9732af26cb6ceb8e81ca8.tar.gz
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?'.
-rw-r--r--guix/scripts/lint.scm20
1 files changed, 11 insertions, 9 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index e8cf2dc1ff..2314f3b28c 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -33,6 +33,7 @@
#:use-module (guix packages)
#:use-module (guix licenses)
#:use-module (guix records)
+ #:use-module (guix grafts)
#:use-module (guix ui)
#:use-module (guix upstream)
#:use-module (guix utils)
@@ -789,15 +790,16 @@ descriptions maintained upstream."
(condition-message c)))))
(with-store store
;; Disable grafts since it can entail rebuilds.
- (package-derivation store package system #:graft? #f)
-
- ;; If there's a replacement, make sure we can compute its
- ;; derivation.
- (match (package-replacement package)
- (#f #t)
- (replacement
- (package-derivation store replacement system
- #:graft? #f))))))
+ (parameterize ((%graft? #f))
+ (package-derivation store package system #:graft? #f)
+
+ ;; If there's a replacement, make sure we can compute its
+ ;; derivation.
+ (match (package-replacement package)
+ (#f #t)
+ (replacement
+ (package-derivation store replacement system
+ #:graft? #f)))))))
(lambda args
(emit-warning package
(format #f (G_ "failed to create ~a derivation: ~s")