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 IIVZAbu1IWUyNgAAG6o9tA:P1 (envelope-from ) for ; Sat, 07 Oct 2023 21:47:07 +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 IIVZAbu1IWUyNgAAG6o9tA (envelope-from ) for ; Sat, 07 Oct 2023 21:47:07 +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 C571572D53 for ; Sat, 7 Oct 2023 21:47:06 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=lr6eywly; 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=1696708026; h=from:from:sender:sender:reply-to: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=4ztMqVeGh1sMQFn0vClzwxYldcAO+XBo06zMubuM/1c=; b=QgoYwB4hddnqYx5vW95EqGDaSWx+a225Xx8JaQY9zNHopMRLjUEs1hwP/JGuKZybjEWFVV H7Hgo+chuhaT8AVeOOmtzuTqM3K2JssMUB48UCt8bnJY718WP8THKZyOJHLDTHQt3GlJ5O 5FXKWeNjTv8x+pMEFVXgRtwTWKwwfkFp6YqxZBIcgsOaXWu85FNvLffH6eSTViW1xXhFQk Sp73MU9AOsvq4dvtH/jklgvs4yzqYErUOp+2Gxbrrz4FvdtQbscXbQs5/jDze7pgUYPBgk EBOEoDwAPKnDZ/SFQ3mydthPtEYAihSpuYRxH8V4HhG5cs9R7J3klq7TdhKCaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696708026; a=rsa-sha256; cv=none; b=KnDMXsaZitQgIH9cNXaJN3jH/vDaA0ggOGGEWJ3vpeN4G1fz44Wh51XZMN/DeHk7jF/MXQ f1j4VwIoxLXehrWcTUCo42PzYL3wMKdMJCp2DTSXU/rGQz4ujy4+tQUXs/Am+UdXM4OU7X WOmJnLkGSUEJ2xxCoI6TcxpWJuUXLCzmUedjNGJ0jrparRe6N1dgxJyD8Tq09Iyr4c9Zi8 u+fXpj44yJagMKT2eS7160g6GliWD13G9ixM82FDTSrM2xBnp/SzdRqc9wnOkGEdKFlh9b YRlRWGVJ4KkXCZwoqce0CYCFNCoec8gSBM6pY/XMEz5km+KsuzahKY6IMzhZvg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=lr6eywly; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpDG9-0000W1-1B; Sat, 07 Oct 2023 15:46:45 -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 1qpDG7-0000Vp-DZ for guix-patches@gnu.org; Sat, 07 Oct 2023 15:46:43 -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 1qpDG7-0008VA-5N for guix-patches@gnu.org; Sat, 07 Oct 2023 15:46:43 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpDGQ-0004Td-A4 for guix-patches@gnu.org; Sat, 07 Oct 2023 15:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66396] [PATCH] guix: Add case to Github url updater. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Oct 2023 19:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66396 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66396@debbugs.gnu.org Cc: Giacomo Leidi X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169670797217112 (code B ref -1); Sat, 07 Oct 2023 19:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Oct 2023 19:46:12 +0000 Received: from localhost ([127.0.0.1]:55970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpDFb-0004Rw-Gd for submit@debbugs.gnu.org; Sat, 07 Oct 2023 15:46:11 -0400 Received: from lists.gnu.org ([2001:470:142::17]:55088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpDFZ-0004Rg-Jr for submit@debbugs.gnu.org; Sat, 07 Oct 2023 15:46:10 -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 1qpDF9-0008JB-SX for guix-patches@gnu.org; Sat, 07 Oct 2023 15:45:44 -0400 Received: from confino.investici.org ([93.190.126.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpDF7-0008Or-5R for guix-patches@gnu.org; Sat, 07 Oct 2023 15:45:43 -0400 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4S2wkn04h4z118p; Sat, 7 Oct 2023 19:45:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1696707937; bh=4ztMqVeGh1sMQFn0vClzwxYldcAO+XBo06zMubuM/1c=; h=From:To:Cc:Subject:Date:From; b=lr6eywly9Q8nupDA4g8jB+EHHAC1Fxnb4NN3kh6UciSa0Rx00HLnI18Cq7UG9y8da sI6P4Dlf5m0FlsEFSiGqQeJ0r2PGfe+xgIte+DkkEeU8A2syqGQRa6DkleArro9F65 Wvnr9PgU+iF5VIIXtw8UDSQ1lNSdctzO+98GXnCg= Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4S2wkm6gnZz117w; Sat, 7 Oct 2023 19:45:36 +0000 (UTC) Date: Sat, 7 Oct 2023 21:45:11 +0200 Message-ID: <1ed23c30a7592facd1db4c28c0f3cfb908157d9e.1696707911.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=93.190.126.19; envelope-from=goodoldpaul@autistici.org; helo=confino.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches From: Giacomo Leidi via Guix-patches via 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-Migadu-Spam-Score: -6.72 X-Spam-Score: -6.72 X-Migadu-Queue-Id: C571572D53 X-TUID: sX6PBiSgZ7jb * guix/import/github.scm (updated-github-url)[updated-url]: Add additional heuristics to Github url updater. --- guix/import/github.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/guix/import/github.scm b/guix/import/github.scm index 7409c9a202..c5556d78ee 100644 --- a/guix/import/github.scm +++ b/guix/import/github.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2019 Efraim Flashner ;;; Copyright © 2022 Maxime Devos ;;; Copyright © 2022 Hartmut Goebel +;;; Copyright © 2023 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ (define-module (guix import github) #:use-module (ice-9 match) + #:use-module (ice-9 regex) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) @@ -96,6 +98,11 @@ (define (updated-github-url old-package new-version) url) (string-append prefix "/releases/download/" repo "-" new-version "/" repo "-" new-version ext)) + ((string-match (string-append "/releases/download/(v)?" version "/" + name ".*" ext "$") + url) + (string-replace-substring url version new-version)) + (#t #f))) ; Some URLs are not recognised. #f)) base-commit: 00a28bc435606dc98925fbae1ebe314881f35c90 -- 2.41.0