From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EPV+CLDo5GQ1fgEASxT56A (envelope-from ) for ; Tue, 22 Aug 2023 18:56:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6P+mB7Do5GQbRwAAG6o9tA (envelope-from ) for ; Tue, 22 Aug 2023 18:56:16 +0200 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 94E30631DF for ; Tue, 22 Aug 2023 18:56:15 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=ql+Aw2NN; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692723375; a=rsa-sha256; cv=none; b=aw1zg2EqpZXK+W0+XA+len+HOj3J74wpo+5pHlTD/kNAY0GCn3at7T4/3NuIdMw4+LLSk/ HQ3O7p0pdmtp2L3tTLiVTBH0vDQtjBOi11VdTMuE2jCTkF/1mGzDhJGDRCn6eXIZ1yXJFn Fs9YZNXJ4BuW6vPlVwdv3q4KE7YZRbA/klCL5RYaye/yv3K8VjfrfNWhX7rrnyTYqMyE+N P+nrUKEkLLpkPFfzaHOfdPsy5XKBFpOspwQZf4f4IWTiD+mlEfTDosuMXL2p+axHmuuW56 n2g0R49StujkOgN8FO8mrED1S/g0ONSFUEVfPhCZUwpMOEVpgMyTLXm4fSKQzg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=ql+Aw2NN; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692723375; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=BtJI2v2nDn53eCOhzE5C3dMTcRcZQX6u6tNJ2SraCbY=; b=YKBbbKMCNEsteZw12lPF9117zzC0e+ClRAIbXdPY9NQwirY9rZsWsUvggDkPzk/IldM5CJ 3t39ZfceUJ3eg6tEh1pmNGAzDEb3RqN8xLlvE66rCa/zxgDRHNROpSbuwruAVHBnn62GWY ac/4bG9ob8odyfRMPdUJZzL9ki941mjiRQYoeskFXByjnuA42x5/5WZUG99G+FVmLQ+UnA lsFpA60CNnYLWv/WgZUt4X5Usy6PMzH88im+J3UI2Hx6iGigi7CdFbTdwSRyFPv4UQ4oYO M9mB3zcc85cD8pHw4fDDH8Va5/EIVz2+vpPkuu1xYRWxfN06hjds3P32HIQ1Rw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYUfi-0004X9-UO; Tue, 22 Aug 2023 12:56:02 -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 1qYUfg-0004Uw-7L for guix-patches@gnu.org; Tue, 22 Aug 2023 12:56:00 -0400 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 1qYUff-0000uA-UN; Tue, 22 Aug 2023 12:55:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYUfh-0007j9-Uu; Tue, 22 Aug 2023 12:56:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v4 05/10] gnu-maintenance: Accept package object in 'import-html-release' procedure. Resent-From: Maxim Cournoyer 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: Tue, 22 Aug 2023 16:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65230 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65230@debbugs.gnu.org Cc: Maxim Cournoyer , 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 65230-submit@debbugs.gnu.org id=B65230.169272331029584 (code B ref 65230); Tue, 22 Aug 2023 16:56:01 +0000 Received: (at 65230) by debbugs.gnu.org; 22 Aug 2023 16:55:10 +0000 Received: from localhost ([127.0.0.1]:60340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYUer-0007gz-Ql for submit@debbugs.gnu.org; Tue, 22 Aug 2023 12:55:10 -0400 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]:62496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYUem-0007f0-N7 for 65230@debbugs.gnu.org; Tue, 22 Aug 2023 12:55:05 -0400 Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-76da1331db9so115455385a.0 for <65230@debbugs.gnu.org>; Tue, 22 Aug 2023 09:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692723295; x=1693328095; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BtJI2v2nDn53eCOhzE5C3dMTcRcZQX6u6tNJ2SraCbY=; b=ql+Aw2NNjGQrXgGMm/HTNLtyJ8cwiZFi2YUoX1UGH5Vk1AMzq7+bw9xP/VRyvB6B9m Ro5phweCyBFfwYS+erWuDkRqgW2vVTdkTGWtJuiai7uF7QCAx3TWBj1C8s3MxASbyLBp 3RPTlU05JFKm/NAqNKH2aKKRL6YQ/WBoa3zqr1cnk8+erjYrorzllYj2k9oU+0nO+srs M1NsAuxGqLxBqeRSU3+M8WUY5iqvSv44T5VExOFA8ld4mtthug947oag0/KzFVBnQoNk u7IIXpliD0diByxLSV7kooPrpsoQONBA0P/qg/a2hHfeNHL+aecjD+SWoetj56uZe7ph qPLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692723295; x=1693328095; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BtJI2v2nDn53eCOhzE5C3dMTcRcZQX6u6tNJ2SraCbY=; b=SgqGOhqfVSbViJtNYalSJxOWdey+9TJKZ0PTosPS95NVcJhBLylKm8J7NSqkEL7bEq wAmb5OwksKnuDNcUoDkmi9JLPfoMRurxWWeJnuJ3kCbxYhtWUBxQV0FIfLdBKbXYXNga zM2YLv2tvWJWYghY9IvU4mCbaJzs2TbEWulB94HwgDG8L6LnulnQlocn26ZQOydaHqIP UiU1ib2SpjB42Cq1e4+P44r75gB0uKzEe2He755Wgdlpd/+6Lb/Lx1IIh9Yn57xvaDfE ERnjiVj5FUYeNK0PaggLDCzslPL8rSttDssLdEkA93k3x/76WgDZrIv4rvrdGDsCi3UM 8orQ== X-Gm-Message-State: AOJu0YzVa87m+ty4HLpWggwvBRMWHLTg4omuFVPxhhcbOp+dCETv8F3S NKAKNRVoBhXyyytKp7nWI99Gb/oVdxo= X-Google-Smtp-Source: AGHT+IFybIgOZ6GrircjJXFSK2PhgfHR1seMbicvJUROjMwPEq+4hrdeJWcCEAovzc1Ym70aSez2vg== X-Received: by 2002:a05:620a:3955:b0:765:6923:623e with SMTP id qs21-20020a05620a395500b007656923623emr13322365qkn.29.1692723295143; Tue, 22 Aug 2023 09:54:55 -0700 (PDT) Received: from localhost.localdomain (dsl-158-129.b2b2c.ca. [66.158.158.129]) by smtp.gmail.com with ESMTPSA id p12-20020ae9f30c000000b007678973eaa1sm3336262qkg.127.2023.08.22.09.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 09:54:54 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 22 Aug 2023 12:52:22 -0400 Message-ID: <37557f6ed860610f81801a621b0aea0255d5750b.1692723147.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <06b6c57b1af15b6ddca780182fc4a5e5264a67db.1692723147.git.maxim.cournoyer@gmail.com> References: <06b6c57b1af15b6ddca780182fc4a5e5264a67db.1692723147.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 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-Scanner: mx0.migadu.com X-Spam-Score: -3.10 X-Migadu-Queue-Id: 94E30631DF X-Migadu-Spam-Score: -3.10 X-TUID: gg2dHbEsVzt4 This is in preparation for a new URL rewriting feature, which will need to have the current version information available. * guix/gnu-maintenance.scm (import-html-release): Update doc. Adjust default value of the DIRECTORY argument. Bind PACKAGE in lexical scope so that its value there is unchanged. (import-savannah-release, import-kernel.org-release) (import-html-updatable-release): Adjust accordingly. --- (no changes since v1) guix/gnu-maintenance.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 30792db60f..eea75095b5 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -494,11 +494,12 @@ (define (url->links url) (define* (import-html-release base-url package #:key (version #f) - (directory (string-append "/" package)) + (directory (string-append + "/" (package-upstream-name package))) file->signature) - "Return an for the latest release of PACKAGE (a string) -under DIRECTORY at BASE-URL, or #f. Optionally include a VERSION string to -fetch a specific version. + "Return an for the latest release of PACKAGE under +DIRECTORY at BASE-URL, or #f. Optionally include a VERSION string to fetch a +specific version. BASE-URL should be the URL of an HTML page, typically a directory listing as found on 'https://kernel.org/pub'. @@ -507,7 +508,8 @@ (define* (import-html-release base-url package if any. Otherwise, FILE->SIGNATURE must be a procedure; it is passed a source file URL and must return the corresponding signature URL, or #f it signatures are unavailable." - (let* ((url (if (string-null? directory) + (let* ((package (package-upstream-name package)) + (url (if (string-null? directory) base-url (string-append base-url directory "/"))) (links (url->links url))) @@ -730,7 +732,6 @@ (define* (import-savannah-release package #:key (version #f)) (match (origin-uri (package-source package)) ((? string? uri) uri) ((uri mirrors ...) uri)))) - (package (package-upstream-name package)) (directory (dirname (uri-path uri)))) ;; Note: We use the default 'file->signature', which adds ".sig", ".asc", ;; or whichever detached signature naming scheme PACKAGE uses. @@ -825,7 +826,6 @@ (define* (import-kernel.org-release package #:key (version #f)) (match (origin-uri (package-source package)) ((? string? uri) uri) ((uri mirrors ...) uri)))) - (package (package-upstream-name package)) (directory (dirname (uri-path uri)))) (import-html-release %kernel.org-base package #:version version @@ -873,8 +873,7 @@ (define* (import-html-updatable-release package #:key (version #f)) "://" (uri-host uri)))) (directory (if custom "" - (dirname (uri-path uri)))) - (package (package-upstream-name package))) + (dirname (uri-path uri))))) (false-if-networking-error (import-html-release base package #:version version -- 2.41.0