From unknown Wed Jun 18 00:11:39 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#71641 <71641@debbugs.gnu.org> To: bug#71641 <71641@debbugs.gnu.org> Subject: Status: Improving the ability to build packages only when a substitute is available Reply-To: bug#71641 <71641@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:11:39 +0000 retitle 71641 Improving the ability to build packages only when a substitut= e is available reassign 71641 guix submitter 71641 Richard Sent severity 71641 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 22:55:58 2024 Received: (at submit) by debbugs.gnu.org; 19 Jun 2024 02:55:58 +0000 Received: from localhost ([127.0.0.1]:59097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJlUL-0003Hc-Qg for submit@debbugs.gnu.org; Tue, 18 Jun 2024 22:55:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:42264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJlUJ-0003HU-LQ for submit@debbugs.gnu.org; Tue, 18 Jun 2024 22:55:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJlSA-0004qk-7s for bug-guix@gnu.org; Tue, 18 Jun 2024 22:53:42 -0400 Received: from mail-108-mta130.mxroute.com ([136.175.108.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJlS8-0006pS-IR for bug-guix@gnu.org; Tue, 18 Jun 2024 22:53:41 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta130.mxroute.com (ZoneMTA) with ESMTPSA id 1902e69f2db00017a3.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 19 Jun 2024 02:53:33 +0000 X-Zone-Loop: 2341c61d1e7565f12918cbc731636212b2e1feec8556 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kBzACoZjvshK7OKqKyGxhH59kIy1JkUMMWlq57l+XcA=; b=Gst8UTUz+DcQglwBCGHHK46eCw 5WypC40aQl1CPcpLc1HpMuz6PMF+rtoIY0FLdf9dOb5AJUzJFeOzg+6N/4zm4Lh9Pu7Y1wnJ74NA5 c7tqgUsL9il0x6koZuKA1DzxzE5b3zByZ7gcjqIOO5gkzMXsK/yRLQsVBHCM4tSABLnnGlR+i/utv AjoOTcm/zwHzdWn8kl24VhO8eyT34kyTDG8+L/oDocLsjjIPU9+IVew5nljQM6VyrTiiody0UEWCT sMj/Ae+2+pOI8+OU2wu+2GO2VKJARa0jlHS4xV8/dmPFrjKU8MiNlfqZgv87UlaMZ9rYE1h/sbD6r O867Lr6w==; From: Richard Sent To: bug-guix@gnu.org Subject: Improving the ability to build packages only when a substitute is available Date: Tue, 18 Jun 2024 22:53:25 -0400 Message-ID: <87cyodskwq.fsf@freakingpenguin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.130; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta130.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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 =E2=80=98--fallback=E2=80=99 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") --=20 Take it easy, Richard Sent Making my computer weirder one commit at a time.