From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GMPVEipiT2WwDgAAauVa8A:P1 (envelope-from ) for ; Sat, 11 Nov 2023 12:14:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GMPVEipiT2WwDgAAauVa8A (envelope-from ) for ; Sat, 11 Nov 2023 12:14:50 +0100 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 1323024E36 for ; Sat, 11 Nov 2023 12:14:50 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=UowlLCUA; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699701290; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=JYxmPq7qUnbhn9Yked+Ngy4QvrZBH5qNKIkDrdZ2UcA=; b=QbPl6Xfmk5cMcIkhQF6AUcTHKKTEUs70pmj2Ew8qxVV2RDkn6IYODSTH036P7m3rkCoqYv 05Chw9X3MER7oKbJLY/z+/tfuEoocbrU1HDbKNL9x9krcUp79NpAaZbl+YJRMVI0/9cP1U pM90JBm1YBYmrGtZmN6l1Mqj8aNKzwDzhSWio5qUKnmJTaQlYUhDI0SUnp0aTmtJwxBsiT Qx15zngVwy0dFYIAWFnWw03+69LQ3FskCgCQfaoBxq5y8Q4QivpJgGvqnCrvEHLJmgkMIp FHlYUuCChn3HNYmPczk+gD8GT2qrb1++dnEuK2W4QbBMmJ6PmpEiy/6Wphg3fA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=UowlLCUA; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699701290; a=rsa-sha256; cv=none; b=GxF9iZCZD1tiYpkZg8lxIa+oH9tF0Toj5wPbTJjPp1DwDUytP0n9xiVbztIxf2sfdrA9o8 Rqe2do6oYl/PDM0oWPdz9soqQF1gTVLmdwIg6TRYKVhwynYtrKI81FkwkrRukhjft5U3pB ITQPbr9K7BfGqT9zu2QtHfxST1XJ4aSAcCUc2CeGOeWbzavmCKnHbxSGfrFTQxCK5hyYvY XoRQ/u2VMMoChrsH0ZyBadR8SIdBMFozMes3lnNb8MAKMw++XRiIIWBRH61fPxaqz8TS8C zMW4Q3jwGT3rf1apk+vpZOSJg66NJREE4LNamKe/PXbAubBR6Cg3mbBbNbwybA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1lwZ-0004Vs-K5; Sat, 11 Nov 2023 06:14:27 -0500 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 1r1lwX-0004Um-OB for guix-patches@gnu.org; Sat, 11 Nov 2023 06:14:25 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1lwX-0002Fh-Eu; Sat, 11 Nov 2023 06:14:25 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1lx9-0005om-3l; Sat, 11 Nov 2023 06:15:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67072] [PATCH 3/4] weather: Use the same substitute URLs as guix-daemon. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sat, 11 Nov 2023 11:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67072 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67072@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 67072-submit@debbugs.gnu.org id=B67072.169970127222286 (code B ref 67072); Sat, 11 Nov 2023 11:15:03 +0000 Received: (at 67072) by debbugs.gnu.org; 11 Nov 2023 11:14:32 +0000 Received: from localhost ([127.0.0.1]:52181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1lwe-0005nJ-6Q for submit@debbugs.gnu.org; Sat, 11 Nov 2023 06:14:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1lwW-0005mS-Fv for 67072@debbugs.gnu.org; Sat, 11 Nov 2023 06:14:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1lvm-00026F-Tx; Sat, 11 Nov 2023 06:13:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=JYxmPq7qUnbhn9Yked+Ngy4QvrZBH5qNKIkDrdZ2UcA=; b=UowlLCUAvCq1yZnNmgDq CtFBfRem5FFIiyyR6ER8AUpr4pt2cTNw9oojeO1tMSCMgCFvLHnO91opfyo4qf2MlLx5uygtbBxX5 1LivVrXeMj8yV66cffbe+zZ8DUKmBQFa9t842TZZzwAazPwEi8Khi9ZROZDcIyL6rRqTfjdrMThFx uuAa+KB5XMQ81SW/vgWRCDRfPUl86Isz/KLZ47nhi2eOS3aL1yxL9QdE2qKkfCgDRKEDaN/CFno4y XQss1ENcmR5D1njGMh+nVSPyXuWj5XZrpCl2KV2pktxHUAYep3qgm/syWJZUPRtxgwk8Qk5pa7vs1 oqMuS7MdmzRKMg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sat, 11 Nov 2023 12:06:25 +0100 Message-ID: <83a9b5b296b321d2be9fcd44391252c4efed7cff.1699700049.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.31 X-Spam-Score: -4.31 X-Migadu-Queue-Id: 1323024E36 X-Migadu-Scanner: mx10.migadu.com X-TUID: XPJpjRAv6/h1 * guix/scripts/weather.scm (%default-options): Remove ‘substitute-urls’. (guix-weather): Call ‘substitute-urls’ when OPTS doesn’t have it. Warn when ‘substitute-urls’ returns #f. * doc/guix.texi (Invoking guix weather): Adjust accordingly. Change-Id: I3e9100074f2ad559e5c408660db70430d64f2bef --- doc/guix.texi | 5 +++-- guix/scripts/weather.scm | 12 +++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9f06f1c325..028c4f3357 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16462,8 +16462,9 @@ Invoking guix weather @table @code @item --substitute-urls=@var{urls} @var{urls} is the space-separated list of substitute server URLs to -query. When this option is omitted, the default set of substitute -servers is queried. +query. When this option is omitted, the URLs specified with the +@option{--substitute-urls} option of @command{guix-daemon} are used or, +as a last resort, the default set of substitute URLs. @item --system=@var{system} @itemx -s @var{system} diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm index 140df3435f..7e302fcea7 100644 --- a/guix/scripts/weather.scm +++ b/guix/scripts/weather.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017-2022 Ludovic Courtès +;;; Copyright © 2017-2023 Ludovic Courtès ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2018 Kyle Meyer ;;; Copyright © 2020 Simon Tournier @@ -391,7 +391,7 @@ (define %options %standard-native-build-options)) (define %default-options - `((substitute-urls . ,%default-substitute-urls))) + '()) (define (load-manifest file) "Load the manifest from FILE and return the list of packages it refers to." @@ -582,7 +582,13 @@ (define-command (guix-weather . args) (let* ((opts (parse-command-line args %options (list %default-options) #:build-options? #f)) - (urls (assoc-ref opts 'substitute-urls)) + (urls (or (assoc-ref opts 'substitute-urls) + (with-store store + (substitute-urls store)) + (begin + (warning (G_ "could not determine current \ +substitute URLs; using defaults~%")) + %default-substitute-urls))) (systems (match (filter-map (match-lambda (('system . system) system) (_ #f)) -- 2.41.0