unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#71641: Improving the ability to build packages only when a substitute is available
@ 2024-06-19  2:53 Richard Sent
  0 siblings, 0 replies; only message in thread
From: Richard Sent @ 2024-06-19  2:53 UTC (permalink / raw)
  To: 71641

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.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-19  2:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19  2:53 bug#71641: Improving the ability to build packages only when a substitute is available Richard Sent

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).