unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Sent <richard@freakingpenguin.com>
To: 71641@debbugs.gnu.org
Subject: bug#71641: Improving the ability to build packages only when a substitute is available
Date: Tue, 18 Jun 2024 22:53:25 -0400	[thread overview]
Message-ID: <87cyodskwq.fsf@freakingpenguin.com> (raw)

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.




                 reply	other threads:[~2024-06-19  2:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87cyodskwq.fsf@freakingpenguin.com \
    --to=richard@freakingpenguin.com \
    --cc=71641@debbugs.gnu.org \
    /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).