From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mDkyEN2x6WCvXAEAgWs5BA (envelope-from ) for ; Sat, 10 Jul 2021 16:42:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KNvDC92x6WBvPgAA1q6Kng (envelope-from ) for ; Sat, 10 Jul 2021 14:42:37 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 573AB1DCE9 for ; Sat, 10 Jul 2021 16:42:36 +0200 (CEST) Received: from localhost ([::1]:39696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2EBf-0008Ck-Co for larch@yhetil.org; Sat, 10 Jul 2021 10:42:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2EAr-0007YQ-UZ for guix-devel@gnu.org; Sat, 10 Jul 2021 10:41:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34736) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2EAr-0003yu-Jg; Sat, 10 Jul 2021 10:41:45 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42900 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2EAr-0005DC-Bw; Sat, 10 Jul 2021 10:41:45 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Leo Famulari Subject: Re: guix weather exit status? References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Messidor an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 10 Jul 2021 16:41:44 +0200 In-Reply-To: (Leo Famulari's message of "Thu, 8 Jul 2021 16:35:03 -0400") Message-ID: <87r1g6b593.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625928157; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=QjXyX3n/XNICDXwIenWZm2IAJEIfpUiIXhS8xtvoxbU=; b=uCL7jcz7adY+4ygLcA/pG52sd/Qrj8fWiIrg4vuRQOl4ZIrTIKuIOVZR7f0ZNKAY+YM9AL y1N6lXpMZ2pe5wjK+TXQdJaG5LUE8CevwJefInBRn92KiQMCX6bjjEkJ6glg6RXWmAjtdI RRhG9v5lu0IxxXn82CpVjRtHgjQxYOvBdBZI/n7haF27eoJ4zIfTlrmc0KwNQFA/zgE1lF UWgwdLrAhAp5pVl/UJ7OUPDf+viDiJ18k3eyr5Rhe2X6MnW1KnQ8MArx1iMHVyz0Z4ERSw 8c66azmLDYS002NGANLMIRGcjiuSGPdhpdDw9RRbsUBU58/Gczhq3AaQP6hQfg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625928157; a=rsa-sha256; cv=none; b=gQDUPmsjC0qWd4UHq+dVCA17sR8bP1+dKn0L+Hj+Wok0uJjJmjtJ1rSNqJLuGsYL0OOmRZ n1kb7IM9JM4sE7pzOwjgwgqEut5JLMeg5gbluEkQD6EgzQGyzTw3YiT7IQx451Bs07FL3Q p+0j3pTUfhQINpmh9p19MPeEDYKu9Q2JCsCRhixRHnR0k5YaEbuMDhieOlbWhysp+esB/N G4DzS/FfqtbUxnCHSTtkxXmmx8dNxKLI4a9tGM6Xqs1MKT1NYx8ChgTHQsxhvnK0BZj92B 6+yEVXhvYmXkWrkxUSuUintwgCXx/y0/ZLfeGsH/cHDsu2Nv4skSZPE/ODLB7A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.90 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 573AB1DCE9 X-Spam-Score: -1.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: crvMRETRz1JH Hi! Leo Famulari skribis: > When a substitute is not available for all specified substitute servers, > `guix weather` exits with a return code of '1', signaling failure. > > For example: > > ------ > $ ./pre-inst-env guix weather linux-libre; echo $? > computing 1 package derivations for x86_64-linux... > looking for 1 store items on http://ci.guix.gnu.org... > http://ci.guix.gnu.org > 100.0% substitutes available (1 out of 1) > at least 234.8 MiB of nars (compressed) > 86.3 MiB on disk (uncompressed) > > 38 queued builds > aarch64-linux: 31 (81.6%) > powerpc64le-linux: 1 (2.6%) > armhf-linux: 1 (2.6%) > i686-linux: 5 (13.2%) > build rate: .00 builds per hour > x86_64-linux: 0.00 builds per hour > aarch64-linux: 0.00 builds per hour > i686-linux: 0.00 builds per hour > looking for 1 store items on http://bordeaux.guix.gnu.org... > http://bordeaux.guix.gnu.org > 0.0% substitutes available (0 out of 1) > unknown substitute sizes > 0.0 MiB on disk (uncompressed) > (continuous integration information unavailable) > 1 > ------ > > I expected it to return successfully because a substitute is available, > but I see that it could also make sense if "success" means that a > substitute is available from all servers. Quoth the manual (info "(guix) Invoking guix weather"): =E2=80=98guix weather=E2=80=99 exits with a non-zero code when the fracti= on of available substitutes is below 100%. > However, the current behaviour breaks the use case of "wait until a > substitute is available and then download it", like this for example: > > $ while true; do guix weather linux-libre && break; sleep 600; done; guix= build --no-grafts linux-libre > > I'm not sure if this topic was discussed previously... your thoughts? I agree we could change (or rather refine) semantics to exit with non-zero when overall coverage is below 100%. In the example above, it should return 0. Thanks, Ludo=E2=80=99.