From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id Hm0fO+/ZU2EY5gAAgWs5BA (envelope-from ) for ; Wed, 29 Sep 2021 05:13:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2N0dNu/ZU2FGeQAAbx9fmQ (envelope-from ) for ; Wed, 29 Sep 2021 03:13:51 +0000 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 AB81B1CF93 for ; Wed, 29 Sep 2021 05:13:51 +0200 (CEST) Received: from localhost ([::1]:59254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVQ2Y-0001cl-JU for larch@yhetil.org; Tue, 28 Sep 2021 23:13:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVPpC-0007YB-F0 for guix-patches@gnu.org; Tue, 28 Sep 2021 23:00:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35875) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVPpC-00071n-60 for guix-patches@gnu.org; Tue, 28 Sep 2021 23:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVPpC-0000WD-0V for guix-patches@gnu.org; Tue, 28 Sep 2021 23:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50885] [PATCH] import: go: Recognize major version suffixes. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Sep 2021 03:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50885 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50885@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16328843811933 (code B ref -1); Wed, 29 Sep 2021 03:00:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Sep 2021 02:59:41 +0000 Received: from localhost ([127.0.0.1]:47421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVPoq-0000V7-RZ for submit@debbugs.gnu.org; Tue, 28 Sep 2021 22:59:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:50540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVPop-0000V0-6U for submit@debbugs.gnu.org; Tue, 28 Sep 2021 22:59:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVPoo-00076A-S4 for guix-patches@gnu.org; Tue, 28 Sep 2021 22:59:38 -0400 Received: from out2.migadu.com ([2001:41d0:2:aacc::]:60074) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVPom-0006gb-ST for guix-patches@gnu.org; Tue, 28 Sep 2021 22:59:38 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1632884374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SwKrTP+s2M1J40z1LKwymzMrvBkV2DcLPAxt5kj7YrE=; b=L2Slh5rQhqWyYSDBbb0OyarQLN1SYc4WT8TxWSiE1Xrsi1zw9N5I3uY32eY0qWdZ4yrT7W x0pRtWV+NqpUJlOEXx+9L/9qULbVco1uLlsVmOh6PnCMdfHaN0cJMCu+/1KgNI/1SpPare 8ALsC9Gu6+5Gtr8ZAqYlziSE+YbhocM= From: Sarah Morgensen Date: Tue, 28 Sep 2021 19:59:32 -0700 Message-Id: <58c2e5ecbfef887de1414a4fed38634b0ed6c259.1632884296.git.iskarian@mgsn.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=iskarian@mgsn.dev; helo=out2.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632885231; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: 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=SwKrTP+s2M1J40z1LKwymzMrvBkV2DcLPAxt5kj7YrE=; b=jyHMoLoZsDx+nWHTXr6hOmvR34vmMgFGh9kpX2642C1C3BU4WDXbr+vHORPs6hmiTCRKON aX8qqKlyey+ZNEoxnOySl825p9/iYC9TJKq20dHwSWICe+M1F07BxywUCUPTEYURhx1njJ 9/OFqQ25Cz2UhZ/m1VivkjO/yLPo0DM4c2HV5myCaUETorsBROGfLjQTo/Dh1LI+udaoxN QzZCJDA9FwZonjhhQOsKzbR+n4VIbYYziMZ6TCzG29Z147wSuZkINQ+hExfnKRldI+p1PH zBJkpS1dIqzPLhwd8egWforoIEprN8IjGn1kuHb2vYUdQm+Omo+ShIAreBKtrA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632885231; a=rsa-sha256; cv=none; b=ZTKBJuciok2xB885KQAO2HsQ4aajxKPa4guPFCkCiyGnLTIjh5w8UClF1I2GxXEYybgd3G FnGqnWDABjS7KFj9A9gISkB/lMR89fBQToMgLU7eZAflmDzNZDbpuM1CR0KlZPdQpXNdDV WMoLvPxOT7NkWdrvNSusdVNdNxH6NrX6Uj+CGqxR6F6WTVZQZ9eGWD07ZfT8VKdUmGyOl5 pCZWFsm1Orak7+gZNhb4KrlznLJvvz1inE0AV4hXCD+Es9P271IW8LeOjvGsjjOZClWj+E sva07YSdy2vAGcMR61eFKqG54VkWqW7Qms1Kvy4iUYgi/HUUa5gRJkdELCt8Ug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=L2Slh5rQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.70 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=L2Slh5rQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: AB81B1CF93 X-Spam-Score: 3.70 X-Migadu-Scanner: scn0.migadu.com X-TUID: izuAAHsVIoVs Do not treat major version suffixes (such as "/v3") as repository subdirectories. See . * guix/import/go.scm (go-module->guix-package): When determining the unpack path, compare 'root-module-path' to 'module-path-sans-suffix' instead of 'module-path'. --- guix/import/go.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index ca909ab35a..26dbc34b63 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -612,6 +612,8 @@ hint: use one of the following available versions ~a\n" (dependencies (if pin-versions? dependencies+versions (map car dependencies+versions))) + (module-path-sans-suffix + (match:prefix (string-match "([\\./]v[0-9]+)?$" module-path))) (guix-name (go-module->guix-package-name module-path)) (root-module-path (module-path->repository-root module-path)) ;; The VCS type and URL are not included in goproxy information. For @@ -631,7 +633,7 @@ hint: use one of the following available versions ~a\n" (build-system go-build-system) (arguments '(#:import-path ,module-path - ,@(if (string=? module-path root-module-path) + ,@(if (string=? module-path-sans-suffix root-module-path) '() `(#:unpack-path ,root-module-path)))) ,@(maybe-propagated-inputs base-commit: c582be4c38596a6a31a39c6799723dcd8b6eb909 prerequisite-patch-id: dbb8a05982f57aefffd5b97ab3dac4073b48245d -- 2.33.0