unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>, Csepp <raingloom@riseup.net>
Cc: 57315@debbugs.gnu.org
Subject: bug#57315: guix upgrade --dry-run output is basically useless
Date: Wed, 31 Aug 2022 14:29:42 +0200	[thread overview]
Message-ID: <865yi8d2a1.fsf@gmail.com> (raw)
In-Reply-To: <87k06odao5.fsf@gnu.org>

Hi,

Just to mention this report is somehow a duplicate of bug#40612 [1].
Maybe, they could be merged.  WDYT?

1: <https://issues.guix.gnu.org/issue/40612>


On Wed, 31 Aug 2022 at 11:28, Ludovic Courtès <ludo@gnu.org> wrote:

> I understand this is a source of confusion.  It has to do with “grafts”
> (which themselves are about applying security updates): if substitutes
> for a package are missing, Guix has a partial view of the dependency
> graph, which is why it can only tell you about extra builds/downloads
> later on in the process (it does report them, only later).
>
> (If you’re curious, see
> <https://guix.gnu.org/en/blog/2020/grafts-continued/> for details.)

Nice read!  Quoting:

        [...] do a first pass lowering packages to derivations as if
        grafting was disabled, build all these derivations, and then do
        a second pass to determine which packages in the graph need to
        be grafted and to compute the relevant grafting
        derivation. [...] If we reify that second pass to the user
        interface code, it also addresses the user interface issue by
        allowing it to display, possibly, two build plans: the
        “ungrafted” one followed by the grafted one.

Currently, these 2 plans are not well-exposed, IMHO.  What it is
expected (at least by me ;-)) when running “--dry-run” is to have a
picture about what would going on.  For example,

--8<---------------cut here---------------start------------->8---
$ guix package -i opensurge --dry-run
guix package: warning: Your Guix installation is 12 days old.
guix package: warning: Consider running 'guix pull' followed by
'guix package -u' to get up-to-date packages and security updates.

The following package would be installed:
   opensurge 0.5.2.1

substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
The following derivation would be built:
  /gnu/store/r89hmhbxwm3gs1jl2dhns7gnwvi2k6s1-opensurge-0.5.2.1.drv

42.1 MB would be downloaded
--8<---------------cut here---------------end--------------->8---

What does it mean?  Does it mean the substitute is missing?  Or does it
mean grafting is missing?  Does it mean I am going to download 42.1MB
and then a “quick” application of grafts?  Or does it mean I am going to
build from source the package and these 42.1MB correspond to source and
build-time dependencies?

When I run the option ’--dry-run’, I accept to pay a bit more and then
compute as much as possible of derivations to have the most complete as
possible graph to know beforehand and as accurately as possible:

 1. what I need to download as substitutes
 2. what I need to compile from source
 3. what require grafts, e.g.,

        require 1 graft for openal-1.20.1 ...
        require 4 grafts for sfml-2.5.1 ...
        require 6 grafts for mars-0.7.5.1.c855d04 ...

Sometime, the plan looks exactly like that.  Sometime, it is really
confusing and you have unpleasant surprises when running it.

Obviously, it is not as easy as it appears because of all the dynamic
dependencies are not straightforward to track ahead of time. ;-)
However, I also find the output of ’--dry-run’ not enough reliable and I
use a cross-finger* approach when I update. :-)


Cheers,
simon

*cross-finger approach: Running Debian, I cross my fingers when I
upgrade because many things can break and it is hard to roll back.
Running Guix, I cross my fingers because the dry-run does not tell me
some substitutes can be missing and then Guix automatically launches a
local build… which often ends by… a build failure.  Heh! No free
lunch. ;-)




  reply	other threads:[~2022-08-31 12:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21  6:39 bug#57315: guix upgrade --dry-run output is basically useless Csepp
2022-08-21  8:44 ` bdju via Bug reports for GNU Guix
2022-08-31  9:25   ` Ludovic Courtès
2022-08-31  9:28 ` Ludovic Courtès
2022-08-31 12:29   ` zimoun [this message]
2022-09-01 12:05     ` Ludovic Courtès
2022-09-01 17:19       ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=865yi8d2a1.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=57315@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=raingloom@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).