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>
Cc: 57315@debbugs.gnu.org, Csepp <raingloom@riseup.net>
Subject: bug#57315: guix upgrade --dry-run output is basically useless
Date: Thu, 01 Sep 2022 19:19:43 +0200	[thread overview]
Message-ID: <87y1v3t3kg.fsf@gmail.com> (raw)
In-Reply-To: <87mtbj47wv.fsf@gnu.org>

Hi,

Thanks for explaining.

On jeu., 01 sept. 2022 at 14:05, Ludovic Courtès <ludo@gnu.org> wrote:

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

Done.


>> $ 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
>>
>> What does it mean?
>
> That you’ll download 42M of dependencies and then build opensurge.
>
> “The following derivation would be built” is about building derivations
> that are not grafts.  For grafts, you would see “The following graft …”,
> and only at verbosity level 2 or more (see ‘show-what-to-build’).

Well, the UI does not appear clear to me.


>> 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.
>
> By definition, the whole plan cannot be known in advance in the presence
> of dynamic dependencies such as grafts, so it’s hard to do better.
>
> The way it’s implemented right now is not optimal strictly speaking in
> that we might bail out before we have a complete picture of everything
> that’s known statically beforehand.  In practice though I think it’s
> doing an okay job from that perspective.

Well, I understand that using the current implementation, it is not
possible to know the complete plan beforehand.  I agree that for most of
the cases, it is enough.

However, I still miss why it is not possible to compute the whole graph
of derivations.  This complete graph is potentially a bit expensive to
compute but I accept to paid this cost to have a better plan.


Cheers,
simon






      reply	other threads:[~2022-09-01 17:46 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
2022-09-01 12:05     ` Ludovic Courtès
2022-09-01 17:19       ` zimoun [this message]

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=87y1v3t3kg.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).