From patchwork Tue Aug 22 16:52:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 53106 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 62BFB27BBEA; Tue, 22 Aug 2023 17:57:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EB02E27BBE2 for ; Tue, 22 Aug 2023 17:57:09 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYUfm-0004Zh-3f; Tue, 22 Aug 2023 12:56:06 -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 1qYUfi-0004WC-Af for guix-patches@gnu.org; Tue, 22 Aug 2023 12:56:02 -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 1qYUfg-0000uh-V3; Tue, 22 Aug 2023 12:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYUfi-0007jJ-CB; Tue, 22 Aug 2023 12:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v4 06/10] gnu-maintenance: Document nested procedures in 'import-html-release'. 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:02 +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.169272331129597 (code B ref 65230); Tue, 22 Aug 2023 16:56:02 +0000 Received: (at 65230) by debbugs.gnu.org; 22 Aug 2023 16:55:11 +0000 Received: from localhost ([127.0.0.1]:60342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYUes-0007h7-Ea for submit@debbugs.gnu.org; Tue, 22 Aug 2023 12:55:11 -0400 Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]:56432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYUen-0007fE-Nk for 65230@debbugs.gnu.org; Tue, 22 Aug 2023 12:55:06 -0400 Received: by mail-ua1-x931.google.com with SMTP id a1e0cc1a2514c-7a01d654111so1590807241.0 for <65230@debbugs.gnu.org>; Tue, 22 Aug 2023 09:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692723297; x=1693328097; 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=61VK4cF9u+X8ZZErKv6LBZiBDBUxDPdKiiK/7crSTqc=; b=Rfa9+IckAH6QATYNKzdvgi5iI96uUvSNFjSR7kYGGv+Jg734Yy1MPPS72klw/mX/lC y6jZV7TxrFHRbUSJNsjs+362IxLZtn7wmwvNTe2U5hC3pi6GU0HZ+90lfpRUUXTjiFaU iqkK/jDUcXaRDni5oaRpwv98hVr7Keue7gvGI3fdcJQTn2o7ri9vu0OFQfZcEwJHipOY CzU8Xq6lov6FUglVUFOoyWNfr41mkNKEMBy+HrWY3e+3s28vtYxhxOhpnKfZTQP1k6JU 8zoSHxpepbTmmZdp2Crk7kXgyoY7ZHSKH4rDm+/snjfh1B72oUGUEzE5py6GTNBQJiAJ duxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692723297; x=1693328097; 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=61VK4cF9u+X8ZZErKv6LBZiBDBUxDPdKiiK/7crSTqc=; b=gq++RKN+YTc+5UZ3xoC+ZDtdAi8cAK4VstbL5p/itchLxJhhKOxrW3ABOjZtxq7D/Q 7nDoHwJ/28wr/fe3ScrUGLsnZam1g5yYVReN2QNIz+S4VFqXAckO9CBVdaMfcpa1gbcu DCHs4rqX69FYjoHi9MqLnDodkO2WZqiiyWJKRypsH2iA8Rqq0+oYFmobEUkligNyW3P9 GK2OrICOWILpA7nFtyi/w8QnrqOll6xamsurIBHqor/zBhpkFpj+3VmGzN7s1z22PljM 6Z0MI+YQGsQNcAEGwe6qbY7+VBSDiwnnKGF/aFYdewYN0tUSzjPUOlE860vdr6mKBK3e uEtQ== X-Gm-Message-State: AOJu0Yy3Apvn6O9Ro9so95buwrbNCSJXMp9/L7paBBOc7OaEgLc9FixG 5cAf0MVPGhQsYjq6IHg2xqWpnJxYJiI= X-Google-Smtp-Source: AGHT+IGI17NVxCi/r3lU/pWEpreIrotOMrmPByNW+3c0zBesqISIz/B4drtsYp42JlnvMw44eCGqog== X-Received: by 2002:a67:db05:0:b0:44d:4f5a:7c5e with SMTP id z5-20020a67db05000000b0044d4f5a7c5emr5511922vsj.23.1692723296987; Tue, 22 Aug 2023 09:54:56 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 09:54:56 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 22 Aug 2023 12:52:23 -0400 Message-ID: <8933484dfaac3de2bb4dbc4f218c0b49cb9bda27.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 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/gnu-maintenance.scm (import-html-release): Add docstring to the 'file->signature/guess' and 'url->release' nested procedures. --- (no changes since v1) guix/gnu-maintenance.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index eea75095b5..6f08e2e295 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -514,6 +514,7 @@ (define* (import-html-release base-url package (string-append base-url directory "/"))) (links (url->links url))) (define (file->signature/guess url) + "Return the first link that matches a signature extension, else #f." (let ((base (basename url))) (any (lambda (link) (any (lambda (extension) @@ -524,6 +525,8 @@ (define* (import-html-release base-url package links))) (define (url->release url) + "Return an object if a release file was found at URL, +else #f." (let* ((base (basename url)) (base-url (string-append base-url directory)) (url (cond ((and=> (string->uri url) uri-scheme) ;full URL? @@ -574,7 +577,7 @@ (define* (import-html-release base-url package (() #f) ((first . _) (if version - ;; find matching release version and return it + ;; Find matching release version and return it. (find (lambda (upstream) (string=? (upstream-source-version upstream) version)) (coalesce-sources candidates))