ui: ‘show-what-to-build’ displays builds in topological order.

That gives something like:

  $ ./pre-inst-env guix build vim --no-grafts --no-substitutes -n
  The following derivations would be built:
    /gnu/store/…-tcsh-6.24.01.tar.gz.drv
    /gnu/store/…-tcsh-6.24.01.tar.zst.drv
    /gnu/store/…-tcsh-6.24.01.drv
    /gnu/store/…-vim-9.1.0744-checkout.drv
    /gnu/store/…-vim-9.1.0744.drv

… with the derivation(s) being asked for coming last.

* guix/ui.scm (show-what-to-build): Reverse ‘build/full’ before folding it.

Change-Id: Ic0da9f4f8a58c7ed5e2d10f6ec2226f0865aed75
This commit is contained in:
Ludovic Courtès 2024-10-22 15:14:48 +02:00
parent c62f8ab11f
commit f7a0be4d73
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1077,7 +1077,7 @@ summary, and level 0 shows nothing."
#:hook ,hook
#:build ,(cons file build))))))))
'(#:graft () #:hook () #:build ())
build/full)
(reverse! build/full)) ;preserve ordering
((#:graft graft #:hook hook #:build build)
(values graft hook build)))))
(define installed-size