From unknown Tue Aug 19 10:00:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#75418 <75418@debbugs.gnu.org> To: bug#75418 <75418@debbugs.gnu.org> Subject: Status: [PATCH] import: git: Do not search pre-release words in tag prefix. Reply-To: bug#75418 <75418@debbugs.gnu.org> Date: Tue, 19 Aug 2025 17:00:38 +0000 retitle 75418 [PATCH] import: git: Do not search pre-release words in tag p= refix. reassign 75418 guix-patches submitter 75418 iyzsong@envs.net severity 75418 normal tag 75418 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 07 01:13:51 2025 Received: (at submit) by debbugs.gnu.org; 7 Jan 2025 06:13:51 +0000 Received: from localhost ([127.0.0.1]:41505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tV2qZ-0002vE-FP for submit@debbugs.gnu.org; Tue, 07 Jan 2025 01:13:51 -0500 Received: from lists.gnu.org ([2001:470:142::17]:52930) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tV2qT-0002um-B2 for submit@debbugs.gnu.org; Tue, 07 Jan 2025 01:13:45 -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 1tV2qL-00033C-UK for guix-patches@gnu.org; Tue, 07 Jan 2025 01:13:33 -0500 Received: from mail.envs.net ([5.199.136.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tV2qJ-0008K5-PM for guix-patches@gnu.org; Tue, 07 Jan 2025 01:13:33 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 4F75538A3E06; Tue, 7 Jan 2025 06:13:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id s1J8j6YXfxDD; Tue, 7 Jan 2025 06:13:21 +0000 (UTC) Received: from localhost (unknown [112.44.107.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Tue, 7 Jan 2025 06:13:20 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 602a840f; Tue, 7 Jan 2025 06:16:32 +0000 (UTC) From: iyzsong@envs.net To: guix-patches@gnu.org Subject: [PATCH] import: git: Do not search pre-release words in tag prefix. Date: Tue, 7 Jan 2025 14:16:28 +0800 Message-ID: <98d422b8ec544458719b20d6a8ff85cc1f681f10.1736230582.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 X-Debbugs-Cc: 宋文武 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=5.199.136.28; envelope-from=iyzsong@envs.net; helo=mail.envs.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) From: 宋文武 This fixes tags like 'xfce4-dev-tools-4.20.0'. * tests/import-git.scm ("latest-git-tag-version: prefix contains pre-release words"): New test. * guix/import/git.scm (latest-tag): Don't filter out pre-releases tags. (version-mapping): Filter out pre-releases tags from versions. * gnu/packages/xfce.scm (garcon, thunar-archive-plugin, xfce4-dev-tools): Remove FIXME comments for the 'generic-git' updater. Change-Id: I7683200fa451d7fad153aa08fa9d5761688de01d --- gnu/packages/xfce.scm | 3 --- guix/import/git.scm | 17 +++++++++-------- tests/import-git.scm | 9 +++++++++ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm index c5e5009ccf..95520b9c22 100644 --- a/gnu/packages/xfce.scm +++ b/gnu/packages/xfce.scm @@ -374,7 +374,6 @@ (define-public garcon library called libxfce4menu, which, in contrast to garcon, was lacking menu merging features essential for loading menus modified with menu editors.") (license lgpl2.0+) - ;; FIXME: the 'generic-git' updater treat "rc" as pre-releases. (properties `((release-tag-prefix . ,(string-append name "-")))))) (define-public tumbler @@ -894,7 +893,6 @@ (define-public thunar-archive-plugin (description "The Thunar Archive Plugin allows you to create and extract archive files using the file context menus in the Thunar file manager.") (license gpl2+) - ;; FIXME: the 'generic-git' updater treat "rc" as pre-releases. (properties `((release-tag-prefix . ,(string-append name "-")))))) (define-public thunar-shares-plugin @@ -2417,5 +2415,4 @@ (define-public xfce4-dev-tools developers and people that want to build Xfce from Git In addition it contains the Xfce developer's handbook.") (license gpl2+) - ;; FIXME: the 'generic-git' updater treat "dev" as pre-releases. (properties `((release-tag-prefix . ,(string-append name "-")))))) diff --git a/guix/import/git.scm b/guix/import/git.scm index ab51719255..305b2fc43f 100644 --- a/guix/import/git.scm +++ b/guix/import/git.scm @@ -138,9 +138,16 @@ (define* (version-mapping tags #:key prefix suffix delim pre-releases?) (define (entry tag) + %pre-release-rx)) + (stable-sort (filter-map (lambda (tag) (let ((version (get-version tag))) - (and version (cons version tag)))) + (and version + (or pre-releases? + (not (pre-release? version))) + (cons version tag)))) tags) entry tag) - %pre-release-rx)) - (let* ((tags (map (cut string-drop <> (string-length "refs/tags/")) (remote-refs url #:tags? #t))) (versions->tags - (version-mapping (if pre-releases? - tags - (filter (negate pre-release?) tags)) + (version-mapping tags #:prefix prefix #:suffix suffix #:delim delim diff --git a/tests/import-git.scm b/tests/import-git.scm index 20255dedb3..6dd8ad1649 100644 --- a/tests/import-git.scm +++ b/tests/import-git.scm @@ -224,4 +224,13 @@ (define* (make-package directory version #:optional (properties '())) (let ((package (make-package directory "1.0.0"))) (latest-git-tag-version package)))) +(test-equal "latest-git-tag-version: prefix contains pre-release words" + "1.0.1" + (with-temporary-git-repository directory + '((add "a.txt" "A") + (commit "First commit") + (tag "libdevx-1.0.1" "Release 1.0.1")) + (let ((package (make-package directory "1.0.0"))) + (latest-git-tag-version package)))) + (test-end "git") base-commit: 329daafcc3c798dd180fd98ff757452e3e016235 -- 2.47.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 12 01:17:51 2025 Received: (at 75418-done) by debbugs.gnu.org; 12 Jan 2025 06:17:51 +0000 Received: from localhost ([127.0.0.1]:45776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWrIF-0007Yf-0K for submit@debbugs.gnu.org; Sun, 12 Jan 2025 01:17:51 -0500 Received: from mail.envs.net ([5.199.136.28]:53504) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tWrID-0007YX-0Q for 75418-done@debbugs.gnu.org; Sun, 12 Jan 2025 01:17:49 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 3DFEF38A1F56 for <75418-done@debbugs.gnu.org>; Sun, 12 Jan 2025 06:17:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Vy9yYE6eSNx2 for <75418-done@debbugs.gnu.org>; Sun, 12 Jan 2025 06:17:46 +0000 (UTC) Received: from localhost (unknown [112.44.107.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA for <75418-done@debbugs.gnu.org>; Sun, 12 Jan 2025 06:17:46 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 7c2f1795 for <75418-done@debbugs.gnu.org>; Sun, 12 Jan 2025 06:21:07 +0000 (UTC) From: =?utf-8?B?5a6L5paH5q2m?= To: 75418-done@debbugs.gnu.org Subject: Re: [bug#75418] [PATCH] import: git: Do not search pre-release words in tag prefix. In-Reply-To: <98d422b8ec544458719b20d6a8ff85cc1f681f10.1736230582.git.iyzsong@member.fsf.org> (iyzsong@envs.net's message of "Tue, 7 Jan 2025 14:16:28 +0800") References: <98d422b8ec544458719b20d6a8ff85cc1f681f10.1736230582.git.iyzsong@member.fsf.org> Date: Sun, 12 Jan 2025 14:21:07 +0800 Message-ID: <87h6641rjg.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75418-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Pushed to master. From unknown Tue Aug 19 10:00:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 09 Feb 2025 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator