From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0DarOUbGfGfPQAEAe85BDQ:P1 (envelope-from ) for ; Tue, 07 Jan 2025 06:14:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 0DarOUbGfGfPQAEAe85BDQ (envelope-from ) for ; Tue, 07 Jan 2025 07:14:31 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=QdSdtGtY; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736230470; 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=TvfZKzjCUAZTRSRVZZ8f0qWrfgTv/51vKNRMOvaxTsM=; b=d5uB4JXtItzmc9sZtDTdvOOAdsIxkgPI5xdTU9VhCJZvj9H4rLT+H3g4kxs0F8gd7VJfAF Fz2aMVLAOG9Ko/bbd1sL/AyDjTSQixcAAAIcDuK/u5HBJcrbTTPpTNw9knUOChdbCKXSsY ITo4yDp5S8Vq0ogMlR2Bqy1V5QKvPMp5jNdptKlD9JfTD6mxX1kdPB+PjvMixx0s8T73xJ Gv6EdZY2QGGiH8k3YLVsU/C8RqnXJB+DNXFWvfqqdRWk9X8+ne48QEY05O18aqtIpiQaHW qB979dZMpNnsjbI5x3YxkkZm9hD5rXmF9Nm/EYgAuQlKTZceI/Cmc3cH6K9Gxg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=QdSdtGtY; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736230470; a=rsa-sha256; cv=none; b=baADndIToR9NXokmbrZ6IHXsIHBrXaFC8eQN9OoJjS9e/yN8AToJO8qFOw0H8y3GCKDzYk xpjcPdDVKdXxO6M7NmN5PjFSF3ZZl6GNoZjG5CHPIbqNqkCFypBZHhRJZhG7CImtofV8XF pJPsveVHZoek6Kq8UUi1FrxDgp1OjC39GPMxbFKdb9nSXFxtAhYNZ32hS9EqZlES+tdJyf 4Y37ZezSqc+5DF3hhfvBgaoHiNP0dhkAZoGGhsuxtPklScOlHpa7+tIWe6hEWtUYTw+9sS 5bNssRI2TE46ivW9ReZxgvDxhBS4d0XeelRKOPEM85L1nz3l8ShdoA0DbMZZ1w== 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 A3FBC94A58 for ; Tue, 07 Jan 2025 07:14:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tV2qs-00038y-NT; Tue, 07 Jan 2025 01:14:06 -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 1tV2qo-00038h-O6 for guix-patches@gnu.org; Tue, 07 Jan 2025 01:14:02 -0500 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 1tV2qo-0008OX-Co for guix-patches@gnu.org; Tue, 07 Jan 2025 01:14:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=TvfZKzjCUAZTRSRVZZ8f0qWrfgTv/51vKNRMOvaxTsM=; b=QdSdtGtYKnXrDFgsVgqNmAZdxDXuDEoXkHA173T6T6PJE9ujWcJMEs5bz24u4UZYcUFHJblpeh4JJM3dS4/PC7bsjj1X0SQUYGzKCtsEY7+dpQlZQFtSfxS48piE+/zEp5D9px6GMBxorOXTP67MgeOci8DQjqYcVC0zLwfrhVn7lmrfdZmtKn7/xyrxosbCLfqhQzoyR0Ft2LeiLP+UyzyBa0oKuepXfhDDMxoDpRqMHm5m7zJfYPJnxk3wCQ8ORWa2JUrSwum+bsfSPqLxgyoamKno0VlhcI2AHb1V2trmswB088WPKiOyb+EKpFnkJ92NFg7Xn/5zeylyUPXvbQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tV2qn-0002vp-Vz; Tue, 07 Jan 2025 01:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75418] [PATCH] import: git: Do not search pre-release words in tag prefix. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Tue, 07 Jan 2025 06:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75418 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75418@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by submit@debbugs.gnu.org id=B.173623043111243 (code B ref -1); Tue, 07 Jan 2025 06:14:01 +0000 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) 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 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-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: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches From: iyzsong--- 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: mx11.migadu.com X-Migadu-Spam-Score: -3.49 X-Spam-Score: -3.49 X-Migadu-Queue-Id: A3FBC94A58 X-TUID: pyeI9FpXm1IO 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