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 kKzqGVvXQGeXEAEAe85BDQ:P1 (envelope-from ) for ; Fri, 22 Nov 2024 19:11:23 +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 kKzqGVvXQGeXEAEAe85BDQ (envelope-from ) for ; Fri, 22 Nov 2024 20:11:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=SpD+SDgp; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=fr8GCqjK; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732302683; 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-cc: 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:dkim-signature; bh=BTydX9rY9xV8RhC4SUd9oWhtySQC+7uA6xHHnfoSLpM=; b=qUIwRFNbTSVAVej4nA2B8b4uq4phzVxVLTgeen4dHZm1ldpx93fU2p/2pVTPkgJYQav7oj ZXl7srScyJTMEdrSjtVxstW3xz9w6jX4poYrkPAVKTLv/h6YPsJ/jYNkRCggQZ6bPtpUgS bob0/lwm6HZ2CqaVldugQJvTkHD+c3fPs0OXlkEiVtdM3SGi0C2yaUtnZ8wR3yRDLTYLCT Gjv9wl6kdbUbE86SCfXuCvjqIrBuQXnVeBDfhQvVkjbBZVHeR+qHi6wRkru40SuOHtvXGY dV25/jEllDUSc6nuPXpGFEwrnVkwS9kvKKebdD4rwbxN9p+0ZSiSchfirWKMVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=SpD+SDgp; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=fr8GCqjK; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732302683; a=rsa-sha256; cv=none; b=UsDTDsTmoaqFpZ6qqgOaDNRQKhgBTi2x5rvuJzDawf76Av/eu/0ScX1s0GckSEkA+vve3Z 6pKZDdrbclFortEJm2ypE7dvVPhWxXM+o25YUeUDwZaTvQNflE32vt08ie/zIiFy9rdw1M ta6t4Lb4zNZbhF7ADggc+21BxrgfLFOO2DG6mf5dBUFYH9orKVi6g1woFCFoPikJeg4Wfb bH6Iy0ZdYucDMUcD1mUauTUYAlJCIcml6+9EJULs9eGc8l7xieDlDYTlR7vABuai1KAeia R4cPk7SFrMaL2H2ygME9wAaJTkDYMXmgriE9DtEMc0Jija7P9K+OxYJBoE0wEw== 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 EBF6482E3B for ; Fri, 22 Nov 2024 20:11:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEZ3Y-0007D4-HW; Fri, 22 Nov 2024 14:11:04 -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 1tEZ3W-0007Cg-K6 for guix-patches@gnu.org; Fri, 22 Nov 2024 14:11: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 1tEZ3W-0006yr-4b for guix-patches@gnu.org; Fri, 22 Nov 2024 14:11: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:References:In-Reply-To:Date:From:To:Subject; bh=BTydX9rY9xV8RhC4SUd9oWhtySQC+7uA6xHHnfoSLpM=; b=SpD+SDgpUGmIkS3TerVbFFAZCrNA0N9vtM2DJW8XWXz/dOtd413HUJVonnh/rcXTZM8MhyCsmlnVdoBqea4F4ENrm/vAITUseHViOyHNxKtluHI3zhfauS7j7LDimThnA3QGean6E0+MyimtOovQgc2gDBeGIJnrs3L72ycFYD22OBGOuIvdZfH8R8qCdlJp3K59kVwqv/Wbk+9Z98J/H9QcT/4/bOjN7c+/IdxtBdxMxJtscmu+DfKWrZ9SkGOqkPXgv5FWdkR2gavDi/khPC2YrxaQKc8XsupJMm/TCKwAEFOwIfURsiwHdJUvl/yZF8VgLToZ0zKOFvu4L81TUA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tEZ3V-0003AU-P5; Fri, 22 Nov 2024 14:11:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74481] [PATCH 2/2] import: go: Warn instead of error out when reference is missing. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: cox.katherine.e+guix@gmail.com, sharlatanus@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 22 Nov 2024 19:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74481 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74481@debbugs.gnu.org Cc: Simon Tournier , Katherine Cox-Buday , Sharlatan Hellseher X-Debbugs-Original-Xcc: Katherine Cox-Buday , Sharlatan Hellseher Received: via spool by 74481-submit@debbugs.gnu.org id=B74481.173230265312141 (code B ref 74481); Fri, 22 Nov 2024 19:11:01 +0000 Received: (at 74481) by debbugs.gnu.org; 22 Nov 2024 19:10:53 +0000 Received: from localhost ([127.0.0.1]:55541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEZ3M-00039l-DT for submit@debbugs.gnu.org; Fri, 22 Nov 2024 14:10:52 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:47243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEZ3H-00039X-No for 74481@debbugs.gnu.org; Fri, 22 Nov 2024 14:10:51 -0500 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-382423e1f7aso1643350f8f.2 for <74481@debbugs.gnu.org>; Fri, 22 Nov 2024 11:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732302587; x=1732907387; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BTydX9rY9xV8RhC4SUd9oWhtySQC+7uA6xHHnfoSLpM=; b=fr8GCqjKlUWeFUOaJ4Yj4T1cCjrVS8/fm/WMvZzTsEV2CHtix268oGOzuXbCKLWbnh +8eqH+XADgTq+5YZUTl7cyLLWCi9to8WljntMNNxHZaibvMST5zxTKP5JUfoPLGFMhJ2 ZzfmuOFL6Fr/RjG38NhrSR6esc71a6cnKvME4/urfmNgAF5DN1NhYDfRcnl+xliWOZxT yOO2Fuojm2Pkx8nMr3ER2z0nwEmcmVpshUMZKLPqzsAUvLgsxQ139DMz4eSntxIDzGdS QwW0NrQxqetOHSW0KLq28iBdXMvJ6nXce7zQG4iqxSRk8FEyrilnRXlj2twa7EQgSkCw IQSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732302587; x=1732907387; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BTydX9rY9xV8RhC4SUd9oWhtySQC+7uA6xHHnfoSLpM=; b=rvhxHghmiHVJXWaBeB7/K8aXi3iefZC3ep8oHQ17AZj+SQSRIqrxlsxIqj/DThRe9M b5l/Y3sGRXLH/avEr+LxjM/1zJg35Qi6FbTwOE5g0G4hYMDJgfKvfXOP5QlokopmZBSD V7jodvcInyn9Kx5HYpqRaofN3A4oVB8NGI6zP0j1kjJp8ZdzaAbxaOgwk/0pAyctGf1Y NJfJzGeGnfaEFeoZWLQONb4cLcmq+9RqjzjX9fJA64qTSI8vK7ElP/0Sx24j+H8jnN9E 2h4I78Yj+pOCrraPqbuzOjTb5QfmDYdadKUC8CGxCsZHvrMlqngmvdaoAWRyMIe+0SzF FviA== X-Gm-Message-State: AOJu0YyVy3asMCy0fVTx44Stb3wzBhU4ekiccpooPd5/xHF0SEyKlrkU yyYx2JhvR7NcTDoYrmOBYra8fKR93MKb0fVtJ39tWKZG6LhWhaae156Pvw== X-Gm-Gg: ASbGncux1DfCSKmIlWAOqH5J4xeFfs0nJeZAgtogmItN7E6MluwYQsi2MjZgotmry+5 Yi/vPxkLsY3dCJizU3MWC2CvA57mxoEybopev88S6u1GKS+dc5Wje6R9wn2Xi7gDk3AmEitwBWF ipuKIqsaHT8PFFAfCUj7+Zy5Wa88WGDoG7SIrankrrmpuiTsG6/kJt8ypHRV/SOnNltB8J/8KKo 6dHmkv2kvt/ZFzUJY0TQszJfpHNt7mk+foLhKjtuta/v8OHDLWfv4u6C4XbMAPZ1qo6 X-Google-Smtp-Source: AGHT+IF4QGXV//fmz+nX6UUKNL+FsvEtZFnX6C0uftiWR5Ex1SxMPLVE97gq88q4WDJxHcwt0t/EZw== X-Received: by 2002:a5d:59a9:0:b0:371:8eb3:603a with SMTP id ffacd0b85a97d-38260b695d0mr2978023f8f.27.1732302586799; Fri, 22 Nov 2024 11:09:46 -0800 (PST) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb260besm3186355f8f.43.2024.11.22.11.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 11:09:46 -0800 (PST) From: Simon Tournier Date: Fri, 22 Nov 2024 20:09:27 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -0.63 X-Spam-Score: -0.63 X-Migadu-Queue-Id: EBF6482E3B X-TUID: 7W5jJ3csHECm * guix/import/go.scm (git-checkout-hash): Return some hash although the checkout does not contain the expected reference. Change-Id: I40287fae29042a0ba106939a413239df6efde97d --- guix/import/go.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index 32cba25b33..25ae989378 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2021-2022 Ludovic Courtès ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Sarah Morgensen -;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021, 2024 Simon Tournier ;;; Copyright © 2023 Efraim Flashner ;;; Copyright © 2024 Christina O'Donnell ;;; @@ -38,7 +38,8 @@ (define-module (guix import go) #:use-module (guix http-client) #:use-module (guix memoization) #:autoload (htmlprag) (html->sxml) ;from Guile-Lib - #:autoload (guix base32) (bytevector->nix-base32-string) + #:autoload (guix base32) (bytevector->nix-base32-string + nix-base32-string->bytevector) #:autoload (guix build utils) (mkdir-p) #:autoload (guix ui) (warning) #:autoload (gcrypt hash) (hash-algorithm sha256) @@ -566,7 +567,10 @@ (define* (git-checkout-hash url reference algorithm) (update-cached-checkout url #:ref `(tag-or-commit . ,reference))))) - (file-hash* checkout #:algorithm algorithm #:recursive? #true))) + (if (and checkout commit) + (file-hash* checkout #:algorithm algorithm #:recursive? #true) + (nix-base32-string->bytevector + "0000000000000000000000000000000000000000000000000000")))) (define (vcs->origin vcs-type vcs-repo-url version subdir) "Generate the `origin' block of a package depending on what type of source -- 2.46.0