GNU bug report logs - #71641
Improving the ability to build packages only when a substitute is available

Previous Next

Package: guix;

Reported by: Richard Sent <richard <at> freakingpenguin.com>

Date: Wed, 19 Jun 2024 02:56:01 UTC

Severity: normal

To reply to this bug, email your comments to 71641 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#71641; Package guix. (Wed, 19 Jun 2024 02:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Richard Sent <richard <at> freakingpenguin.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 19 Jun 2024 02:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Richard Sent <richard <at> freakingpenguin.com>
To: bug-guix <at> gnu.org
Subject: Improving the ability to build packages only when a substitute is
 available
Date: Tue, 18 Jun 2024 22:53:25 -0400
Hi Guix!

A question came up on IRC asking how to install package foo if and only
if foo has a substitute available on any server (in this case, foo may
be something like a web browser). This is different from the behavior of
--fallback. From [1]:

> Note that when substitutes are disabled or no substitute is available
> for the derivation in question, a local build will _always_ be
> performed, regardless of whether or not ‘--fallback’ was given.

The solution I came up with is "$ guix weather foo && guix install foo".
However, this unfortunately does not work with how guix weather reports
command success. Guix Weather returns nonzero if /any/ substitute server
is missing the substitute, not just one. This hurts the ability to use
guix weather in the context I described since false-negatives in
substitute availability are detected.

In my opinion "returning zero if any substitute server has foo
available" is more useful behavior than "returning zero if and only if
every substitute server has foo".

I propose adding a --strict flag or similar to Guix weather. By default,
Guix weather returns zero if any server has a substitute. With --strict,
the current behavior is used.

Alternatively, a cleaner but potentially more involved solution may be
adding a --only-substitutes or similar flag to all commands that can
initiate builds.

[1]: (info "(guix) Substitution Failure")

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.




This bug report was last modified 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.