From unknown Fri Jun 20 07:28:17 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#74481 <74481@debbugs.gnu.org> To: bug#74481 <74481@debbugs.gnu.org> Subject: Status: [PATCH 0/2] Handle corner cases of 'guix import go' Reply-To: bug#74481 <74481@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:28:17 +0000 retitle 74481 [PATCH 0/2] Handle corner cases of 'guix import go' reassign 74481 guix-patches submitter 74481 Simon Tournier severity 74481 normal tag 74481 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 14:06:14 2024 Received: (at submit) by debbugs.gnu.org; 22 Nov 2024 19:06:14 +0000 Received: from localhost ([127.0.0.1]:55530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEYyr-0002tg-At for submit@debbugs.gnu.org; Fri, 22 Nov 2024 14:06:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:52746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEYyp-0002tS-9j for submit@debbugs.gnu.org; Fri, 22 Nov 2024 14:06:12 -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 1tEYyo-0006HY-Pj for guix-patches@gnu.org; Fri, 22 Nov 2024 14:06:10 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tEYym-0006L6-Qr for guix-patches@gnu.org; Fri, 22 Nov 2024 14:06:10 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43167ff0f91so21520075e9.1 for ; Fri, 22 Nov 2024 11:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732302366; x=1732907166; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rUMaYOPxeUR1Vp3Nlw0/jWuet+MnhcR7Bx44/04K7OM=; b=DWvG06zLNQQWOwJLAk4x9FgS3MMNXzuKY5rAHMeHeVdDVFarM/SYF+Mcq6o+wQqO6W 9ualVKpKHJMz4Azkhn0Ibyd5XXj39cbBuf/HAFizBqPwvk2GkzJJZs4RdTLRDRHfxBsG F5Jyv5sUyqWssPE9iYGTMD/26Om5FNxIFlxPtDtG1ThAc/+xN4dutR3iX+gJP2/k9d5p xy+u/Lh4OB/X85DzKWEk5OGAAetm0U1pUdOUeLH6c++Rw9z7yhBlzviYcj9KXB9j/UMS euLoFFVqPFnhIZWnLFNsfN5Gh16XV99fqbDc8kt+RHdEgrkeTNIhGuIoPNzu4VDMGtNU iqxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732302366; x=1732907166; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rUMaYOPxeUR1Vp3Nlw0/jWuet+MnhcR7Bx44/04K7OM=; b=Ff1ZHl7twifOxsUY63Sh33tbKPVOdUSXYx+OJ/nklc1gjqcw2zJn8Ek39J4QPNlORL USVZ726O/3tdVwPW1YuDIa0YU4BdfK0God54K56xpwuyC4DKSEHf/0v9lI8f13f9d1hU EpHWV8oHxMjvYrSjXkw2s/5x435YT+yky3tBwzKUJyf5/s7ow4upKk0wVZ3tS2o4zsIj z0rfateIKuRnbBEGLyNG4TkOli4QB5zF5zl1qTenq2dPyOnqzeS+9ywemV5u0glX0k8f Ws6U46OP/klIdKWAy6RwrhiqpnglxHnWRCxkxDZr9YdBUkhftIen+lWUnCIDkcOOQ+YV s3/A== X-Gm-Message-State: AOJu0YxSykSeM3jzPjA3UwR0VhBcAlrsfmyqfdvp2figLy/6q6DMDEBl ZNKD6k6d898oLIAQGbLkaeGqQQm2OazmJ5UxPSJjG+yVSq1LrhqJV3Ar1Q== X-Gm-Gg: ASbGncvd4xSY5QDJQ1JP+X8WJ9rER0WFqSeek0LZLBYLBFRWUdM5BSkIWPLMyQ8xFZn tKyM6Ogf9+DT+aDb/CAB9OXra+CS3caNmigHHhCZ1gi3NunTyS5NjAfL4PM+3/pPj5P2dRipSoR 42UJ9NkJZq2cWSNhfYhhbEKNwGEqO9NP9YLKhd71pXnIlVSrNekKIJYsmfb402CxLWKwyuiVzTH L2WC/Cx8+a3V/1y88CP0dBw/recOHkdS/LCBkuT84VezTqQjRqDSs1ZftK1R1WUCJbE X-Google-Smtp-Source: AGHT+IHqkuEba8VKEq05j6D10wV3DmPnY+tyCxWy+yOmRFdVulIwfSi1adugoZPJhr79/rbOZF5wyg== X-Received: by 2002:a05:600c:5102:b0:42f:8515:e490 with SMTP id 5b1f17b1804b1-433ce4108dfmr33708465e9.5.1732302366179; Fri, 22 Nov 2024 11:06:06 -0800 (PST) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b01e1188sm105085895e9.1.2024.11.22.11.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 11:06:05 -0800 (PST) From: Simon Tournier To: guix-patches@gnu.org Subject: [PATCH 0/2] Handle corner cases of 'guix import go' Date: Fri, 22 Nov 2024 20:05:57 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Debbugs-Cc: Katherine Cox-Buday , Sharlatan Hellseher Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Simon Tournier 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: -2.3 (--) Hi, Instead of that: --8<---------------cut here---------------start------------->8--- $ guix import go software.sslmate.com/src/go-pkcs12 guix import: Importing package "software.sslmate.com/src/go-pkcs12"... guix import: warning: Unable to determine repository root of 'software.sslmate.com/src/go-pkcs12'. Guessing 'software.sslmate.com/src/go-pkcs12'. SWH: found revision fa70679f0f1622a2705336a97225ee8d6c555f96 with directory at 'https://archive.softwareheritage.org/api/1/directory/43d3e9f7167cdcd9f179e8d1de33d0d22e8fbd46/' swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/HEAD swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/branches/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/config swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/description swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/hooks/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/info/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/info/exclude swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/info/refs swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/info/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/info/packs swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/pack/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/pack/pack-19cac523aaea8e45710dd5cc36bbee1ecc68369c.idx swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/pack/pack-19cac523aaea8e45710dd5cc36bbee1ecc68369c.pack swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/refs/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/refs/heads/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/refs/heads/master swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/refs/tags/ guix import: warning: Backtrace: In ice-9/boot-9.scm: 1752:10 12 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 11 (apply-smob/0 #) In ice-9/boot-9.scm: 724:2 10 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 9 (_ #(#(#))) In guix/ui.scm: 2330:7 8 (run-guix . _) 2293:10 7 (run-guix-command _ . _) In guix/scripts/import.scm: 82:6 6 (guix-import . _) In ice-9/boot-9.scm: 1752:10 5 (with-exception-handler _ _ #:unwind? _ # _) In guix/scripts/import/go.scm: 116:29 4 (_) In ice-9/eval.scm: 619:8 3 (_ #(#(# # ?) ?)) 174:20 2 (_ #(#(# # ?) ?)) 177:32 1 (lp (#)) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure git-error-message: Wrong type argument: #<&compound-exception components: (#<&error> #<&irritants irritants: (#< code: -3 message: "reference 'refs/tags/v0.5.0' not found" class: 4>)> #<&exception-with-kind-and-args kind: git-error args: (#< code: -3 message: "reference 'refs/tags/v0.5.0' not found" class: 4>)>)> --8<---------------cut here---------------end--------------->8--- which is annoying because it is blocking when using the importer recursively, the patch set produces that: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix import go software.sslmate.com/src/go-pkcs12 guix import: Importing package "software.sslmate.com/src/go-pkcs12"... guix import: warning: Unable to determine repository root of 'software.sslmate.com/src/go-pkcs12'. Guessing 'software.sslmate.com/src/go-pkcs12'. SWH: found revision fa70679f0f1622a2705336a97225ee8d6c555f96 with directory at 'https://archive.softwareheritage.org/api/1/directory/43d3e9f7167cdcd9f179e8d1de33d0d22e8fbd46/' swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/HEAD swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/branches/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/config swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/description swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/hooks/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/info/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/info/exclude swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/info/refs swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/info/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/info/packs swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/pack/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/pack/pack-19cac523aaea8e45710dd5cc36bbee1ecc68369c.idx swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/objects/pack/pack-19cac523aaea8e45710dd5cc36bbee1ecc68369c.pack swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/refs/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/refs/heads/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/refs/heads/master swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/refs/tags/ guix import: warning: Git cannot find the reference v0.5.0 (define-public go-software-sslmate-com-src-go-pkcs12 (package (name "go-software-sslmate-com-src-go-pkcs12") (version "0.5.0") (source (origin (method git-fetch) (uri (git-reference (url "https://software.sslmate.com/src/go-pkcs12.git") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0000000000000000000000000000000000000000000000000000")))) (build-system go-build-system) (arguments (list #:import-path "software.sslmate.com/src/go-pkcs12")) (home-page "https://software.sslmate.com/src/go-pkcs12") (synopsis "package pkcs12") (description "Package pkcs12 implements some of PKCS#12 (also known as P12 or PFX). It is intended for decoding DER-encoded P12/PFX files for use with the crypto/tls package, and for encoding P12/PFX files for use by legacy applications which do not support newer formats. Since PKCS#12 uses weak encryption primitives, it SHOULD NOT be used for new applications.") (license license:bsd-3))) --8<---------------cut here---------------end--------------->8--- Please double check because it tweaks 'update-cached-checkout' which is used by "guix pull". :-) Cheers, simon Simon Tournier (2): git: Catch Git errors when updating cached checkout. import: go: Warn instead of error out when reference is missing. guix/git.scm | 128 ++++++++++++++++++++++++++------------------- guix/import/go.scm | 10 ++-- 2 files changed, 82 insertions(+), 56 deletions(-) base-commit: 043f02462766a913080723ad286028a288b79373 -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 14:10:53 2024 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 To: 74481@debbugs.gnu.org Subject: [PATCH 2/2] import: go: Warn instead of error out when reference is missing. 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 X-Debbugs-Cc: Katherine Cox-Buday , Sharlatan Hellseher Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74481 Cc: Simon Tournier 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 (-) * 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 14:10:56 2024 Received: (at 74481) by debbugs.gnu.org; 22 Nov 2024 19:10:56 +0000 Received: from localhost ([127.0.0.1]:55543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEZ3P-0003A6-W7 for submit@debbugs.gnu.org; Fri, 22 Nov 2024 14:10:56 -0500 Received: from mail-wr1-f45.google.com ([209.85.221.45]:52544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEZ3L-00039W-UE for 74481@debbugs.gnu.org; Fri, 22 Nov 2024 14:10:53 -0500 Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-38246333e12so2257554f8f.1 for <74481@debbugs.gnu.org>; Fri, 22 Nov 2024 11:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732302586; x=1732907386; 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=8o9R/iC8JNZ8XZ7k62//tJ1gfK9u5OqPGPqttkCnP/g=; b=H8bWeiefdZvIk3fbTJI/TYBEihdVngwPKQc9n3NgUDLPTF+Q4fhPfd2l+ausEFD9EA CpZmPWJalgoMdb8rVjNIT/WPGevQNIwdRTSMc6jb90RMyBy7LQSX8Wov3+zAIZbbSi1Y FQe7LzPwPXPqgfWGYCtfR30epFY6tz5xTS1x49tBM9QJ9d6RPZaq4Crtgp1pznL4j/9W cdl4JB3IllcZz76Mn3optj/YpivE/NO7rhG4wjx8yZGYuk5JtW6GZaLyv8LLNVQvOPBa LxWsh+gtYyMMbW1NprBD0JdUAqaIBC44puwPq+j9QlRG47FV6K/IXSxQJcsV6Kqxte1N Y3Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732302586; x=1732907386; 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=8o9R/iC8JNZ8XZ7k62//tJ1gfK9u5OqPGPqttkCnP/g=; b=QdpBMSrvuKzi5QMZ/QkoC/OvVQlzvvZGrfkkRTlRME4/G8M4BmnOzDK4jendviSoW2 USbTjsqMC13uvTQ/l5EEH4oxbbdSa1Eb7mR97OApds74m87cs7hY5MuZFBsXTMfFMVk6 HSdC62TPHuOd8gCO8vueu3LAxw5pnwqLgz5TR+0hUTSxp8dkOEd0+ZLlJBCZQo1lLULi 1pylT+CcaTEy5AvnuF7Qb/yCmb5v/ynCpRlOcJws506CUgzaozvU6VVhKbgUDAvhUO4J g9zCD6D6xGxPlJ6wnzIXmNX1bkhtALyJ+0vmAOnm1IH3AzISXt3gGjwJ5YBDx5ys0bf8 OFfA== X-Gm-Message-State: AOJu0YwhLzFh+s/JxlMAD67jo8Gtl+oq39dxW/xaIQIKb1H37OWelgG0 teDOu4FD2f4PWCKwzQ8i6EaCAprzTTPCl0tPIX58twYM7+0ZrsrhNgfv2g== X-Gm-Gg: ASbGncsFmzUlDWjrPUg7JlrQLtugIiE9rgcPzr35mkrWUZt0Zqx6yLxdv1xyT0+LoVo Paj3dNskc1XQ97fdsKhCocY/TP6E18K1wN8ajB3yhu9IM7WgTK302oOkrXCcMmIkfnzmhvu/553 FjDrWtlw94+czgkySc+Ns7FlDjcCtt7xw8lJPFEZskdVy6ac9ESYU8PEtj5ALh1xtXERts5ZOsr DcP8GThzfmBHBhRRkxIu6OqiriDyAf2JHmz6a6oxlYiXDtxl/hSNaOc13sI5On9d3l6 X-Google-Smtp-Source: AGHT+IFlkbO7gcc3wgmqcFsLXFczQVLFyxSY1QNTB6n+MXLUgcyy1CCOfx9msbyqtpCm4CSwdSyI4A== X-Received: by 2002:a05:6000:178a:b0:37d:47e0:45fb with SMTP id ffacd0b85a97d-38260b53851mr3743804f8f.21.1732302586040; 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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 11:09:45 -0800 (PST) From: Simon Tournier To: 74481@debbugs.gnu.org Subject: [PATCH 1/2] git: Catch Git errors when updating cached checkout. Date: Fri, 22 Nov 2024 20:09:26 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74481 Cc: Simon Tournier 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 (-) * guix/git.scm (resolve-reference): Catch Git error when reference does not exist and return #false. (switch-to-ref): Adjust. (update-cached-checkout)[close-and-clean!]: New helper. Catch Git error when reference does not exist and warn. Return #false values when reference does not exist. Change-Id: If6e244fe40ebee978ec8de51a6a68bcbd4a2c79e --- guix/git.scm | 128 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 75 insertions(+), 53 deletions(-) diff --git a/guix/git.scm b/guix/git.scm index 410cd4c153..328e2d5c8c 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2021 Marius Bakke ;;; Copyright © 2022 Maxime Devos ;;; Copyright © 2023 Tobias Geerinckx-Rice -;;; Copyright © 2023 Simon Tournier +;;; Copyright © 2023, 2024 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -265,7 +265,7 @@ (define (tag->commit repository tag) (define (resolve-reference repository ref) "Resolve the branch, commit or tag specified by REF, and return the -corresponding Git object." +corresponding Git object. Return #false if REF is not found." (let resolve ((ref ref)) (match ref (('branch . branch) @@ -281,9 +281,12 @@ (define (resolve-reference repository ref) ;; can't be sure it's available. Furthermore, 'string->oid' used to ;; read out-of-bounds when passed a string shorter than 40 chars, ;; which is why we delay calls to it below. - (if (< len 40) - (object-lookup-prefix repository (string->oid commit) len) - (object-lookup repository (string->oid commit))))) + (catch 'git-error + (lambda () + (if (< len 40) + (object-lookup-prefix repository (string->oid commit) len) + (object-lookup repository (string->oid commit)))) + (lambda _ #f)))) (('tag-or-commit . str) (cond ((and (string-contains str "-g") (match (string-split str #\-) @@ -300,7 +303,10 @@ (define (resolve-reference repository ref) => (lambda (commit) (resolve `(commit . ,commit)))) ((or (> (string-length str) 40) (not (string-every char-set:hex-digit str))) - (resolve `(tag . ,str))) ;definitely a tag + (catch 'git-error ;definitely a tag + (lambda () + (resolve `(tag . ,str))) + (lambda _ #f))) (else (catch 'git-error (lambda () @@ -336,13 +342,15 @@ (define (switch-to-ref repository ref) (define obj (resolve-reference repository ref)) - (reset repository obj RESET_HARD) + (and obj + (begin + (reset repository obj RESET_HARD) - ;; There might still be untracked files in REPOSITORY due to an interrupted - ;; checkout for example; delete them. - (delete-untracked-files repository) + ;; There might still be untracked files in REPOSITORY due to an interrupted + ;; checkout for example; delete them. + (delete-untracked-files repository) - (object-id obj)) + (object-id obj)))) (define (call-with-repository directory proc) (let ((repository #f)) @@ -562,6 +570,31 @@ (define* (update-cached-checkout url (string-append directory "/" file))) (or (scandir directory) '()))) + (define (close-and-clean! repository) + (repository-close! repository) + + ;; Update CACHE-DIRECTORY's mtime to so the cache logic sees it. + (match (gettimeofday) + ((seconds . microseconds) + (let ((nanoseconds (* 1000 microseconds))) + (utime cache-directory + seconds seconds + nanoseconds nanoseconds)))) + + ;; Run 'git gc' if needed. + (maybe-run-git-gc cache-directory) + + ;; When CACHE-DIRECTORY is a sub-directory of the default cache + ;; directory, remove expired checkouts that are next to it. + (let ((parent (dirname cache-directory))) + (when (string=? parent (%repository-cache-directory)) + (maybe-remove-expired-cache-entries parent cache-entries + #:entry-expiration + cached-checkout-expiration + #:delete-entry delete-checkout + #:cleanup-period + %checkout-cache-cleanup-period)))) + (define canonical-ref ;; We used to require callers to specify "origin/" for each branch, which ;; made little sense since the cache should be transparent to them. So @@ -583,56 +616,45 @@ (define* (update-cached-checkout url ;; Only fetch remote if it has not been cloned just before. (when (and cache-exists? (not (reference-available? repository ref))) - (remote-fetch (remote-lookup repository "origin") - #:fetch-options (make-default-fetch-options))) + (catch 'git-error + (lambda () + (remote-fetch (remote-lookup repository "origin") + #:fetch-options (make-default-fetch-options))) + (lambda _ + (warning (G_ "Git cannot update the cache of ~a~%") url)))) (when recursive? (update-submodules repository #:log-port log-port #:fetch-options (make-default-fetch-options))) ;; Note: call 'commit-relation' from here because it's more efficient ;; than letting users re-open the checkout later on. - (let* ((oid (if check-out? + (let ((oid (if check-out? (switch-to-ref repository canonical-ref) (object-id - (resolve-reference repository canonical-ref)))) - (new (and starting-commit - (commit-lookup repository oid))) - (old (and starting-commit - (false-if-git-not-found - (commit-lookup repository - (string->oid starting-commit))))) - (relation (and starting-commit - (if old - (commit-relation old new) - 'unrelated)))) - - ;; Reclaim file descriptors and memory mappings associated with - ;; REPOSITORY as soon as possible. - (repository-close! repository) - - ;; Update CACHE-DIRECTORY's mtime to so the cache logic sees it. - (match (gettimeofday) - ((seconds . microseconds) - (let ((nanoseconds (* 1000 microseconds))) - (utime cache-directory - seconds seconds - nanoseconds nanoseconds)))) - - ;; Run 'git gc' if needed. - (maybe-run-git-gc cache-directory) - - ;; When CACHE-DIRECTORY is a sub-directory of the default cache - ;; directory, remove expired checkouts that are next to it. - (let ((parent (dirname cache-directory))) - (when (string=? parent (%repository-cache-directory)) - (maybe-remove-expired-cache-entries parent cache-entries - #:entry-expiration - cached-checkout-expiration - #:delete-entry delete-checkout - #:cleanup-period - %checkout-cache-cleanup-period))) - - (values cache-directory (oid->string oid) relation))))) + (resolve-reference repository canonical-ref))))) + (if (not oid) + (begin + (warning (G_ "Git cannot find the reference ~a~%") (match canonical-ref + ((_ . ref) ref))) + (close-and-clean! repository) + (values #f #f #f)) + (let* ((new (and starting-commit + (commit-lookup repository oid))) + (old (and starting-commit + (false-if-git-not-found + (commit-lookup repository + (string->oid starting-commit))))) + (relation (and starting-commit + (if old + (commit-relation old new) + 'unrelated)))) + + ;; Reclaim file descriptors and memory mappings associated with + ;; REPOSITORY as soon as possible. + + (close-and-clean! repository) + + (values cache-directory (oid->string oid) relation))))))) (define* (latest-repository-commit store url #:key -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 10 11:50:12 2024 Received: (at 74481) by debbugs.gnu.org; 10 Dec 2024 16:50:12 +0000 Received: from localhost ([127.0.0.1]:59313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tL3R5-0005ma-KA for submit@debbugs.gnu.org; Tue, 10 Dec 2024 11:50:11 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:47276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tL3Qw-0005i7-RY for 74481@debbugs.gnu.org; Tue, 10 Dec 2024 11:50:04 -0500 Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-385e27c75f4so4293255f8f.2 for <74481@debbugs.gnu.org>; Tue, 10 Dec 2024 08:50:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733849342; x=1734454142; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=xWE9JMupTIWr9yX6GxGD8zBQeQtt32EcBfxyJ6UJxGY=; b=bp/5oZr67g+X347DoO111v4x3PyK4ZSSrwNQli24n6WOm2P2SDriwi8tUGfORAk7iB 51YSKRUm2Wo3FhJIaNTpb1ArnhfiCTDcXCf24eC2KmOzcTUmBav4pYJeVFaUUsbHeBAE UvUvvGsxnknJBGFGwz6cjAFlx7EDANkQ7B7u+Is2Ds9gmxHUrEXUjmR7GKVzd+HQ2iU9 XTN3chpxPnOQE3c1fqhktPGeuJ75dCRuWqtnfuCIsSJJe9Zw/bDlmnRc7x2Ta/bHLIcY LySiPj4MxY3VsSOjqeRTTjrNuN/FvRsHRQ47EJ/YFwFCXs5x6SqwC6tPeUYjUBF/j15R +Dyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733849342; x=1734454142; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xWE9JMupTIWr9yX6GxGD8zBQeQtt32EcBfxyJ6UJxGY=; b=O53giFC2jPxjSiuFfsn22HKNgA+3QPmZ98B6dtuL3a+fHC0QXh1ieL2Bo41tXiQnmk o3pegnh7ywX9R+GVsahslAClvUL9MZ6h0XR23KHG4OXdsg5CJPFwVZlKILgh6+lVQX66 bxtdocZDNepurPy1HiZbUg3R4r1mXfWtwbZR1MzcXtGzErT1L8fxO9kJDhy+PpuGzjuB 8zfCpkUB+BhzaU+GUKyNUBQNXlxBw06MWfFMR2W510Yk7wsA6Q4ZYOjJzVv+HifiYv0I /9OtxTehFGRBId3RIpv4Vkpsm6eODzPhiPBXpyK4TGrZqLTaOOiy1m6GJxAUvH4fSxpU 2K4Q== X-Gm-Message-State: AOJu0YwLa+9QmPlnRcn7vHoyGfdQbeKISgVRpugDIuNqsJ6DgKNnNzl1 2CsFnQRYOO0tSWCv3KpQw3vUUZm8iC8Zd2VMFcpDnEqV13TK0TdtIzl7jA== X-Gm-Gg: ASbGncvFsZBrltryqkGhp9zxiqEHiwtpukXVtoek+Z7fIqo1NdvKxllwrD3ISEFNUX5 W2DL+qnUI89oWhCjAvTDasY7lrKwRLGDO/ZUrYYucx54lhL0CPzRr38j5KZkincQvkSX9Oasy3K b6UpEX201fIMG+JE5DNyiiLT4zfEjwwlFeWrOvJjdQCu5vcnECRd6B7p3EFZQ9c04fb0QDyPY7P /mwR/9xyjxmO7tYP2aSlzhIIZb/hQOKwr8oJakHbL7+x9mJRQ== X-Google-Smtp-Source: AGHT+IGLzVGwfR0kT1B3DOtfoBFzM2V7c9r8MRo8usumTmRaSoRc4Bqnk67aggRk/mePBQgBpfj3yQ== X-Received: by 2002:a5d:5888:0:b0:386:37f5:99f6 with SMTP id ffacd0b85a97d-386453fff39mr4502694f8f.53.1733849341952; Tue, 10 Dec 2024 08:49:01 -0800 (PST) Received: from lili ([148.60.59.223]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-386348182d4sm11050801f8f.53.2024.12.10.08.48.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 08:49:00 -0800 (PST) From: Simon Tournier To: 74481@debbugs.gnu.org Subject: Re: [bug#74481] [PATCH 0/2] Handle corner cases of 'guix import go' In-Reply-To: References: Date: Tue, 10 Dec 2024 15:09:48 +0100 Message-ID: <874j3b1vf7.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74481 Cc: Josselin Poiret , Tobias Geerinckx-Rice , Sharlatan Hellseher , Simon Tournier , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Katherine Cox-Buday , Christopher Baines 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 (-) Hi, On Fri, 22 Nov 2024 at 20:05, Simon Tournier wrote: > Please double check because it tweaks 'update-cached-checkout' which is used > by "guix pull". :-) If no more comment on that, I will push shortly. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 10 13:41:22 2024 Received: (at 74481) by debbugs.gnu.org; 10 Dec 2024 18:41:22 +0000 Received: from localhost ([127.0.0.1]:59555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tL5Af-0005nN-F7 for submit@debbugs.gnu.org; Tue, 10 Dec 2024 13:41:22 -0500 Received: from mail-lf1-f53.google.com ([209.85.167.53]:60436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tL5Ae-0005n1-4g for 74481@debbugs.gnu.org; Tue, 10 Dec 2024 13:41:20 -0500 Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-53ffaaeeb76so3213914e87.0 for <74481@debbugs.gnu.org>; Tue, 10 Dec 2024 10:41:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733856014; x=1734460814; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TGJRmAmwmgMBbL1JVGwRzWb4klxVxMiWAwSUPMOGQJk=; b=Syi1Rha4/Vs0O2kyxTZoETCkLLbzWIHfuIMGhKT/MEl7QbtuJ114LA8TPePvZ315GQ 31wYBeRqK7SZUCKOlIq9JXUCyn+R49hQHRpj2SO9ku/4VtYpa4bbrASWkFwaZn5R0D7D 77ULpHRK7tfE4nrbC2de2bSqbUNWbaU9wj4FMmGDvI+SyQTl8E8XoPAXjCZCyKE5GkZ/ ZGdhleMjrFYtNKM2KH3fJ9wPvvBkjdCi8GDj3jSuc1LxIF61e+7ey/WHyBOIl6W+JOWo KzeSrxCBnXV2Vvq0Y4yxRXcQG+8q48eVY9SmVzDQWoohQJmQc4+PgUOJBVij0k5eT2oS zybA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733856014; x=1734460814; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TGJRmAmwmgMBbL1JVGwRzWb4klxVxMiWAwSUPMOGQJk=; b=v6rO2wji5HAWBP8S1jewsC8vIk3sZrwEhgHdZ7X2/fCHNy9lGYB5rwyNFFF703jxu2 1CI0WfPWDQ4T7zTFV3EwdFTUr3fUHlJjrLbE4y4Oi3vmg36P8crb6nNKbLCq6egdIRSk yvTYY1Zcl4Kdh+N50HnL1tf6QtIcvx9AhEYo7ORdfi1b+TzizNF82qlnbBzZMBvzjux2 dHtWeFwpsESZL/Vr3YretSt/289TB75x1FychsYwIRWw0pMjq5BLBFpic0T5vglOVIKW LN3eyPekgENJrJNls+wdKBmBVXXbXehgdQWpP77IcgRyZRxROF/cjYJ1/iqjeGVdtlrz gSqQ== X-Gm-Message-State: AOJu0YxdqKEYk4+tQT4gXDbMAq0qEhV+Ab827ZctXRmnB03tZHXIBZ/s 2nS9DT4eh0n4MMkHQ5XrkcoRRK9qYqCVE4oTEl1EUKlVDPW0m5iib88xi2W5ZVM/6x0SMBmB622 toH+uaGpi3PQ5DAyzfqh1zf7Ue6g= X-Gm-Gg: ASbGnctVjM4sh2pBs6KDkLl7bEyUudtSL5QWnK61on61i5vGWF9puen2qsJPyCUMqbM DvqgIycN9xRToImaCKYs9HosiP0brQRIQkp+OyNOy2uVvGgq13eY6LX8buUeUyWAUaOXCxg== X-Google-Smtp-Source: AGHT+IHvZtgAl887484/l8kABggNsuJwAByV7wyhuMut6YbC6yFsCZZAE2rhPeeC1sMmTah3WjKwzKyR7npa3KfdAnk= X-Received: by 2002:ac2:4e07:0:b0:540:2a15:9b5d with SMTP id 2adb3069b0e04-5402a159be7mr56894e87.42.1733856013730; Tue, 10 Dec 2024 10:40:13 -0800 (PST) MIME-Version: 1.0 References: <874j3b1vf7.fsf@gmail.com> In-Reply-To: <874j3b1vf7.fsf@gmail.com> From: Sharlatan Hellseher Date: Tue, 10 Dec 2024 18:40:02 +0000 Message-ID: Subject: Re: [bug#74481] [PATCH 0/2] Handle corner cases of 'guix import go' To: Simon Tournier Content-Type: multipart/alternative; boundary="000000000000ca49ee0628eecf61" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74481 Cc: Josselin Poiret , Tobias Geerinckx-Rice , Mathieu Othacehe , =?UTF-8?Q?Ludovic_Court=C3=A8s?= , Katherine Cox-Buday , Christopher Baines , 74481@debbugs.gnu.org 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 (-) --000000000000ca49ee0628eecf61 Content-Type: text/plain; charset="UTF-8" Hi, If it solves import issues let's have it merged. I've not faced with such an issue before after importing 1k packages, maybe it's just specific for some particular ones. I've got go-build-system modifications pending to review, improving test coverage for subdirs and relaxing build noise. Your patches are LGFM. Thanks, Oleg --000000000000ca49ee0628eecf61 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

If it so= lves import issues let's have it merged.
I'v= e not faced with such an issue before after importing 1k packages,
maybe it's just specific for some particular ones.
=

I've got go-build-system = modifications pending to review,=C2=A0
improving tes= t coverage for subdirs and relaxing build noise.
Your patches are LGFM.

=
Thanks,
Oleg
--000000000000ca49ee0628eecf61-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 12 06:35:11 2024 Received: (at 74481) by debbugs.gnu.org; 12 Dec 2024 11:35:11 +0000 Received: from localhost ([127.0.0.1]:37950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLhTK-0002Wi-Fp for submit@debbugs.gnu.org; Thu, 12 Dec 2024 06:35:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLhTI-0002R8-DW for 74481@debbugs.gnu.org; Thu, 12 Dec 2024 06:35:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLhTA-0003We-95; Thu, 12 Dec 2024 06:35:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=UFFo79uacAl0QPVjayuMw5s7YFylSiNLda9DOIZ7Vys=; b=hlB397VMe2GOy7Mipydp Vuv2HiZcqRdcUt8NHw8vU1mROB/ezgdqv5mctyKsjcxWiL6zQ2ijQ8Z/8EtlQxqYEirxUrXljPD1p cKA9XgKmuerD7OaOb5OIIy6WjsjuhDO0HzrZkmTTkQ/glGpDdFc4YGlFTTtm/hVdZ9MRS1XCz1sPA 3USvAWnJlnRq/X5+imbouBKL0TufARCQkiqcbDIC0ln6jldHiWgheFRqWM66ZuuLFAOFOqAHrQ9Dy dQs53ip3dCvf6Fvb1TmL6rRcdqfSMyWupuTzO/87/e/iarAGUdmjYxYSkLLmyyYQ0p7NyIUgAQFaJ PU7ngavto190vg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: [bug#74481] [PATCH 1/2] git: Catch Git errors when updating cached checkout. In-Reply-To: (Simon Tournier's message of "Fri, 22 Nov 2024 20:09:26 +0100") References: Date: Thu, 12 Dec 2024 12:34:57 +0100 Message-ID: <87bjxhb0da.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74481 Cc: 74481@debbugs.gnu.org, Josselin Poiret , Tobias Geerinckx-Rice , Mathieu Othacehe , Christopher Baines 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: -3.3 (---) Hi, Simon Tournier skribis: > * guix/git.scm (resolve-reference): Catch Git error when reference does n= ot > exist and return #false. > (switch-to-ref): Adjust. > (update-cached-checkout)[close-and-clean!]: New helper. > Catch Git error when reference does not exist and warn. > Return #false values when reference does not exist. > > Change-Id: If6e244fe40ebee978ec8de51a6a68bcbd4a2c79e [...] > (define (resolve-reference repository ref) > "Resolve the branch, commit or tag specified by REF, and return the > -corresponding Git object." > +corresponding Git object. Return #false if REF is not found." > (let resolve ((ref ref)) > (match ref > (('branch . branch) > @@ -281,9 +281,12 @@ (define (resolve-reference repository ref) > ;; can't be sure it's available. Furthermore, 'string->oid' us= ed to > ;; read out-of-bounds when passed a string shorter than 40 char= s, > ;; which is why we delay calls to it below. > - (if (< len 40) > - (object-lookup-prefix repository (string->oid commit) len) > - (object-lookup repository (string->oid commit))))) > + (catch 'git-error > + (lambda () > + (if (< len 40) > + (object-lookup-prefix repository (string->oid commit) l= en) > + (object-lookup repository (string->oid commit)))) > + (lambda _ #f)))) > (('tag-or-commit . str) > (cond ((and (string-contains str "-g") > (match (string-split str #\-) > @@ -300,7 +303,10 @@ (define (resolve-reference repository ref) > =3D> (lambda (commit) (resolve `(commit . ,commit)))) > ((or (> (string-length str) 40) > (not (string-every char-set:hex-digit str))) > - (resolve `(tag . ,str))) ;definitely a tag > + (catch 'git-error ;definitely a tag > + (lambda () > + (resolve `(tag . ,str))) > + (lambda _ #f))) Sorry for not replynig earlier. I would avoid such a change: it changes the semantics of =E2=80=98resolve-reference=E2=80=99 in a non-trivial and h= ard-to-test way. Instead, since the goal is to address a problem that=E2=80=99s specific to importers (or to one importer), I would suggest making a local change in the importer itself, or in code that is shared among importers only. (This comment applies to this entire patch.) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 12 07:05:24 2024 Received: (at 74481) by debbugs.gnu.org; 12 Dec 2024 12:05:24 +0000 Received: from localhost ([127.0.0.1]:38054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLhwZ-0004Fv-Pp for submit@debbugs.gnu.org; Thu, 12 Dec 2024 07:05:24 -0500 Received: from mail-qv1-f47.google.com ([209.85.219.47]:52399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLhwX-0004Fk-60 for 74481@debbugs.gnu.org; Thu, 12 Dec 2024 07:05:21 -0500 Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-6d8edad9932so3569156d6.0 for <74481@debbugs.gnu.org>; Thu, 12 Dec 2024 04:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734005061; x=1734609861; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yyrQaHGNg87a+pUF90YE0a02zWgelZFFgPxPYH0eLSE=; b=GSRBgNgAvulT6xknj3+7cOCzViz70kbLhctAznYvRCQKYSq1qDU5XkrrulIYiLQ8pw EPjxK8pvijH+jESh0ij/ND8qhxSxyS3UQ5jSUWaWbHxytvr4OCTrY4zjR8PF6dtRWV+5 nlgN9X0spi9dIkT818bDETeQwSQXWOyVAsD7PyT6GHuidrqh02GqmJiIZOmu0WjLBOaF myA7blF6FvHKwSCjPcR3yNliM+BeHtD8FhOhalPLh3jpvmavr9IUg66Db9f9u2zEVXfH w6/B3SCGV62EAsvRY0/zQR+GahJUH1b8IfqzTY1BjL6fyRTzILZVzDbe4w/AmDHTQwPd De8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734005061; x=1734609861; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yyrQaHGNg87a+pUF90YE0a02zWgelZFFgPxPYH0eLSE=; b=ooB7eMWzOghVHJPgMacciCl1siY38mIr9fvbVCxh70AP+f5Gqv/TdDLtTRlXt69c77 CeFrFcjMxEwzYyfsUTUfily8wefK8lOYl0xc3wntTruuXETf28DET3fAbTSb9BUg9h47 z8WVR4RDG9W2M3hEyEx10exw/HR7ybwau9bfbVEZ0S8NrLmeSLHDa5SQpkOTctvTmwZA UC7vlxnBS0XrWA/dt1xdQK/4dUjTLdYBWuZDGgMSIcrEi9Bczw/G3GPcghpjig0x9wEQ wLWZqmWHqQT8xPheJQPzLrF7Iwl4J+T7q4YIxB45euRffJr32pGNA2xVTEvVbEPJU/ba B1BQ== X-Gm-Message-State: AOJu0YzGYKQMNv8vABXWF958sm3IGZx6Hx/jEi5orGhzYlYZzvR2lttj 3vpjoqa9LEEKCgFUDRnhg7rNTfjdEF6ZJF9TMeUOFLvXamuRYQyTXlrpPO3YXPUugw3gfZiRVc0 GSFqvjGsyq+u1ERayXGZn4iaEayUa2aNy X-Gm-Gg: ASbGncudpxlCLgx5I/8Bb0HufE2fqchNBzSZTVhio2z/HLf5HcmKx5CRka9cKIN9Edk Wk5RSKUGz+xVRxQqsjgZdMzrsyxsEdRQS+i3ULA== X-Google-Smtp-Source: AGHT+IEWzoH8S6gTTkLs9XCNa6HQ8Hoh7NTkqRnsMbs/tfc5zIquAzFbndvdQSXv67sRAebPY39QthY4GaBCISXwVfI= X-Received: by 2002:a05:6214:212b:b0:6d8:8fbf:d1b7 with SMTP id 6a1803df08f44-6dae39cf5f2mr45149676d6.43.1734005060714; Thu, 12 Dec 2024 04:04:20 -0800 (PST) MIME-Version: 1.0 References: <87bjxhb0da.fsf@gnu.org> In-Reply-To: <87bjxhb0da.fsf@gnu.org> From: Simon Tournier Date: Thu, 12 Dec 2024 13:04:08 +0100 Message-ID: Subject: Re: [bug#74481] [PATCH 1/2] git: Catch Git errors when updating cached checkout. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: multipart/alternative; boundary="000000000000aec7360629118388" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74481 Cc: 74481@debbugs.gnu.org, Josselin Poiret , Tobias Geerinckx-Rice , Mathieu Othacehe , Christopher Baines 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 (-) --000000000000aec7360629118388 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ludo, On Thu, 12 Dec 2024 at 12:35, Ludovic Court=C3=A8s wrote: > Sorry for not replynig earlier. I would avoid such a change: it changes > the semantics of =E2=80=98resolve-reference=E2=80=99 in a non-trivial and= hard-to-test > way. Could you explain more what you mean for "the semantics" of 'resolve-reference'? > Instead, since the goal is to address a problem that=E2=80=99s specific t= o > importers (or to one importer), I would suggest making a local change in > the importer itself, or in code that is shared among importers only. Well, from my understanding this suggestion is not possible because of the way it's implemented. Or the importer needs a rewrite. The crash comes from the call of 'update-cached-checkout' and it appears to me impossible to catch the error at the level of the importer because it's too late. If you think that's possible to have a local change somewhere in the importers, please point me because I'm clueless. :-) BTW, the bug of looking for an non-existent reference still remains. In other words, all the calls to Guile-Git as 'object-lookup repository' should be protected with some error-catch, IMHO. Cheers, simon --000000000000aec7360629118388 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ludo,

On Thu, 12 Dec 2024 at 12:35, Ludovic Cour= t=C3=A8s <ludo@gnu.org> wrote:

> Sorry for not replynig earlier.=C2=A0 I would avo= id such a change: it changes
> the semantics of =E2=80=98resolve-re= ference=E2=80=99 in a non-trivial and hard-to-test
> way.
Could you explain more what you mean for "the semantics&qu= ot; of 'resolve-reference'?

> Instead, s= ince the goal is to address a problem that=E2=80=99s specific to
> im= porters (or to one importer), I would suggest making a local change in
&= gt; the importer itself, or in code that is shared among importers only.

Well, from my understanding this suggestion is not pos= sible because of the way it's implemented.=C2=A0 Or the importer needs = a rewrite.=C2=A0 The crash comes from the call of 'update-cached-checko= ut' and it appears to me impossible to catch the error at the level of = the importer because it's too late.

If you thi= nk that's possible to have a local change somewhere in the importers, p= lease point me because I'm clueless. :-)

BTW, = the bug of looking for an non-existent reference still remains.=C2=A0 In ot= her words, all the calls to Guile-Git as 'object-lookup repository'= should be protected with some error-catch, IMHO.

= Cheers,
simon

--000000000000aec7360629118388-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 17 05:57:53 2024 Received: (at 74481) by debbugs.gnu.org; 17 Dec 2024 10:57:53 +0000 Received: from localhost ([127.0.0.1]:57741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNVGy-0000aY-LH for submit@debbugs.gnu.org; Tue, 17 Dec 2024 05:57:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNVGw-0000aI-7I for 74481@debbugs.gnu.org; Tue, 17 Dec 2024 05:57:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNVEk-0002BJ-Cm; Tue, 17 Dec 2024 05:55:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=AP0P27tKAxxk7iXPH4HMn8EJsgqCXzgWgYWEHx1TZC0=; b=d21IiaSHf3p1cM3WuG9W 9fgogt9xO/PjmJN/L4Ar+EwfVuuXHOs4tI5ejkZdWpm3b5hR9XfxCA885TWycAsayeo5rOoiwyfFB tvcshERwwIlwFfZkpgsNwJisbGVflBkedIhJLKlfPttDuRjlfFrTuSesL0vJUH/VQjV6vGzPOphLT E/8meqDhTHvQ9iMlb3mRbrL5TfaqxwLvLsg5slpHBSiaL7JyB+470YC9ddQfoiK+PoKdzVD7zUQa0 0fwxXngUBnaeVdfJiFevyU6JUVy4Vau8YAe2OUMby5OT/TQYDGGjGW7y2FhYGR6n76J5kkyQOkQOO ErfcXMMl/Cp5Cg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: [bug#74481] [PATCH 1/2] git: Catch Git errors when updating cached checkout. In-Reply-To: (Simon Tournier's message of "Thu, 12 Dec 2024 13:04:08 +0100") References: <87bjxhb0da.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 27 Frimaire an 233 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour du =?utf-8?Q?Li=C3=A8ge?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 17 Dec 2024 11:55:25 +0100 Message-ID: <877c7yr336.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74481 Cc: 74481@debbugs.gnu.org, Josselin Poiret , Tobias Geerinckx-Rice , Mathieu Othacehe , Christopher Baines 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: -3.3 (---) HI, Simon Tournier skribis: > On Thu, 12 Dec 2024 at 12:35, Ludovic Court=C3=A8s wrote: > >> Sorry for not replynig earlier. I would avoid such a change: it changes >> the semantics of =E2=80=98resolve-reference=E2=80=99 in a non-trivial an= d hard-to-test >> way. > > Could you explain more what you mean for "the semantics" of > 'resolve-reference'? We have something that can now return #f instead of throwing an exception. The many users of this interface are not prepared for this; worse, getting #f instead of an exception means we lose information as to why =E2=80=98update-cached-checkout=E2=80=99 or similar failed. >> Instead, since the goal is to address a problem that=E2=80=99s specific = to >> importers (or to one importer), I would suggest making a local change in >> the importer itself, or in code that is shared among importers only. [...] > If you think that's possible to have a local change somewhere in the > importers, please point me because I'm clueless. :-) I haven=E2=80=99t looked in detail, so I=E2=80=99m starting from the use ca= se at the beginning of this thread: --8<---------------cut here---------------start------------->8--- $ guix import go software.sslmate.com/src/go-pkcs12 guix import: Importing package "software.sslmate.com/src/go-pkcs12"... guix import: warning: Unable to determine repository root of 'software.sslm= ate.com/src/go-pkcs12'. Guessing 'software.sslmate.com/src/go-pkcs12'. SWH: found revision fa70679f0f1622a2705336a97225ee8d6c555f96 with directory= at 'https://archive.softwareheritage.org/api/1/directory/43d3e9f7167cdcd9f= 179e8d1de33d0d22e8fbd46/' swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/ swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/HEAD swh:1:rev:fa70679f0f1622a2705336a97225ee8d6c555f96.git/branches/ [...] In guix/scripts/import/go.scm: 116:29 4 (_) In ice-9/eval.scm: 619:8 3 (_ #(#(# # ?) ?)) 174:20 2 (_ #(#(# # ?) ?)) 177:32 1 (lp (#)) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure git-error-message: Wrong type argument: #<&compound-exception = components: (#<&error> #<&irritants irritants: (#< code: -3 mess= age: "reference 'refs/tags/v0.5.0' not found" class: 4>)> #<&exception-with= -kind-and-args kind: git-error args: (#< code: -3 message: "refe= rence 'refs/tags/v0.5.0' not found" class: 4>)>)> --8<---------------cut here---------------end--------------->8--- Would it be an option to catch 'git-error around the =E2=80=98update-cached-checkout=E2=80=99 call in (guix import go)? If an e= xception is thrown, it would print a warning and return a fake hash. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 17 12:46:17 2024 Received: (at 74481) by debbugs.gnu.org; 17 Dec 2024 17:46:17 +0000 Received: from localhost ([127.0.0.1]:60169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNbeC-0004WN-QW for submit@debbugs.gnu.org; Tue, 17 Dec 2024 12:46:17 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:48379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNbe9-0004WE-Eo for 74481@debbugs.gnu.org; Tue, 17 Dec 2024 12:46:14 -0500 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-43625c4a50dso39172225e9.0 for <74481@debbugs.gnu.org>; Tue, 17 Dec 2024 09:46:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734457512; x=1735062312; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=goFyH8kqwEQrCfVoRhBBl1xKrdlzYicFzp6BEjpu5qA=; b=Iogha4Azo/rRfc/pwxFDwjmbnKqXg5I9Kyka8MajGtaa2A0fit7RZ36Orw9hW886Ol PzWIu1bwJdbjowlenDiHC677mgZsQxy3ZwvapRdJ0AAEBS2m1e+Y6uKcv/hsn4yUE4si sIYVk5NSRc/HOO/GElrb+eFY91cFhle1gS9RpdQIEA12y5caprAFXCEBGf1Cb7BL6m/v JUcFi53Pc960KRzwyn67+Ji+VGw0u6lETJp3Lugm+Yx32YkfhRxMoCBK/8dldo6v8BkV /qfijIt1vi5apyjiyl2YHhSaFLqjShE623aZU2rvv2MTpdHJJsIx19i5SPccZMc+4/Wg KUdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734457512; x=1735062312; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=goFyH8kqwEQrCfVoRhBBl1xKrdlzYicFzp6BEjpu5qA=; b=QyrY6XxbWAm+UwsYB/JlzyAaxbg6wOfjhIa+eWCFqBHUTMLSaneNJPX1LnLJOz47OL j8AuCmlpi6vMynx8ja8RxtaNNPe6t3efIvkXAahXULFrLt6g5laJ95f3EcSRPyIpYgiU VTUC+QIXpTBFTW1ICyCmloLqC+R6gxj2Ts8aI9AMOcn1At+YOqLTFBzAOpFtD2lB9A7/ /DabOetkcaxF/wh1ZbVXoD4WLE5p+CvxCslgmrjEw6Y73pYv5yxNiJwvM03S/OHsrkmw fYxUyg+no0mhr+ddsfpcjKdGJwG+VXpYJtgil/8BNAwevXsJLypc0EBHhScgqpateJoq SL/g== X-Gm-Message-State: AOJu0Yw5NdadxIIbuXphkwQN5gYhl1vRcr2vXUQySwUaEsaq7QY98WSn 46Hk0aXOhmD+IreZ03JwOgV501cGoyxORjNaUv52rUHLMxk6P2DYCUBWDw== X-Gm-Gg: ASbGncvpXQIZARFmLHMOUW9BgxaKKGYww7dLnOZOxMgtjs+BOtNQp/wY93BDxpetb3s X1t6UoKHcRtnDy5dAe+8PR9uTGE+i8nPxMdXhU2K/RbkOP8/Jbt0mNQYCJaXEqgC+8aj3jagP73 6JHW9/mPSVhWECuNZHMZ3dUfywBjJmI7cbPvRmtyA21HC5Viatc6pRBZymnz7d5sJy7x/45j88X OXppCFLZy+0Xv1jyGioMmVxpbEdjbEXhNdonq1sbXOOuvO4KYQpM3TkQiF0aBhs3y1xg+p/Bi6+ +4fpxkSEsIU= X-Google-Smtp-Source: AGHT+IHqE3d8NFmb0PaCMCLjU3dgTXst+jYkItjG4rj9jfpCps5Kv6nbHuXRs8clkRo+AW8HZ8XxPw== X-Received: by 2002:a05:600c:4509:b0:434:a10f:c3 with SMTP id 5b1f17b1804b1-436530d7337mr2653825e9.9.1734457512222; Tue, 17 Dec 2024 09:45:12 -0800 (PST) Received: from lili.. (33.148.22.93.rev.sfr.net. [93.22.148.33]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43625716d4dsm178046195e9.37.2024.12.17.09.45.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 09:45:11 -0800 (PST) From: Simon Tournier To: 74481@debbugs.gnu.org Subject: [PATCH v2] import: go: Warn instead of error out when Git fails. Date: Tue, 17 Dec 2024 18:45:02 +0100 Message-ID: <494fef0566a7105bf4ae04f5efeae742561f3abb.1734457415.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Debbugs-Cc: Katherine Cox-Buday , Sharlatan Hellseher Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74481 Cc: Simon Tournier 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 (-) * guix/import/go.scm (git-checkout-hash): Return some hash although updating the cache fails. Change-Id: I87e7701023a5f76f5d1494827473616e6a1275aa --- guix/import/go.scm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index 32cba25b33..6ede152601 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -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) @@ -563,10 +564,18 @@ (define* (git-checkout-hash url reference algorithm) (chmod cache #o700) (let-values (((checkout commit _) (parameterize ((%repository-cache-directory cache)) - (update-cached-checkout url - #:ref - `(tag-or-commit . ,reference))))) - (file-hash* checkout #:algorithm algorithm #:recursive? #true))) + (catch 'git-error + (lambda () + (update-cached-checkout url + #:ref + `(tag-or-commit . ,reference))) + (lambda (key err) + (warning (G_ "update-cached-checkout: ~s ~s~%") key err) + (values #f #f #f)))))) + (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 base-commit: a9003b8e6b40b59c9545ae87bb441d3549630db7 -- 2.45.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 17 13:07:33 2024 Received: (at 74481) by debbugs.gnu.org; 17 Dec 2024 18:07:33 +0000 Received: from localhost ([127.0.0.1]:60211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNbym-0005YP-Oa for submit@debbugs.gnu.org; Tue, 17 Dec 2024 13:07:33 -0500 Received: from mail-wm1-f54.google.com ([209.85.128.54]:60426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNbyj-0005Xu-6v for 74481@debbugs.gnu.org; Tue, 17 Dec 2024 13:07:29 -0500 Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-436202dd7f6so61196275e9.0 for <74481@debbugs.gnu.org>; Tue, 17 Dec 2024 10:07:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734458783; x=1735063583; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Dr1NX6IS+MukpQcjAqU7d1A4LJYWmbHhhkqTomACBxI=; b=l8JfSJVt0xJL0B7O1As6Ve8Pud0pEU3KP2WE4MDlcOojojCX5gWGGsvMfzm/xGzAHu KiAD313zD3oiALNS+xtN2V1PjEoTHc1YLu/JMAaMNkrRO4I1KnrJ/LFD4/HyCXjSjAaJ 9K2cpmXG3oLJlWyhFKyLmizqE6HOXr5EL53Yb+FO5pGdk/CLV4e5bQ1bpImsaG09/Y5L nhZsQleUMtc1AP9h/JBfHgmE/k8qFw5AZmfuQHXwKsWDcAqROzNgPDkTKgsMJHOt0pH6 PE6iLX72TWzG3sBHqle3ztY/TLduBXOAg8MsCEHyuCtf1uc4W/cbRuWE4nEpB2zzJ1kq 3TnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734458783; x=1735063583; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dr1NX6IS+MukpQcjAqU7d1A4LJYWmbHhhkqTomACBxI=; b=bKWth6zk/gE9Mr1O0mRhV8wdOS8TmEWd9gjDKwKkpxdQD6kJFBZMW5/SZgaeyqY+ao KwK8e0nMhkCeu5CXhayDWLws5I3DJbW3nORVfdJDk/K8tAhAa1Yh4fUNj82QR2WjSKzP xKgoOCposlUJQ4Fq9YIUGwq+BpMJmO0gtfxwuAizCQL8V+Ku9Ta/bVFBb6x/Yh1tX2AF crThCV8X2J0WZaiacYGoYdTNEMQw/x6xlbNBtfnNtJcNcM3Z2xKGw/Vj4SF7Iof+OjiE 25PWVU3dzbItRKaQkv7SyzNkuLXxhXkih0OaeO8fKxs/QE3oFAJj+WENbr+9We1DMEh6 u74g== X-Gm-Message-State: AOJu0Yw86tJPm7BMYdUcV5MlEME1o1olW3wyGRwP8C+tOewpLniSbb5G wRiIxS1cgv2CEgE4XktFD4tD1vC/zwk6wGqjvS9vJwyY9WyDTE/r X-Gm-Gg: ASbGnctZpTNXhf6C4WWveGIlhnd2aQj/h4+VOzw8zyT7CXlOmbTK7HN1fE0FikgtDO3 SPQ2WvuOD+3uxH1Kwp4tXBd2WDJ60FId6RN61RMjmYiljNZiGxTyR6TCbLYYzM8LkoqrR6wx1ps 6NTa1zEJRrJznibP94DNxSebI88gXhKG6B9SOfXar2yjRXTBMPgXeLJt9s//eqQ8hUjD+ZfS1x2 w58KL7SycTClMIumGfrBXMGqNwe5QVLK6UAbQ5fwut1zRHcl1niQmThRcWl7Sxc18pXFzkmqbwk vVfDp74+ X-Google-Smtp-Source: AGHT+IGzlKQV8+lEeB8Sn8AHo6z9tRZRoT4XHbU4FnNHtnj8PYXN29k7eglCxB3aaD5DywQxubjVuQ== X-Received: by 2002:a05:600c:1da4:b0:434:fa61:fdfb with SMTP id 5b1f17b1804b1-4362aa3c52bmr168372075e9.18.1734458783337; Tue, 17 Dec 2024 10:06:23 -0800 (PST) Received: from lili (33.148.22.93.rev.sfr.net. [93.22.148.33]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4363602d940sm124157125e9.12.2024.12.17.10.06.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 10:06:22 -0800 (PST) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#74481] [PATCH 1/2] git: Catch Git errors when updating cached checkout. In-Reply-To: <877c7yr336.fsf@gnu.org> References: <87bjxhb0da.fsf@gnu.org> <877c7yr336.fsf@gnu.org> Date: Tue, 17 Dec 2024 19:06:14 +0100 Message-ID: <87seqmfall.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74481 Cc: Christopher Baines , 74481@debbugs.gnu.org, Josselin Poiret , Tobias Geerinckx-Rice , Mathieu Othacehe 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 (-) Hi Ludo, On Tue, 17 Dec 2024 at 11:55, Ludovic Court=C3=A8s wrote: > We have something that can now return #f instead of throwing an > exception. The many users of this interface are not prepared for this; > worse, getting #f instead of an exception means we lose information as > to why =E2=80=98update-cached-checkout=E2=80=99 or similar failed. Thanks for explaining. Well, I=E2=80=99d say =E2=80=9Cmouais=E2=80=9C :-) about =C2=AB lose inform= ation =C2=BB since I added some =E2=80=99pk=E2=80=99 here or there before finding the relevant piece of cod= e. So the exception is not very helpful, not to say fully useless, IMHO. That=E2=80=99s said, I understand your concern and I will not discuss it here. :-) If I read you correctly and apply the argument, you propose to guard all the calls of =E2=80=99update-cached-checkout=E2=80=99, it means: --8<---------------cut here---------------start------------->8--- ./guix/import/egg.scm:94: (directory commit _ (update-cach= ed-checkout url))) ./guix/scripts/system/reconfigure.scm:355: (update-cached-checkout ./guix/git.scm:670: (update-cached-checkout url ./guix/inferior.scm:877: (update-cached-checkout (channel= -url channel) --8<---------------cut here---------------end--------------->8--- Either using =E2=80=98(catch 'git-error=E2=80=99 or either using =E2=80=98(with-git-error-handling=E2=80=99. Right? > Would it be an option to catch 'git-error around the > =E2=80=98update-cached-checkout=E2=80=99 call in (guix import go)? If an= exception is > thrown, it would print a warning and return a fake hash. See v2 for this case of =E2=80=98guix import go=E2=80=99. Cheers, simon PS: As I said earlier, I think all the call to Guile-Git should be guarded and each call should manage the exception instead of propagate it=E2=80=A6 and so barely catch them. :-) From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 18 15:19:12 2024 Received: (at 74481) by debbugs.gnu.org; 18 Dec 2024 20:19:12 +0000 Received: from localhost ([127.0.0.1]:36122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tO0Vj-00078n-Q2 for submit@debbugs.gnu.org; Wed, 18 Dec 2024 15:19:12 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:52547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tO0Vh-00078f-NF for 74481@debbugs.gnu.org; Wed, 18 Dec 2024 15:19:10 -0500 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-436341f575fso693895e9.1 for <74481@debbugs.gnu.org>; Wed, 18 Dec 2024 12:19:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734553089; x=1735157889; darn=debbugs.gnu.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=wS1EB7+p+PF86DGs9B4Y1MY6U/MXAfM/bLCoXqC8sLk=; b=H/RqL5QfmobQfL/H+kLLg35u8IjmLMGlwBIQeWh6CDM+g1y1O1TI+ovRNicTO6acV9 JEv+oubdGO2cvoOYvNIqR4YtFVF4W2CIBba2BvlQ/LTcN0pisnEE6LDby8Slnox1sorL 5yxK7PKeGi/ZF7PZ2tJosoXslWHrV2of1lPyrez56FLYFxrAid333ZKqlhpjX6NjMA0n oz88IR23+YbXLKp+hJ/q64Fa2F6Z8V3gMHpQhO5uWvcNysE8LhxQ7DM/TxaAeI+gC7bA s3laMwBsEluPhuvLJOy0/dVogU3AM6Wv3+PaB0fz0dtvr3LU2JgFi/y+0hA6aioKd4WZ Fqbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734553089; x=1735157889; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wS1EB7+p+PF86DGs9B4Y1MY6U/MXAfM/bLCoXqC8sLk=; b=KOhXNnSl5khQxmimH6KPrDeA6KG1j545F8DUyAUnWyCO65/n9iicBl3nEUg7bWiiUo EMO3LxA3vTZqMLuAH3pcGItyZLsG9T/9+jMckjYIulagUpKF3AOqElpA1hyqmNN9zC7N s32Qc8Q8Z2bZjBq8LTo6hPd2TIzEGbma7LUYnyf++3AOaxFjRG4W0HBiIY3Q8fR8FBwT jNQdKZFtCTWvzcgVcwew2jGQUZzUIb0e2jOU22cmPNc0PUMp1VFMxn7K+Z5QssupOFuS tdPHWIVOU/p/zdJbxRGBu4HdnpRU+2/siUBYTEkU0rUBJY3684SVahP1HqiPACTq8rlw IKfg== X-Gm-Message-State: AOJu0Yza7q51UVQoi7LjfpHT0SO0iv5smjYMEmk3eENrdooj1K/4WbYT 0LXGA1sZury/HYB5lLs+/Rbf4Zo9LI19PrfsG5egmAzH5iqVQeYt X-Gm-Gg: ASbGncvenmwqh73bpJUoC7/Me98jXSljFsrPsRlDjbL327N/wsDn3FEZ9IpsIDXwgNh ZFKJlBr50Sns9JD539pCyvGyrSeWRm1x7yKCeRZuC79fNHic7EirtjVeOHeTkt1IpmE7OC+ETMV k+uUmVjSgJ2nIjsjF3lkrlT6sA4Xaoj8No9RrjFgMh3GzGtRbb1CRvLk3Edt52TIWhoDlZGgWro zokYgYRtiJxIghV01/3sV+JBl9N9gz8K/f2VTv0PWIGYjWxlMijFr32ftWffF7Z9b7dQ/kHgkhQ QhRXkrijfzTX12D7L4Bw9EitybOvK1DJ X-Google-Smtp-Source: AGHT+IG5IU7CMiXhWi2x8bp6YyQ9PuWBCYT/LMgHSqODmvl96bFPLnkaozV1it8YGJBxEip/gNSrRQ== X-Received: by 2002:a05:600c:3b0c:b0:434:a802:e9a6 with SMTP id 5b1f17b1804b1-4365c77d9a9mr5836525e9.7.1734553087623; Wed, 18 Dec 2024 12:18:07 -0800 (PST) Received: from guxtil (cpc100684-bagu15-2-0-cust967.1-3.cable.virginm.net. [86.8.111.200]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b01b2dsm29854555e9.12.2024.12.18.12.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 12:18:06 -0800 (PST) From: Sharlatan Hellseher To: 74481@debbugs.gnu.org Subject: [PATCH 0/2] Handle corner cases of 'guix import go' Date: Wed, 18 Dec 2024 20:18:01 +0000 Message-ID: <875xngpwxy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74481 Cc: Simon Tournier 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 (-) --=-=-= Content-Type: text/plain Hi Simon, With your patch applied I could import 971 packages' templates which 100% cover this tasks! --8<---------------cut here---------------start------------->8--- (define-public sqls (package (name "sqls") ;; TODO: The latest version requires a way more packages to be available ;; in Guix. (version "0.2.18") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/sqls-server/sqls") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "13837v27avdp2nls3vyy7ml12nj7rxragchwf92adn10ffp4aj6c")))) --8<---------------cut here---------------end--------------->8--- Packages were not tested but importer did not break and completed after 2h. -- Oleg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmdjLfkACgkQdtcnv/Ys 0rUUNg/8Dmp33G+c4iHNUHPgikwumVBPQE2Y4UwNtI9BptD5HE5xphLjespgOVIv xZKBWQVw2iZguCmh45mKvSbsD46YaGoo6xFe6T5xmwTboNY0K2Uj+tUEGwWnVuSq O1fer5BUW1DYO9F25jacrM/9eWvC2DjSSCrWGlpjTHgNhMBSXYMTnqukj+k9QgD5 Q/TWB070HBrUnrC0P4yI+qu8wz+jKtGQ1panCTp/Xb7/zzU7aSdU4GqSljtMBfGk /Aycepj/k4MTRKrCjCbJbUmQlY0DiXCRZtCXbrpXR2Hw85366n8/UF7961VvVO9m Kql/Usq1GyAMXoBQby/f4ElPx/iODaiZpGieAqn5GMdLYX8opYZOlfkovfjXPzO0 ZbGF59sO+OEN6LO6uN98JkVS8WhsFCr4PaNerh2v0nUEoVel7HU8+SnA84mv/OPE bhCAL9+Fq9jY3kWmaE/JXnzu0Ng0Fchacri7fMVutZ6fjAtLltKsN1kiBnqxkl+4 6VJbTaDTeKOLIE/PWG8loQMaxy33/+QoE5dmBNKyvq58c9JVuzZcOEDAkC6QA8TS LwGy48xrwGLMwJ5DzUo4jRQyEMBxclXaBrAgt92t/sVzxThPmK04lufCUyBgljNF xqCNTOQ400Urex8cJCv4MUXLuOkYHjSEb8cbpGd6XpbjrlFxg1I= =s1pK -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 16:14:51 2024 Received: (at 74481) by debbugs.gnu.org; 26 Dec 2024 21:14:51 +0000 Received: from localhost ([127.0.0.1]:42448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQvBy-0002LP-W1 for submit@debbugs.gnu.org; Thu, 26 Dec 2024 16:14:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQvBw-0002LA-Vz for 74481@debbugs.gnu.org; Thu, 26 Dec 2024 16:14:49 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQvBr-0002MJ-PM; Thu, 26 Dec 2024 16:14:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=0Uku5r0iTpZVpLq+ajrd5nfGjnnVmB8b37coxb9n5oo=; b=Gkwx07njLRlEt+yfnVKo 4Zg4I8zBnRwPF1a39TM2KcxCQunSz3s3PeNa/KJwUfnCQhSwubk1U5vewYbqrncfJoLqiWv8/93IZ OoMhGjQAGI6wXsekrtfadxkTVzUBhUl+JhGuHk5ramUWEfFuBlVMRYHIImmLXJ5+v7WQEcYBefzjy UH2zM/11JPgNRYV+6QVlSlzzkUTWMv1EJLqT3o2YGxOu+slfjveh/jlzyG3E+L2VB2QNFD9nnO86q 5Ps8Rj9RDObjVghrMI+pJ454oe7ujoYgHQJmtTX99vF+6vUjtR5mg6VOw/+tKqbdDi7HjMop9ZpfZ 4Mxj3fjBfcYAnA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: [bug#74481] [PATCH v2] import: go: Warn instead of error out when Git fails. In-Reply-To: <494fef0566a7105bf4ae04f5efeae742561f3abb.1734457415.git.zimon.toutoune@gmail.com> (Simon Tournier's message of "Tue, 17 Dec 2024 18:45:02 +0100") References: <494fef0566a7105bf4ae04f5efeae742561f3abb.1734457415.git.zimon.toutoune@gmail.com> Date: Thu, 26 Dec 2024 22:14:41 +0100 Message-ID: <87bjwy170e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74481 Cc: 74481@debbugs.gnu.org, Katherine Cox-Buday , Sharlatan Hellseher 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: -3.3 (---) Simon Tournier skribis: > * guix/import/go.scm (git-checkout-hash): Return some hash although updat= ing > the cache fails. > > Change-Id: I87e7701023a5f76f5d1494827473616e6a1275aa [...] > + (catch 'git-error > + (lambda () > + (update-cached-checkout url > + #:ref > + `(tag-or-commit . ,referen= ce))) > + (lambda (key err) > + (warning (G_ "update-cached-checkout: ~s ~s~%") ke= y err) Rather something like: (warning (G_ "failed to check out ~s from Git repository at '~a': ~a~%") reference url (git-error-message err)) Apart from that LGTM! Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 16:17:42 2024 Received: (at 74481) by debbugs.gnu.org; 26 Dec 2024 21:17:43 +0000 Received: from localhost ([127.0.0.1]:42460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQvEk-0002XH-IT for submit@debbugs.gnu.org; Thu, 26 Dec 2024 16:17:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQvEi-0002X0-BS for 74481@debbugs.gnu.org; Thu, 26 Dec 2024 16:17:40 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQvEd-0002nJ-2y; Thu, 26 Dec 2024 16:17:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=x+CQiXnYtzxGxiy1bsiar5AJAQiKgFWxBM8fN8FAdwo=; b=XRevEsef/jsCrd9KOcF5 d2WE0BoKJpAWH7YAw9wOUpt+nO3P5r8mdTWGPuSsErdkwfA6TsXzwWeSSqvnxq0bAqZnF8I3vkr4T mZYGZu6UGaYz0lsXWMGNRlQdCZ4vnkr+6vQNlNiHjVeXR4VZ5aJg5LT/18emJp+Dws0ABugL1wzjM iwtVShwd619c2ceemac60KWgH/9Zc3n7UvTA9aPJaYWsJ/KGnLCmj1HARZ1pGtPLO5XZkwGWm5uYL aLogmOM22QNWkpU/ti6theV+zoKps8ZRYAY3sO01vs/2YkCA2B8j3C9S9WsDMBc7w1VqBV5i07mHl HiMYjCTV5ZfVXg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: [bug#74481] [PATCH 1/2] git: Catch Git errors when updating cached checkout. In-Reply-To: <87seqmfall.fsf@gmail.com> (Simon Tournier's message of "Tue, 17 Dec 2024 19:06:14 +0100") References: <87bjxhb0da.fsf@gnu.org> <877c7yr336.fsf@gnu.org> <87seqmfall.fsf@gmail.com> Date: Thu, 26 Dec 2024 22:17:32 +0100 Message-ID: <878qs216vn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74481 Cc: Christopher Baines , Josselin Poiret , Tobias Geerinckx-Rice , Mathieu Othacehe , 74481@debbugs.gnu.org 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: -3.3 (---) Simon Tournier skribis: > On Tue, 17 Dec 2024 at 11:55, Ludovic Court=C3=A8s wrote: > >> We have something that can now return #f instead of throwing an >> exception. The many users of this interface are not prepared for this; >> worse, getting #f instead of an exception means we lose information as >> to why =E2=80=98update-cached-checkout=E2=80=99 or similar failed. > > Thanks for explaining. > > Well, I=E2=80=99d say =E2=80=9Cmouais=E2=80=9C :-) about =C2=AB lose info= rmation =C2=BB since I added some > =E2=80=99pk=E2=80=99 here or there before finding the relevant piece of c= ode. So the > exception is not very helpful, not to say fully useless, IMHO. The exception conveys information about the failure: no space left on device, host unreachable, invalid certificate, etc. Often =E2=80=98with-git-error-handling=E2=80=99 is used at the top-level be= cause the error is not recoverable so we just want to print an error message and exit. In other cases, we explicitly want to catch, say, GIT_ENOTFOUND because there=E2=80=99s a fallback path in this case. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 31 10:27:06 2024 Received: (at 74481) by debbugs.gnu.org; 31 Dec 2024 15:27:06 +0000 Received: from localhost ([127.0.0.1]:36516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSe9B-0001DZ-Sr for submit@debbugs.gnu.org; Tue, 31 Dec 2024 10:27:06 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:49196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSe8y-0001Cc-3r for 74481@debbugs.gnu.org; Tue, 31 Dec 2024 10:26:54 -0500 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-43623f0c574so68597125e9.2 for <74481@debbugs.gnu.org>; Tue, 31 Dec 2024 07:26:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735658751; x=1736263551; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=R5FUsxPxQRBBGCChkNAJaZrKr9RrVM+Al0bLgEnB4J0=; b=d+6xEbd73DwuwXEGU3brdwxLCK4ceNPf1yn0NGpzvKWumgP085Fg937glt+gTYeckC CHS+y25HF9+D5joOavNDSLkAYaa4tc/bdAKNCzHo79AQbpBOjIDvnx87HyrqFCLjMGxy y0At1EEYSKT3HaL1nm6m5u41zmIgvF8Y2q8PCZJv/o0YGqLdh5qYl7dRNtaZDl91+XLG 5F7Qr8p9JimU6VSdntqZ/80R1/hlTBhCdNJ2Lp7YI7cUOsoCXRZCzd0f9HGMZwQbGmAh NjkVBLe6KTO+d7nQEZwpfwLg8RjE9YN/2iDqwGB75K+q+gl+76UQH9Khjy7yDqsJsr7W 3fag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735658751; x=1736263551; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R5FUsxPxQRBBGCChkNAJaZrKr9RrVM+Al0bLgEnB4J0=; b=UpAw6LfLq7/vvamDZ0qDR0MQBonBaqtDSftT4lvK7nKradd+/pOJkXRzPUBqZ9wJ9U dhM4K2vkzfY2mOSYkVeBxM96hRTVrJE8gq1HxnjIkgL5vVKAcBf1C2bPGnw0EcbuenQp wxw6Xzcql3sxd06CeS3TRbPqeNlT3Ew2eojKHva3f0w06Tdyk4xYgePSeo+aIoIrP6d1 L2pW5Ualr4YvPGFjHUCrTnM3PQKnMvk6zjteum/c0L5l5CD099iLFOBQSfquJYbN6+79 7giMEaGdIklBZG8nhTj7cMuUFv51W+88hVuasLyAGhbrAtlwPDwRdA9p1hhVoasO+vTR msZw== X-Forwarded-Encrypted: i=1; AJvYcCW4UEB/oUzQNZ9qmtmHb55L+jGma3wD5eqVc4BH6/Ox6hWRn0bBk4ltRVu5lhLvflVBDko5ow==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy+7Jko6bNc559k2GdoOzmruKhcenps5rFFiGEPdtlDFmTfJhQ0 +suVJh7PBExSp5JQ94gIqVO1Rc7Xuc2H8LjF/0j5fBVrVQQoDBEGyxgvUA== X-Gm-Gg: ASbGncuY5k6/j0tnVBYJJ8fLqo1G2vfz7VR4Bs4KAHIoYT0saB/pd3ztRRROx+ZPHg4 A22i2SvurVWGRGZ9k2Pv54fYFh+e+qS1S5DPrZGPes/RvTa2ZjFazVkDghLSawfz6LDGVOaQ2yR Ur4lOZdCgbYcSJOavWPopew3EJ0U9uiEFwRrvjZGg8qxBjHmNgel217V1gA7Y9ONK/kK6JwicdE 7+TNZ3XjdcG4RHeuOcpIClgyJtSxqHDvpDLVcYQbkmPr8049i5bGGNkidDTKDab0a/YtfwrGL5K pkHUYivYVcSv48rKm7znwPqplPifZ2JgqDfO8qVWnQ== X-Google-Smtp-Source: AGHT+IHqtQMyyPzbUQys7Qa0DGTx3GoxKjG3QG2cagchTFz/cnTIHWQ9gXvEUpXMfxnIpYgwz34ujQ== X-Received: by 2002:a05:600c:1c87:b0:434:a10f:c3 with SMTP id 5b1f17b1804b1-4366864320emr349862905e9.9.1735658750803; Tue, 31 Dec 2024 07:25:50 -0800 (PST) Received: from lili (roam-nat-fw-prg-194-254-61-45.net.univ-paris-diderot.fr. [194.254.61.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656af6c25sm424100955e9.8.2024.12.31.07.25.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 07:25:50 -0800 (PST) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#74481] [PATCH 1/2] git: Catch Git errors when updating cached checkout. In-Reply-To: <878qs216vn.fsf@gnu.org> References: <87bjxhb0da.fsf@gnu.org> <877c7yr336.fsf@gnu.org> <87seqmfall.fsf@gmail.com> <878qs216vn.fsf@gnu.org> Date: Tue, 31 Dec 2024 16:25:43 +0100 Message-ID: <87h66jzxfs.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74481 Cc: 74481@debbugs.gnu.org, Christopher Baines , Josselin Poiret , Tobias Geerinckx-Rice , Mathieu Othacehe 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 (-) Hi Ludo, On Thu, 26 Dec 2024 at 22:17, Ludovic Court=C3=A8s wrote: > In other cases, we explicitly want to catch, say, GIT_ENOTFOUND because > there=E2=80=99s a fallback path in this case. Ah, I see. Thanks for explaining; all clear now! :-) Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 12:42:46 2025 Received: (at 74481) by debbugs.gnu.org; 6 Jan 2025 17:42:46 +0000 Received: from localhost ([127.0.0.1]:39909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUr7i-0000qF-Rj for submit@debbugs.gnu.org; Mon, 06 Jan 2025 12:42:46 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:56779) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUr7h-0000py-6f for 74481@debbugs.gnu.org; Mon, 06 Jan 2025 12:42:41 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-385ddcfc97bso12386155f8f.1 for <74481@debbugs.gnu.org>; Mon, 06 Jan 2025 09:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736185360; x=1736790160; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=rjWmANJvTB1luQ7wxqlUhwZ1RgO1cEA7AKSOELbNCLE=; b=QeehB2394xVTh2MC2Kv2qEaNilpqijilLrqi9uALnM0J1Mrdq/qzBB7sIMPT0k32N4 7DNe1ArsTHTsVSGWXoo1o3RP6AgU0NG5/N/Velgt+J/AKZkYXyvACl56YPHGXjbXJcSp KNKSEHmYiIqUZhn+TqDva5vwuRlbZMrGjsTCzSEYkE4DoyePPyAjd1wThsXWse9H3/PI yrEc1s/Zi8Z1+9LfEJ1Uzp3pmVVVm+vjQBdfXhT+r0tdCOwCPQ3CcL4qG2oYEroIgU86 RvzKiucYbaljAfrqzcIsbZipi0wW9NymdI00DAkEDzZwSn0CDvRUkJjvdqWE3dyovQa5 f2iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736185360; x=1736790160; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rjWmANJvTB1luQ7wxqlUhwZ1RgO1cEA7AKSOELbNCLE=; b=Axy8Xv6BnTTtK9Z2p6JNs06cM7kvFeIKG8Jzn8GI9COvKW7hMFr8P8s5wMteI+MGB/ dgQ991e9yLA1YR4Ko20VKZ+PZw6RPbetv79WC5pCzHrWtk3vWgcP+bG4T5NXlEjAc5A9 9GzT666nSkVQEB44O7ZJrB27OxmXBQfvM6ZXFXKFVCZdIGyYYkVcX270O+pBxEfVRP3r 2CQGLor6SfsPemmIyotbjhXD1vY6GU6z5sUD2bbg9HIAB+zUJqMGPNzVruYxoL7CmSTR JhE6ouTIHcARaiwTJErPuyYv1eCfglbYMWUZtPlZrX+8wZUQqwSbLxsCMPulPxgqVDWf lhnw== X-Forwarded-Encrypted: i=1; AJvYcCUtO6lejWXZ6gIjpkij6Jjhrcu6I8F0AB+3BV4MKrg4jyu18uJir1ueNW14IWkKc42etwfvJw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwUK5r4cBitacD3JmHD+9X0FutBr/aJFqp+MbnX1RvXnWGDExYI 0N6iVpqG8wXH1bdJhGZtkp+Gg07PXu1SGOpOcWnxYvOHoygeUEcsPXJrLQ== X-Gm-Gg: ASbGnctA+FQUlRGWJtsTpKz+edaxbXwSaXB6n7Tg8ndoUeY+5mZ1FVn4TxraPH8UanA BqZ0xgD6sykJYcLtqV6THLqspx/77Xsh/dekJKNt2wPbKrwKSq+v1XIJUBqo0eXxfVGD9p1IJNi FSzhh0NorKfUjhVrOn9xXZqbIHzFM7F0AIqkYsGtGkHzEfsItSA1OYURJ7fZfEM0+uCd0r425bl Dn3IDKuULj+y84uCpqTbAVROK/mbF5zOihBVek3AwU9AP24gOb1/pnWjZruUbCCi0oxRs8Q7tPr ERzKB96qDiA3UG402/xkasCEiqBxz8uMfbxHRpef6w== X-Google-Smtp-Source: AGHT+IFXmJaMqQyXgffB0eOGKxCdl5P+o764t6f38iZflEJrrO1Ll3uMx3yBc3sT6fBOaXkCdAyqiA== X-Received: by 2002:adf:a181:0:b0:38a:4b8b:295a with SMTP id ffacd0b85a97d-38a4b8b2a31mr20660239f8f.31.1736185359643; Mon, 06 Jan 2025 09:42:39 -0800 (PST) Received: from lili (roam-nat-fw-prg-194-254-61-40.net.univ-paris-diderot.fr. [194.254.61.40]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4366127c4bbsm570849025e9.32.2025.01.06.09.42.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 09:42:39 -0800 (PST) From: Simon Tournier To: Sharlatan Hellseher , 74481@debbugs.gnu.org Subject: Re: [bug#74481] [PATCH 0/2] Handle corner cases of 'guix import go' In-Reply-To: <875xngpwxy.fsf@gmail.com> References: <875xngpwxy.fsf@gmail.com> Date: Mon, 06 Jan 2025 12:26:09 +0100 Message-ID: <87ldvoxjxq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Oleg, On Wed, 18 Dec 2024 at 20:18, Sharlatan Hellseher wrote: > Packages were not tested but importer did not break and completed after > 2h. Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42d listed in] [list.dnswl.org] X-Debbugs-Envelope-To: 74481 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 (/) Hi Oleg, On Wed, 18 Dec 2024 at 20:18, Sharlatan Hellseher wrote: > Packages were not tested but importer did not break and completed after > 2h. Oh, cool! Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 12:42:52 2025 Received: (at 74481) by debbugs.gnu.org; 6 Jan 2025 17:42:52 +0000 Received: from localhost ([127.0.0.1]:39921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUr7r-0000rJ-Mr for submit@debbugs.gnu.org; Mon, 06 Jan 2025 12:42:51 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:47549) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUr7k-0000pv-BO for 74481@debbugs.gnu.org; Mon, 06 Jan 2025 12:42:48 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4364a37a1d7so153474315e9.3 for <74481@debbugs.gnu.org>; Mon, 06 Jan 2025 09:42:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736185358; x=1736790158; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=G8cGVnSexmyfLzv2CJA+IFvi2bgjmoRWGmPzcBth+x8=; b=G2w2cCzULgVLIrqx5tu8nY5lqgxr50pY/d6//w64WXOCyIIcnVFbmZQQLQldmRr6qI 7nqQmUlArWJ0VUA7/C0wpAlyIrgU7ZESU08Bw1P4LVwEIGFl0cncJ+q0emxaLjZXYMC4 if7fgt5s7GLZ2yq4egUMtybWlSMiuCVtI+JCXZsHuNTMUlFomZ4FWbiB6siAYdxoJsOY wKaPtbwRSE4reBjNAHbGHwH+hnkzwivSJkjiTgPGknQWcQcYX8Si+Biju6ibi82hyfxm r19tgczi1cAVo8Qc4dFqBSocl9U0ZfblNLPmL5lO2Uvj1vZtNdIBW9R5v3Rgu6EKQxvg M+Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736185358; x=1736790158; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G8cGVnSexmyfLzv2CJA+IFvi2bgjmoRWGmPzcBth+x8=; b=GDHiOr1HHbC5XKrfm6fOX9TqAG8xABnIypgQowqwIw98vBADsPieKYtYbOZjgI/1ts sYVQm3LJLkpkMxzLg4wcwVWrND5euj1E82BlV7CmKfz74NaKN11QoS/KnWHKDLmg370i OlW/0MnV43mqahEA0LtcBrQqfFB6JHdI3VeEDdwwQ0PNTZ+B+fSvsRIxcaICMdnYO27N Aj8DxjrTHSVlwLS4ZPJK+WEdntbYVvSpR+fcnBKj849bqIf4+xflj3x2oDX1pK8R/weT 9+r8iKJNqmZ3LUCUH2ih5aUwyOB6ix5ypRvzp8P0I2BUlADKNCAYb7FYnucUX38zq9V1 Rmlg== X-Gm-Message-State: AOJu0YyxhHooJqGhNORTMbjgSH1uIU7QTcK9iGhzO7F97ikVKYWMq+yG iFehi4bAtc9zsnFGO7JwMHWQrdocdof2pPZSe/kxa7w0vjXqpXFZ X-Gm-Gg: ASbGnctZdKg2sMi4XRzCCv8nL3mt0Ym0cn6EEvijsKme+nJNMJGW8MrlFpnlj/cXjKf BOGgl2gOfsacZ6AKxXdaApS9TQpANvU7VJ8ZmpHTJaCwXY83tFxwR2+HeogSUqZNTSHfNeBFUka lIkfiI8JMWvlMoB4XSmIXvFrc56UofHOggcCRO9bZHLhft87ekO47ICGHtH755ORg1XhWsVPb57 eWxD1m9EdvASWBOkRzec2Us++axEvFh+thOd6+qwJdg2uv6xLHF7fSW+pPqq3YM+YJELtKong9M mfz+v1m3bjQV7R2BuR4EF0GOyYS6UrVWPq/Hxb8mow== X-Google-Smtp-Source: AGHT+IG1DejkkXCQgh+qjFZn6c1/DWsCAzisvMzR5ND9LV9c8em/D8+dvLumWNJYae3KUpRDvTtvTA== X-Received: by 2002:a5d:6d09:0:b0:385:e43a:4ded with SMTP id ffacd0b85a97d-38a223ff460mr44636756f8f.57.1736185358050; Mon, 06 Jan 2025 09:42:38 -0800 (PST) Received: from lili (roam-nat-fw-prg-194-254-61-45.net.univ-paris-diderot.fr. [194.254.61.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8472d5sm49046452f8f.47.2025.01.06.09.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 09:42:37 -0800 (PST) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#74481] [PATCH v2] import: go: Warn instead of error out when Git fails. In-Reply-To: <87bjwy170e.fsf@gnu.org> References: <494fef0566a7105bf4ae04f5efeae742561f3abb.1734457415.git.zimon.toutoune@gmail.com> <87bjwy170e.fsf@gnu.org> Date: Mon, 06 Jan 2025 12:25:29 +0100 Message-ID: <87pll0xjyu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Thu, 26 Dec 2024 at 22:14, Ludovic Courtès wrote: > Apart from that LGTM! Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:329 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date X-Debbugs-Envelope-To: 74481 Cc: 74481@debbugs.gnu.org, Katherine Cox-Buday , Sharlatan Hellseher 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 (/) Hi, On Thu, 26 Dec 2024 at 22:14, Ludovic Court=C3=A8s wrote: > Apart from that LGTM! Thanks, pushed as 57fa06352e9f4019298ffda3c066bab7538c8906. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 12:42:46 2025 Received: (at control) by debbugs.gnu.org; 6 Jan 2025 17:42:46 +0000 Received: from localhost ([127.0.0.1]:39914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUr7m-0000qi-Cb for submit@debbugs.gnu.org; Mon, 06 Jan 2025 12:42:46 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:47556) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUr7i-0000qB-G3 for control@debbugs.gnu.org; Mon, 06 Jan 2025 12:42:43 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4364a37a1d7so153474855e9.3 for ; Mon, 06 Jan 2025 09:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736185361; x=1736790161; darn=debbugs.gnu.org; h=subject:from:to:message-id:date:from:to:cc:subject:date:message-id :reply-to; bh=XN4R1JWtEjBjlAab9HF96/z2yVZl6z48QqabqprtO9M=; b=lVc/QetK71JfRMxQs7AMt4GSmWMRh5GBwb+qyDRxnJREesIob8huvKtXxU9Dr6tjnK GMFxrXTbDV9W2b2FYvkLxBAa/bICjfhCM+gcfu4TDUyFmNOjG2LAFPh6e/2MsFHyvonw Uo0pZskb47G8RxHs1ezOQNUu4B+oMyUfCMp7xVd+GX1jBL47iKkqiVrGS1P8yrX/U4bN eKrvdO+QVRXOOsMFtTHnud/spaooCm6X+aKD/uHs/AO8i5dK5+sBIBlvTf5lEJkI8teh Tx93PoeDNapJc42KxRVYDXAvEf7RrSNN98kDxagLuu80mGVo0Fg10PEQ4PVWQMFE5eov WMIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736185361; x=1736790161; h=subject:from:to:message-id:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XN4R1JWtEjBjlAab9HF96/z2yVZl6z48QqabqprtO9M=; b=Ld19+AnM+GX55lYSwrEqlnfh0aUVDcTNmbnyagBdVta8TVcmUypnbSqVK/ecqr1Ztw L8vWE+GhG8KsixqISPYeP0wMSUPw/1nx+njKJZ3KAdV8hyGwtJdpkzm168iDQOkX9Ke4 m3Sye9fxaxiF/v4F8WzjV51s2eHfxKx3/9m/1iLadRMR2wQH02fV/7cI/iA+Fij19wTI GESOkyHD1h7Svh55/+NY6IlIKDU04hdsoJXduVO49jlYlzzHk7/h8wm0/tR1lKCCsVaM Sb1SATX8E8FQE/YEhfSrOpE1hqeP3wwPLfGTnkvFPZRjut/3D5ZMEdHOFVidzedLggC7 v2lw== X-Gm-Message-State: AOJu0YxxZOM3xSaSSsiLy1Oz5puBTKJciYU3Cm7YIBMhGtkXRzN9V23e bVgqttpkZuebDIEYuJoTKEmwNPkFY0JxTZJD9A52UOFw36V3FVmfH/gsLQ== X-Gm-Gg: ASbGnctNE9JVmkAqbrhybEeDDt3fKk7fcXzQE+MIj01Tm+TEchhZNEcUU/JQ7sIm16q EOTVbKjgCMSalHAfxSwE143Eyogzmvn7Uc5pBqMGS72E5fqF88Sl2Slut6FUqzg+aSJdnnkOJC4 SmiBtPOCxlpSmpnHg/y/AaV0Jl7bUa76HuxolVpCTytoc9V6BkdkO4ndgo2f2IK68irfhSx9Erx pjwb0G9Um/fTxOOXCAJ6/Zzulagrpsxz6h0+z5VM8CpLd3n4/KB4NLPZp/x0CobULq8SPnKY9lA klne2B4xz6S8P2u/ELL0Z5qDOeJeL1nbDaqkwK7eLg== X-Google-Smtp-Source: AGHT+IEG2VB+lZkSgt5BYq0w/z5knz4+csNFGSnwSRWYy7KZ0Wnbj3tNX/FqbEbRK8NKDGf9fnI2cg== X-Received: by 2002:a05:600c:1c12:b0:431:58cd:b259 with SMTP id 5b1f17b1804b1-4366d356dfcmr534886755e9.31.1736185361124; Mon, 06 Jan 2025 09:42:41 -0800 (PST) Received: from lili (roam-nat-fw-prg-194-254-61-44.net.univ-paris-diderot.fr. [194.254.61.44]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4364a3766dcsm453538915e9.0.2025.01.06.09.42.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 09:42:40 -0800 (PST) Date: Mon, 06 Jan 2025 12:28:21 +0100 Message-Id: <87jzb8xju2.fsf@gmail.com> To: control@debbugs.gnu.org From: Simon Tournier Subject: control message for bug #74481 X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 74481 quit Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:330 listed in] [list.dnswl.org] X-Debbugs-Envelope-To: control 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 (/) close 74481 quit From unknown Fri Jun 20 07:28:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Feb 2025 12:24:12 +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