From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ELXQCszg22REaAAASxT56A (envelope-from ) for ; Tue, 15 Aug 2023 22:32:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QHqaCszg22S+9AAAauVa8A (envelope-from ) for ; Tue, 15 Aug 2023 22:32:12 +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 C003630920 for ; Tue, 15 Aug 2023 22:32:11 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=l4ZfFXjD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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=1692131531; 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=fSvqP932FLPbM8fa3EzPSgM/uOJTV+oVvRl1fFsvuP4=; b=nRXqOxO9KTFZCLhcsMIXisxDLzT9VNVdM7JlP3X6HDhPboizSF1MK6/MQ4HpQlaB6t7ury flsRcXFebvpCmhUdEgS4R7zzpk9kmPUgL6hZ1w/UY/eFHNjHCMoTDcQr7z7o/hKbs5BP84 EtGXTUUd6o/v0cD/6wC3x1UZX9Ntg27JjuZARuRvTSizxaIEttBJUNXK8mxqCFZkN+z4/1 sVaPJWfBEpI3PFH3u5nyRfuRvXxZOO9KFAAAvnD3cbdJsFx5pwvwLs3D9zEZ2LZ6yBoYjs K7x49coyjJC42Ic2WVwnRMwa53tEyzysdcvcGj933ZSuOM3fanYkpQJGVj0Hng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=l4ZfFXjD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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=1692131531; a=rsa-sha256; cv=none; b=mdksUhH8Zlxh94Myy97fxcWQ341CZuyJS0sNGXkOLlJjgpU8Fz0EmOpkGy99A7Wsy7rJ0n RlrClr8YQWKdajBA2RfORZ0FGgsAATzdi1kMf2hye11V/ax12G2RmP6SQJ3/xBVaX+rb5/ hlU1qDzxI7rE2dr5cw7SA6fO9HRGsE2A8ZxwxoG1HUPiyGPt+fSLJVKaJfHPTGANwzuqH4 hdF/IOs8JhZaKFrwroaXNrPkTq+Ioqw89uA5U2XHT5EwpGt7FSuOnq2RYaRlxZmr4Yv+/v 16TTjazsEeCMgqyUexJM0VMYlh2WbIZG4Xu8tjvUJh+g+sYt6ALfSthB5zPbjQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i1-00054n-7c; Tue, 15 Aug 2023 16:32:09 -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 1qW0hy-000547-Mv for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:06 -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 1qW0hy-0008L4-Dc; Tue, 15 Aug 2023 16:32:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hw-0005gM-Qn; Tue, 15 Aug 2023 16:32:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 08/13] 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, 15 Aug 2023 20:32:04 +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.169213147721687 (code B ref 65230); Tue, 15 Aug 2023 20:32:04 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:17 +0000 Received: from localhost ([127.0.0.1]:36802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0hA-0005di-C6 for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:17 -0400 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:53667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h2-0005c3-Bx for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:08 -0400 Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-40fd6da0325so34925961cf.3 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131462; x=1692736262; 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=fSvqP932FLPbM8fa3EzPSgM/uOJTV+oVvRl1fFsvuP4=; b=l4ZfFXjDKbH5eSgpJ6KSO4j7T/90qWcPl0M/RyXF8k51XXi2NmAg4CM6LfOMgWMI+M Ap+cjwzE46KJacBXoA/dw+QZCnDh0yADeawwbIv1/w+U3eotdBNb50v+RWZP5NoUHtbz UxBcv0I5EUYzJY+1DVuMuIelGPxeYqJ+WHo+Da/lbIJrsMH/5ZtRfjfjFcFD2ikO142W odz2dSbGEOXdCGtrt+51IxJTz12LCNWPZQ9eT55vbcrqi8VzI/eFJLj4lre8D98SAKgp PDfAOmVCBO9bSTu9NMa1/4HtaPtrqo/SDWqyqWDekGLhlWyVIeBCkAMtd+yAhUVwSTJ0 +6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131462; x=1692736262; 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=fSvqP932FLPbM8fa3EzPSgM/uOJTV+oVvRl1fFsvuP4=; b=OZsG95aEil8Fjvf6bvdJt9jF7erhkRORv7GTerGOjZi0PgirJ469UghKG9s+Kphr/a WBX1jLdiX8JYlQ5G4tT/zOLdmdGowetg3PNkQer8/oaMAIG4mvpRnFS8Uoh98QV7DFdt VVqM1Wmnqh01prYrYj5lC6ur00KOBxvTFs42qfvMVyEt/RoijH+6e42+lPvW6U2aNXAR Uo68AY7uOYlJEYwSiRCl5Fx/fsqMLX4DFc24Dr6nFYnB0sXrcyi5fcS1a7+DSl5vQcgn jVdwKgh42wbAYvr2THoWuFcAilKCVniV5uCyXa2WdMk1Q3kuEae87Ke8P15mGQ6p81xT Hhzw== X-Gm-Message-State: AOJu0YxhZ4coQ0LdApsQT+lhjJ1fk7xoT7kuqX2BR7nOfMYbVl3KEa97 VfVq8ctMdn6YfGFuTm8OSHYu/H2NAB2Cwg== X-Google-Smtp-Source: AGHT+IEoCAOjW2WNk+73e18qhaj3JEB0L9qFpbu4HqA8MJJ8B7H1J8Rb35fezBUKWsnDXNaDK7SDww== X-Received: by 2002:ac8:7d12:0:b0:403:a262:7751 with SMTP id g18-20020ac87d12000000b00403a2627751mr20059423qtb.12.1692131462541; Tue, 15 Aug 2023 13:31:02 -0700 (PDT) Received: from localhost.localdomain (dsl-148-65.b2b2c.ca. [66.158.148.65]) by smtp.gmail.com with ESMTPSA id f26-20020ac86eda000000b0040fe13251dasm4021078qtv.83.2023.08.15.13.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:31:02 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:32 -0400 Message-ID: <4a7c49a38983592313b30522f57e7b6a1f0e67ae.1692131377.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.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-Spam-Score: -3.09 X-Spam-Score: -3.09 X-Migadu-Queue-Id: C003630920 X-Migadu-Scanner: mx2.migadu.com X-TUID: v22209zHWUFQ 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 67abbc1c5a..13d6c1c7f2 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 @@ -869,8 +869,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