`guix system build -n` to be more informative (builds/substitutes)

  • Open
  • quality assurance status badge
Details
3 participants
  • Vitaliy Shatrov
  • Mark H Weaver
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Vitaliy Shatrov
Severity
normal
V
V
Vitaliy Shatrov wrote on 6 Sep 2020 12:30
(name . Magst Tom tomaten?)(address . bug-guix@gnu.org)
87sgbv5ha8.fsf@disroot.org
Hello Guix.

I did:
`guix system build -n config.scm`

I get a message, something like:
"3 packages (guix, modules, and ?) would be downloaded."

I ran `sudo guix system build config.scm`. Guix told me it will build
the linux kernel. It was unexpected.

The `guix system build/reconfigure` upgrades the daemon first. Right?

So, if `guix` cannot know beforehand will the User get any substitutes..
Maybe:
* `guix` should stop and ask in case there is a build ahead?
* add a separate 'update-daemon-only' command (or flag) to `system`?


Background:
With `update-daemon-only`, one can just walk away. Then look-up, if any
builds are ahead. Of course i understood that the system-wide config
should be keept minimal. So not that big trouble: just i had an
substitute offered to me (for kernel), but (as `system build -n` didn't
warned me) decided to not use it (as i thought the kernel will not be
updated). When i found out that kernel actually going to be build, i
canceled it. Then switched to kernel that has substitute (same config,
different hash).


---
Thank You for the attention, Vitaliy.
R
R
Ricardo Wurmus wrote on 6 Sep 2020 12:43
(name . Vitaliy Shatrov)(address . guix.vits@disroot.org)(address . 43238@debbugs.gnu.org)
875z8rdw36.fsf@elephly.net
Vitaliy Shatrov <guix.vits@disroot.org> writes:

Toggle quote (11 lines)
> Hello Guix.
>
> I did:
> `guix system build -n config.scm`
>
> I get a message, something like:
> "3 packages (guix, modules, and ?) would be downloaded."
>
> I ran `sudo guix system build config.scm`. Guix told me it will build
> the linux kernel. It was unexpected.

Are these the same “guix” programs? “sudo guix” probably gives you the
root user’s “guix”, whereas just “guix” will give you the current user’s
“guix”.

That’s why we recommend “sudo -E guix” or similar.

--
Ricardo
V
V
Vitaliy Shatrov wrote on 6 Sep 2020 15:38
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 43238@debbugs.gnu.org)
87o8mj58kf.fsf@disroot.org
Hello Ricardo.

I made a typo: I do not need a root for `build`.

How it really was:

`guix system build -n config.scm`
---> 3 packages download

sudo guix system _RECONFIGURE_ config.scm
---> Hey-ho: building Linux!

C-c

edit config.scm, use kernel that has substitute.

guix build -n config.scm --substitute-url=URL
---> Will download Linux.

sudo guix sytem reconfugure config.scm
---> download, apply. ahm cool.


---
Am sorry, Vitaliy.
M
M
Mark H Weaver wrote on 6 Sep 2020 21:58
875z8qr81z.fsf@netris.org
Hi Vitaliy,

I reported this issue in April as bug #40612, so this is a duplicate.


That bug is still open, but it seems blocked on differences of opinion.

Mark
?