From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mPRuJ8hyN2FwYAEAgWs5BA (envelope-from ) for ; Tue, 07 Sep 2021 16:10:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wHsjI8hyN2ExTAAA1q6Kng (envelope-from ) for ; Tue, 07 Sep 2021 14:10:16 +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 94228B8FE for ; Tue, 7 Sep 2021 16:10:15 +0200 (CEST) Received: from localhost ([::1]:37978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNbni-0004Lc-Je for larch@yhetil.org; Tue, 07 Sep 2021 10:10:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNba0-0002lW-0N for guix-patches@gnu.org; Tue, 07 Sep 2021 09:56:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45658) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNbZy-0003RP-Mm for guix-patches@gnu.org; Tue, 07 Sep 2021 09:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNbZy-0004OG-MY for guix-patches@gnu.org; Tue, 07 Sep 2021 09:56:02 -0400 Subject: bug#50289: [PATCH] import: go: Fix import when import path redirects. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Tue, 07 Sep 2021 13:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 50289 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sarah Morgensen Cc: Attila Lendvai , 50289-done@debbugs.gnu.org Mail-Followup-To: 50289@debbugs.gnu.org, ludo@gnu.org, iskarian@mgsn.dev Received: via spool by 50289-done@debbugs.gnu.org id=D50289.163102293115788 (code D ref 50289); Tue, 07 Sep 2021 13:56:02 +0000 Received: (at 50289-done) by debbugs.gnu.org; 7 Sep 2021 13:55:31 +0000 Received: from localhost ([127.0.0.1]:56144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNbZT-00046a-3Z for submit@debbugs.gnu.org; Tue, 07 Sep 2021 09:55:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNbZL-00042p-SS for 50289-done@debbugs.gnu.org; Tue, 07 Sep 2021 09:55:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49980) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNbZG-0002vc-8E; Tue, 07 Sep 2021 09:55:18 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35362 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNbZF-0006nN-VN; Tue, 07 Sep 2021 09:55:18 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Tue, 07 Sep 2021 15:55:16 +0200 In-Reply-To: (Sarah Morgensen's message of "Mon, 30 Aug 2021 19:05:19 -0700") Message-ID: <87zgso4hiz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1631023816; h=from:from:sender:sender: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-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=b0PBztGAByptYcRc3RLYNwoGuwgtl4rhuxx8zE4x33A=; b=UoLe9WYfByLhzIDUzEngkpuaI6nnrRPaAVL+J7itf5zR6MnWpfo021frpZnx7HNO4AdNyw fbxkzPao6+wUcGOMqnbFBIb7NP24Qm5vuk6inZyZRfw7UHF2JuntWlB6C1Wp23FsXdBOBW npOzpkJ77NGQApSMOwAGP7B24323O6YN/Ij/969xfu6zP+zYvytPMfLksSZyPYRvjsD2GL Lztz8exKTg6dc8Py1FW3ggmgL2x4A4UL8EcTr+i4IbPYMJef1ONkz4KcFfp60U/WxMvcbX 9LQL8OpKEx/b5YuX1XS2EHDHfSXlxKy/+JeJ82BXtyJkvE6UCvVgAIiYyBPYjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631023816; a=rsa-sha256; cv=none; b=glF22rTrBWTOGIbJkecKKdG48VRmpwL5KeSrIllVUUsW6F84p7Kz/yBTNW+PLT3an8KQ8l AAJEGMABV+Yvvbne+AP1ixK6ahkL6vYlxboUMnqJikAB+uEM/Jlo5mRkpl/9WalsERLEpN z4OKZC74TUGbj6KCmeklhsmM3ZRDIMtxGSbNfcbUhbX2vgcihOFPZLgeVGMts6O08G/Nr3 39kXfTOtIfTg2E4jceX1QWM0UHmuRIXOXsemXLSs6N49tDRtvr6j44bygc/A1oJyOTPSSV OEZ0ataY02hcmpr3glKl0rFtaRe8mT2XZlHzs3C6fFQeqzdZJJDzNucWZcUlXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -1.41 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 94228B8FE X-Spam-Score: -1.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: jX8g+S7THX4e Hi, Sarah Morgensen skribis: > * guix/import/go.scm (fetch-module-meta-data): If no meta entries > have a matching import prefix, return the first entry instead of #f. > --- > X-Debbugs-CC: Attila Lendvai > > Hello Guix, > > As reported by Attila on IRC, the Go importer currently chokes when the > import path URL redirects, for example with "github.com/prometheus/tsdb". > > This is due to my modification to 'fetch-module-meta-data' to handle mult= iple > package's meta tags on one page [0]. It selects the meta based on whethe= r its > import prefix matches the URL we requested. This breaks when the URL > redirects but the import path is not changed (I did not realize that this > was valid... go figure). This patch fixes that by falling back to the fi= rst > meta if none match. > > [0] https://issues.guix.gnu.org/49591 Applied, thank you! Ludo=E2=80=99.