size: Fix corner case with multiple items on the command line.
Fixes 'guix size foo bar' when 'foo' is in the local store and 'bar' isn't, which could lead to an incomplete requisite list. * guix/scripts/size.scm (requisites*): Partition ITEMS according to 'valid-path?'. Use 'substitutable-requisites' only on invalid items.
This commit is contained in:
parent
31c995f8af
commit
da2d893e32
|
@ -29,6 +29,7 @@
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-9)
|
#:use-module (srfi srfi-9)
|
||||||
#:use-module (srfi srfi-11)
|
#:use-module (srfi srfi-11)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
#:use-module (srfi srfi-34)
|
#:use-module (srfi srfi-34)
|
||||||
#:use-module (srfi srfi-37)
|
#:use-module (srfi srfi-37)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
@ -119,10 +120,12 @@ substitutes."
|
||||||
information available in the local store or using information about
|
information available in the local store or using information about
|
||||||
substitutes."
|
substitutes."
|
||||||
(lambda (store)
|
(lambda (store)
|
||||||
(guard (c ((nix-protocol-error? c)
|
(let-values (((local missing)
|
||||||
(values (substitutable-requisites store items)
|
(partition (cut valid-path? store <>) items)))
|
||||||
store)))
|
(values (delete-duplicates
|
||||||
(values (requisites store items) store))))
|
(append (requisites store local)
|
||||||
|
(substitutable-requisites store missing)))
|
||||||
|
store))))
|
||||||
|
|
||||||
(define (store-profile items)
|
(define (store-profile items)
|
||||||
"Return as a monadic value a list of <profile> objects representing the
|
"Return as a monadic value a list of <profile> objects representing the
|
||||||
|
|
Loading…
Reference in New Issue