From unknown Tue Jun 17 22:29:08 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43817] [PATCH 0/1] guix: build: hg: Add 'guard' to handle error. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Oct 2020 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43817 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43817@debbugs.gnu.org Cc: zimoun X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160191576119548 (code B ref -1); Mon, 05 Oct 2020 16:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Oct 2020 16:36:01 +0000 Received: from localhost ([127.0.0.1]:50361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTSz-00055E-1e for submit@debbugs.gnu.org; Mon, 05 Oct 2020 12:36:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:43176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTSw-000554-Q2 for submit@debbugs.gnu.org; Mon, 05 Oct 2020 12:35:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPTSw-0006eo-HL for guix-patches@gnu.org; Mon, 05 Oct 2020 12:35:58 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:40061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPTSu-0007u6-Fe for guix-patches@gnu.org; Mon, 05 Oct 2020 12:35:58 -0400 Received: by mail-wm1-x32e.google.com with SMTP id k18so149349wmj.5 for ; Mon, 05 Oct 2020 09:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Boo13KL6sNeMJCxJCaQvizoTbczbEy8m3m+lxYVMH/o=; b=QfoX5dN2iH2K2eDa8un38ElY1cBYivASHqzj9GaQZU2ECPgXLKRGVbOnR4+0UNG8tU X7sBJ0JsTG+Ok5c8Ld1T8VHuqLKkA8Zb2ZiRBE0Pt2/BwvxJsUkbuM+5E69EHI3oBAgK 0g2WloXMW2ZC0XPiD+0XqHTNcS06VLNyFiAQLRmHx3Dtv4dA6gZJ11yxow4EECb2GQ5K 4uQUdN5Q8qUYOoAn3+bzePmQTby+tFEQcEY+WqahXsDJqqdsfW2xiUZrzK3CXmfTWkg4 DQjRvMNJDQAR6T5nzHGHXQEaJ2FVzHs8jIYZo96NTPtU2PasiJTUGRYH3O3vbdwBcSEN YqKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Boo13KL6sNeMJCxJCaQvizoTbczbEy8m3m+lxYVMH/o=; b=iypjoANFUIttp0ih7ZMuheShWTrzgZCBGdBpV/uEtX8O8Fp6JqqRTkgdK5wfPt7zc1 N3NM0CAyaIrI2Z+K/87dNRgIjnar46CHvdqvNNz/jloTvE4NMrz3Bz+y0i16mvHxm6TE ljKOBCMNQnv2CbN0YZXI/+UC+erfMmVnP/ngrTZta+lYU14bdXoAvn+Z0clmmPPDxe7E 3M9ZxMjQQAyriy8tAFYItnQNskG7HEo4Aez+N9+/mz92iM4jz4ST5jbfSLFihp6bE0y5 q/CD1oGgGnlb/8CgWPO4rnlHkTqph+rbCFrj1O6Ms9UbYGb85zkw/l4KQRX8kadAWTdV E3pw== X-Gm-Message-State: AOAM533gXYoThjCxRtAmFT7lQrPg0HoEnfnnEdREgxrnfMg0rvVFPhJq yMkfoLVD03qwOp7TY9SruBeSWIeAF6B7bw== X-Google-Smtp-Source: ABdhPJxwkhQoQVKtjypjNLDA68ASZmd8QH0w6dcAJLS8dPZxhNXSRqDp2/MG91JD3zWOpcmqJtwxow== X-Received: by 2002:a1c:5406:: with SMTP id i6mr232782wmb.5.1601915754535; Mon, 05 Oct 2020 09:35:54 -0700 (PDT) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id v9sm143079wmh.23.2020.10.05.09.35.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 09:35:53 -0700 (PDT) From: zimoun Date: Mon, 5 Oct 2020 18:35:44 +0200 Message-Id: <20201005163544.3947-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: 0.5 (/) 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 (--) Dear, This patch allows to gently report failure with 'hg clone'. For example, let consider the package using 'hg-fetch': --8<---------------cut here---------------start------------->8--- (define-module (hello) #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (guix hg-download)) (define-public hi-hg (package (inherit hello) (name "hi-hg") (source (origin (method hg-fetch) (uri (hg-reference (url "https://example.org/hg") (changeset "314a11282586"))) (sha256 (base32 "1yb0rsrbjg2bwyhfk677crhw0k7ijm6slaq0qq7cd4lznlz2yvji")))) (home-page "https://example.org/hg"))) --8<---------------cut here---------------end--------------->8--- Then, the current behaviour report an (opinionated: ugly!) backtrace: --8<---------------cut here---------------start------------->8--- $ guix build -L /tmp/foo/ hi-hg The following derivations will be built: /gnu/store/awdr7qhl6hyjgr1m9a40zfnban9ip98x-hi-hg-2.10.drv /gnu/store/bgdwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv building /gnu/store/bgdwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv... guile: warning: failed to install locale warning: connection security to example.org is disabled per current settings; communication is susceptible to eavesdropping and tampering abort: HTTP Error 404: Not Found Backtrace: 3 (primitive-load "/gnu/store/rf02zx0dscns2bzzics9i93l1xm?") In ice-9/eval.scm: 293:34 2 (_ #) In guix/build/hg.scm: 38:2 1 (hg-fetch "https://example.org/hg" "314a11282586" "/gn?" ?) In guix/build/utils.scm: 654:6 0 (invoke _ . _) guix/build/utils.scm:654:6: In procedure invoke: ERROR: 1. &invoke-error: program: "/gnu/store/0qx1yjfnjn77jag9rmv4z49vfrzk5bgc-mercurial-5.5.1/bin/hg" arguments: ("clone" "https://example.org/hg" "--rev" "314a11282586" "--insecure" "/gnu/store/6x6hccx9cqpfrcav79inl43ys6frgvw2-hg-checkout") exit-status: 255 term-signal: #f stop-signal: #f builder for `/gnu/store/bgdwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv' failed with exit code 1 build of /gnu/store/bgdwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv failed View build log at '/var/log/guix/drvs/bg/dwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv.bz2'. cannot build derivation `/gnu/store/awdr7qhl6hyjgr1m9a40zfnban9ip98x-hi-hg-2.10.drv': 1 dependencies couldn't be built guix build: error: build of `/gnu/store/awdr7qhl6hyjgr1m9a40zfnban9ip98x-hi-hg-2.10.drv' failed --8<---------------cut here---------------end--------------->8--- Instead, the proposing patch handles the error and reports: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -L /tmp/foo/ hi-hg The following derivations will be built: /gnu/store/zam0r6fvyp9qkzp6kf087iifvnhw140n-hi-hg-2.10.drv /gnu/store/z4y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv building /gnu/store/z4y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv... guile: warning: failed to install locale warning: connection security to example.org is disabled per current settings; communication is susceptible to eavesdropping and tampering abort: HTTP Error 404: Not Found hg-fetch: '/gnu/store/0qx1yjfnjn77jag9rmv4z49vfrzk5bgc-mercurial-5.5.1/bin/hg clone https://example.org/hg --rev 314a11282586 --insecure /gnu/store/6x6hccx9cqpfrcav79inl43ys6frgvw2-hg-checkout' failed with exit code 255 Trying content-addressed mirror at berlin.guix.gnu.org... Trying content-addressed mirror at berlin.guix.gnu.org... builder for `/gnu/store/z4y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv' failed to produce output path `/gnu/store/6x6hccx9cqpfrcav79inl43ys6frgvw2-hg-checkout' build of /gnu/store/z4y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv failed View build log at '/var/log/guix/drvs/z4/y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv.bz2'. cannot build derivation `/gnu/store/zam0r6fvyp9qkzp6kf087iifvnhw140n-hi-hg-2.10.drv': 1 dependencies couldn't be built guix build: error: build of `/gnu/store/zam0r6fvyp9qkzp6kf087iifvnhw140n-hi-hg-2.10.drv' failed --8<---------------cut here---------------end--------------->8--- (Note: the code is highly copied from guix/build/git.scm. :-)) All the best, simon zimoun (1): guix: build: hg: Add 'guard' to handle error. guix/build/hg.scm | 50 +++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 17 deletions(-) base-commit: 2b73e50c31a61b5dcef35a1e4b9484d9dbcb0fbc -- 2.28.0 From unknown Tue Jun 17 22:29:08 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43817] [PATCH 1/1] guix: build: hg: Add 'guard' to handle error. References: <20201005163544.3947-1-zimon.toutoune@gmail.com> In-Reply-To: <20201005163544.3947-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Oct 2020 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43817 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43817@debbugs.gnu.org Cc: zimoun Received: via spool by 43817-submit@debbugs.gnu.org id=B43817.160191580619649 (code B ref 43817); Mon, 05 Oct 2020 16:37:02 +0000 Received: (at 43817) by debbugs.gnu.org; 5 Oct 2020 16:36:46 +0000 Received: from localhost ([127.0.0.1]:50366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTTh-00056r-GC for submit@debbugs.gnu.org; Mon, 05 Oct 2020 12:36:46 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTTf-00056d-9H for 43817@debbugs.gnu.org; Mon, 05 Oct 2020 12:36:43 -0400 Received: by mail-wr1-f66.google.com with SMTP id w5so10336319wrp.8 for <43817@debbugs.gnu.org>; Mon, 05 Oct 2020 09:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ViSiot9nFS4O3vLFqRzUsDG7vX57Vv+LsZpAoJJlbqU=; b=nnyYIOnLX5lbjvqrp1prxmqcD9X/xY1vlZY/Dxa5WAveu7yFq5BGLSA1qDUlB/5XIn ehuAUBDWzVYLd2AjZKPyQhwuLOqEpYMk9uwH4QwOp/lgqGKBLwm4eF8CjfZWJALEJJuC Vyha4AQEIANDPjvNI41KwBMMQWHik7BMJ8QZDzqsqAl5yeXtDhY0/6SkBR8ftQUaB/Y6 UBytvLsoFcnRx/44Spzd3Qg/sLMY5AGTtS/CEi8NPf6h54jpjR9L0BeWFYAVjT4TC30j qr7FO3TBazaCkVijqr5GOPmqejxY0qXT02fqUlF0ZPCmFR5wINDYZtJIbSSzP+YBJMkY Yt0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ViSiot9nFS4O3vLFqRzUsDG7vX57Vv+LsZpAoJJlbqU=; b=nB0NG3QC5CE7Y5d4H9QvOzDL/Pxu2uwy+Uhqh6g1CXgPGjVO66GcRDO0jJJJbuW70Q x5vhzpdWVtFCKl+cSHeULLvVcV9Lh3U0QQnpA+tVshi2nG+9ATgmIGP60Df2Lk2uiJeR L6N3w/gu7h3qoPM+Pb6xohaT7eOU9u9Juv1OjqGpmvtL2yn+TvaWaJQA23ljMVr4d7gI sS3ul0NXBHkrRdtQ1T+S2N8fRCxG3GzLxiwFIM2fBESwWk8ar+uydvehd2Hkn805QT5Z vwDr3Crp3tIu+ozSo/c+yVPheeLeGH+x89i+4j2WOlz2mGufwYIOrwhWT81cFJKTOgrC cgHg== X-Gm-Message-State: AOAM53211Wj42BRwbOAmkQCVYOnNMojMvyQut5iA3CiFeX2Ieph6kUfB 2NYVwrHpYWWXbSFvPagWQWmOein/CZ5lEA== X-Google-Smtp-Source: ABdhPJzmIwsfdLA5tAgQg247wRb03H+IS6qxFUU1diTnPrN8M8KWxVcztFIRo0HuweNtNpVBj29MJA== X-Received: by 2002:a5d:50cd:: with SMTP id f13mr214425wrt.211.1601915797070; Mon, 05 Oct 2020 09:36:37 -0700 (PDT) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id n6sm135320wmd.22.2020.10.05.09.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 09:36:36 -0700 (PDT) From: zimoun Date: Mon, 5 Oct 2020 18:36:34 +0200 Message-Id: <20201005163634.4300-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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/build/hg.scm (hg-fetch): Add 'guard' to handle error. --- guix/build/hg.scm | 50 +++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/guix/build/hg.scm b/guix/build/hg.scm index b3e3ff7ac3..9245181d8b 100644 --- a/guix/build/hg.scm +++ b/guix/build/hg.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2018 Björn Höfling +;;; Copyright © 2020 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,8 @@ (define-module (guix build hg) #:use-module (guix build utils) + #:use-module (srfi srfi-34) + #:use-module (ice-9 format) #:export (hg-fetch)) ;;; Commentary: @@ -35,22 +38,35 @@ "Fetch CHANGESET from URL into DIRECTORY. CHANGESET must be a valid Mercurial changeset identifier. Return #t on success, #f otherwise." - (invoke hg-command - "clone" url - "--rev" changeset - ;; Disable TLS certificate verification. The hash of - ;; the checkout is known in advance anyway. - "--insecure" - directory) - - ;; The contents of '.hg' vary as a function of the current - ;; status of the Mercurial repo. Since we want a fixed - ;; output, this directory needs to be taken out. - ;; Since the '.hg' file is also in sub-modules, we have to - ;; search for it in all sub-directories. - (for-each delete-file-recursively - (find-files directory "^\\.hg$" #:directories? #t)) - - #t) + (mkdir-p directory) + + (guard (c ((invoke-error? c) + (format (current-error-port) + "hg-fetch: '~a~{ ~a~}' failed with exit code ~a~%" + (invoke-error-program c) + (invoke-error-arguments c) + (or (invoke-error-exit-status c) ;XXX: not quite accurate + (invoke-error-stop-signal c) + (invoke-error-term-signal c))) + (delete-file-recursively directory) + #f)) + (with-directory-excursion directory + (invoke hg-command + "clone" url + "--rev" changeset + ;; Disable TLS certificate verification. The hash of + ;; the checkout is known in advance anyway. + "--insecure" + directory) + + ;; The contents of '.hg' vary as a function of the current + ;; status of the Mercurial repo. Since we want a fixed + ;; output, this directory needs to be taken out. + ;; Since the '.hg' file is also in sub-modules, we have to + ;; search for it in all sub-directories. + (for-each delete-file-recursively + (find-files directory "^\\.hg$" #:directories? #t)) + + #t))) ;;; hg.scm ends here -- 2.28.0 From unknown Tue Jun 17 22:29:08 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43817] [PATCH 2/2] guix: build: svn: Add 'guard' to handle error. References: <20201005163544.3947-1-zimon.toutoune@gmail.com> In-Reply-To: <20201005163544.3947-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Oct 2020 16:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43817 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43817@debbugs.gnu.org Cc: zimoun Received: via spool by 43817-submit@debbugs.gnu.org id=B43817.160191647020693 (code B ref 43817); Mon, 05 Oct 2020 16:48:01 +0000 Received: (at 43817) by debbugs.gnu.org; 5 Oct 2020 16:47:50 +0000 Received: from localhost ([127.0.0.1]:50381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTeQ-0005Nh-6M for submit@debbugs.gnu.org; Mon, 05 Oct 2020 12:47:50 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:46152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTeO-0005NV-H9 for 43817@debbugs.gnu.org; Mon, 05 Oct 2020 12:47:49 -0400 Received: by mail-wr1-f66.google.com with SMTP id o5so10371766wrn.13 for <43817@debbugs.gnu.org>; Mon, 05 Oct 2020 09:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=L1F3n7vmhnrqTeFrdwK2JNl4JFk3Lhc8t5wjnXZ7fsc=; b=R+FEjoU62x8DDiNEm5kLPew6YSW4vSpRYQMPwaw9Mf7SYVEOEnwZNAzG979NU30DDl pK0fvuoodKAzq+oRxeagArC7DcE0ClmieQz14cwDVfQz5lb1d2mpf2o030fwhqCfjiWP nrgAdylaqOpt+gLr2YIzGLzJN3JpgQZ0UmqFh1QtBOlVUMX69UrbKyi3K4XvdzIP0r6/ dHmkrdmuiGY8tWxtaesaYGTP9tTgm0BUBU/YWBrSICLl7ZZLowJUEYfvDAOn7HablbI+ xVwtB01mPSustqSAFqwlzIeBmUHdCSUJ09KtQCOjPBeYpid1Z33yyxew8q7Z6yKOW7E6 b7jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=L1F3n7vmhnrqTeFrdwK2JNl4JFk3Lhc8t5wjnXZ7fsc=; b=WK/17bWQB3I5Z+64fsYUqAZTftH8MMLkGuns9fqiuHfz4QUtzJPkygrNUvl2O/43W+ Y6gFXKgaCdsI+P4gehN0SR1m566tG3NVoJ0vRUOvil4i2Y2XrDc7ai/ihY6tzEUBNEul ZkyPaSIzgPYdXRckwEug2kQQEwPWWHfU9+ZLyozwM/KU4VX8pr9zPgxUntvIqfYnfJjg jrgd9BIymXzucc128R2Ef9Crnh3gZbARERAVZevrmGJJU+hE1/5pNFwrH16ctLLnpm2Q PcBuEdZ7RhRm+RAoVYfBqR6fA3FGQBhLxnHSUUa9CG31BUZDLyDyRhgvDM9QKBWTpJt7 NPJg== X-Gm-Message-State: AOAM532ize3WG+sQiONtFMp7rMaQwUg4wqx3qDC2ZnHPmRF/XR8v6Lr9 vhvAc7kSbrpfYI1d/cbmd7bpnzgQZwjW4w== X-Google-Smtp-Source: ABdhPJyInZZVPhhMjm7gMV0gMvPS2fHo29ayBpOfRpCTWJYP88AeRtTzmu3UTtmqE2+olzH7/DHtKg== X-Received: by 2002:a5d:6412:: with SMTP id z18mr332856wru.30.1601916462221; Mon, 05 Oct 2020 09:47:42 -0700 (PDT) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id e18sm651232wrx.50.2020.10.05.09.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 09:47:41 -0700 (PDT) From: zimoun Date: Mon, 5 Oct 2020 18:47:39 +0200 Message-Id: <20201005164739.8826-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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/build/svn.scm (svn-fetch): Add 'guard' to handle error. --- guix/build/svn.scm | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/guix/build/svn.scm b/guix/build/svn.scm index 33783f3056..0afe887487 100644 --- a/guix/build/svn.scm +++ b/guix/build/svn.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Ludovic Courtès ;;; Copyright © 2014 Sree Harsha Totakura ;;; Copyright © 2018 Mark H Weaver +;;; Copyright © 2020 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,8 @@ (define-module (guix build svn) #:use-module (guix build utils) + #:use-module (srfi srfi-34) + #:use-module (ice-9 format) #:export (svn-fetch)) ;;; Commentary: @@ -36,7 +39,20 @@ (password #f)) "Fetch REVISION from URL into DIRECTORY. REVISION must be an integer, and a valid Subversion revision. Return #t on success, #f otherwise." - (apply invoke svn-command + (mkdir-p directory) + + (guard (c ((invoke-error? c) + (format (current-error-port) + "svn-fetch: '~a~{ ~a~}' failed with exit code ~a~%" + (invoke-error-program c) + (invoke-error-arguments c) + (or (invoke-error-exit-status c) ;XXX: not quite accurate + (invoke-error-stop-signal c) + (invoke-error-term-signal c))) + (delete-file-recursively directory) + #f)) + (with-directory-excursion directory + (apply invoke svn-command "export" "--non-interactive" ;; Trust the server certificate. This is OK as we ;; verify the checksum later. This can be removed when @@ -50,6 +66,6 @@ valid Subversion revision. Return #t on success, #f otherwise." '() (list "--ignore-externals")) ,url ,directory)) - #t) + #t))) ;;; svn.scm ends here -- 2.28.0 From unknown Tue Jun 17 22:29:08 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43817] [PATCH 0/1] guix: build: hg: Add 'guard' to handle error. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Oct 2020 16:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43817 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43817@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160191657820864 (code B ref -1); Mon, 05 Oct 2020 16:50:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Oct 2020 16:49:38 +0000 Received: from localhost ([127.0.0.1]:50385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTgA-0005QS-L1 for submit@debbugs.gnu.org; Mon, 05 Oct 2020 12:49:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:43080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTg8-0005QK-6B for submit@debbugs.gnu.org; Mon, 05 Oct 2020 12:49:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPTg7-00025i-Tc for guix-patches@gnu.org; Mon, 05 Oct 2020 12:49:35 -0400 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]:37969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPTg4-0001HC-B5 for guix-patches@gnu.org; Mon, 05 Oct 2020 12:49:35 -0400 Received: by mail-qt1-x844.google.com with SMTP id q26so4944727qtb.5 for ; Mon, 05 Oct 2020 09:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=NdgIb/hzwGwevYJLT5wCCZSAum5x+IhHMWaphtTswFE=; b=XuYHnK1GW7yFV+w/7Ei0d8lh9Vu6jBWe0qBf78iAoJnq++j+rZipheVcLvo1OXgr65 50HE+3Jy/2cR+KtuxMiAeApGxA+Io/icL56oP0a2OMR7oO7D2CqcQ7Pv3y/oiYgKV84y aeofIYHoTuNtp+44tqsTF/bbDa7TMM3DsMSh5UEdyqjsv7LAbVjM++BlWK8yIkcv0M2M Baq+ZzPhgHqIXNFcQG2TfZ9FffGDBAacFf1aZZWB5BmYvEkt478h3Pz8G+ti67kiMosS Wdes4JbZ5tpcZWm7Mshb4Wt9N4/qYL2GPsNebzIjbQUlEvYKlyGM0SEgOyHtgOgWQ+2r MqYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=NdgIb/hzwGwevYJLT5wCCZSAum5x+IhHMWaphtTswFE=; b=KwjJeIO3EZAnYsWzVnDpV1Vv+pZBRJm7ykYxmwRIdJUd/lL/5KTHEsy7S+AY/hAoKI BwheYXBZn/4+IXsj0DkMng5M/4YqPkhf4mLR5duOlaXXOPfac6zsj4wuijKgx3y90rJ7 cYOGECRF//DYGsEIQ35nz4YqONbrqDZRFfF8MivzD9avj223N7sGD4RQrwjirfe0Fql4 IBb5mEmTL/rAps9TdK7Ffh0t93GsH1dMg6/mzAYM/KW8lwo+dSJhvkmdl+FarsCnbRi1 DHQEtrZqNwYLlUiROBOW39oVTSdHmL0/bZueYU8fdNsL0Mu6RlrA1EbXCQRhWFKbx6hL vO2w== X-Gm-Message-State: AOAM5325ouItKgUyLGfEGQe0qD6XfLo6QgPBCEQh6PTuGwfRmxrEvnJa NFpUg5MbHqzZh+N9sHqzxJO4RwlOYactA2DocOUSazx6POQwgw== X-Google-Smtp-Source: ABdhPJyBCdv7HhfOktmMWLvrD8JACwNKGyuTr6kBhWnKQQNTqDSRBdetBvHSv4HSI0F2Qrs38CxJO9W3U/gLvP+G4qw= X-Received: by 2002:ac8:5942:: with SMTP id 2mr728655qtz.217.1601916571162; Mon, 05 Oct 2020 09:49:31 -0700 (PDT) MIME-Version: 1.0 References: <20201005163544.3947-1-zimon.toutoune@gmail.com> In-Reply-To: <20201005163544.3947-1-zimon.toutoune@gmail.com> From: zimoun Date: Mon, 5 Oct 2020 18:49:20 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::844; envelope-from=zimon.toutoune@gmail.com; helo=mail-qt1-x844.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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-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 (--) On Mon, 5 Oct 2020 at 18:35, zimoun wrote: > This patch allows to gently report failure with 'hg clone'. > > For example, let consider the package using 'hg-fetch': The patch dealing with 'svn-fetch' is also in this thread. All the best, simon From unknown Tue Jun 17 22:29:08 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: zimoun Subject: bug#43817: closed (Re: [bug#43817] [PATCH 0/1] guix: build: hg: Add 'guard' to handle error.) Message-ID: References: <877ds34v6s.fsf@gnu.org> <20201005163544.3947-1-zimon.toutoune@gmail.com> X-Gnu-PR-Message: they-closed 43817 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 43817@debbugs.gnu.org Date: Tue, 06 Oct 2020 08:27:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1601972822-29507-1" This is a multi-part message in MIME format... ------------=_1601972822-29507-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #43817: [PATCH 0/1] guix: build: hg: Add 'guard' to handle error. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 43817@debbugs.gnu.org. --=20 43817: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D43817 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1601972822-29507-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 43817-done) by debbugs.gnu.org; 6 Oct 2020 08:26:18 +0000 Received: from localhost ([127.0.0.1]:51585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPiIb-0007ev-L7 for submit@debbugs.gnu.org; Tue, 06 Oct 2020 04:26:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPiIa-0007ed-AQ for 43817-done@debbugs.gnu.org; Tue, 06 Oct 2020 04:26:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47586) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPiIU-0000z9-H1; Tue, 06 Oct 2020 04:26:11 -0400 Received: from [2a01:e0a:19b:d9a0:4192:d6b6:52f:260e] (port=60818 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kPiIO-0003RB-RR; Tue, 06 Oct 2020 04:26:08 -0400 From: Mathieu Othacehe To: zimoun Subject: Re: [bug#43817] [PATCH 0/1] guix: build: hg: Add 'guard' to handle error. References: <20201005163544.3947-1-zimon.toutoune@gmail.com> Date: Tue, 06 Oct 2020 10:26:03 +0200 In-Reply-To: <20201005163544.3947-1-zimon.toutoune@gmail.com> (zimoun's message of "Mon, 5 Oct 2020 18:35:44 +0200") Message-ID: <877ds34v6s.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43817-done Cc: 43817-done@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 (---) Hello zimoun, > This patch allows to gently report failure with 'hg clone'. I applied both patches with minor edits. Thanks, Mathieu ------------=_1601972822-29507-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Oct 2020 16:36:01 +0000 Received: from localhost ([127.0.0.1]:50361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTSz-00055E-1e for submit@debbugs.gnu.org; Mon, 05 Oct 2020 12:36:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:43176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPTSw-000554-Q2 for submit@debbugs.gnu.org; Mon, 05 Oct 2020 12:35:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPTSw-0006eo-HL for guix-patches@gnu.org; Mon, 05 Oct 2020 12:35:58 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:40061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPTSu-0007u6-Fe for guix-patches@gnu.org; Mon, 05 Oct 2020 12:35:58 -0400 Received: by mail-wm1-x32e.google.com with SMTP id k18so149349wmj.5 for ; Mon, 05 Oct 2020 09:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Boo13KL6sNeMJCxJCaQvizoTbczbEy8m3m+lxYVMH/o=; b=QfoX5dN2iH2K2eDa8un38ElY1cBYivASHqzj9GaQZU2ECPgXLKRGVbOnR4+0UNG8tU X7sBJ0JsTG+Ok5c8Ld1T8VHuqLKkA8Zb2ZiRBE0Pt2/BwvxJsUkbuM+5E69EHI3oBAgK 0g2WloXMW2ZC0XPiD+0XqHTNcS06VLNyFiAQLRmHx3Dtv4dA6gZJ11yxow4EECb2GQ5K 4uQUdN5Q8qUYOoAn3+bzePmQTby+tFEQcEY+WqahXsDJqqdsfW2xiUZrzK3CXmfTWkg4 DQjRvMNJDQAR6T5nzHGHXQEaJ2FVzHs8jIYZo96NTPtU2PasiJTUGRYH3O3vbdwBcSEN YqKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Boo13KL6sNeMJCxJCaQvizoTbczbEy8m3m+lxYVMH/o=; b=iypjoANFUIttp0ih7ZMuheShWTrzgZCBGdBpV/uEtX8O8Fp6JqqRTkgdK5wfPt7zc1 N3NM0CAyaIrI2Z+K/87dNRgIjnar46CHvdqvNNz/jloTvE4NMrz3Bz+y0i16mvHxm6TE ljKOBCMNQnv2CbN0YZXI/+UC+erfMmVnP/ngrTZta+lYU14bdXoAvn+Z0clmmPPDxe7E 3M9ZxMjQQAyriy8tAFYItnQNskG7HEo4Aez+N9+/mz92iM4jz4ST5jbfSLFihp6bE0y5 q/CD1oGgGnlb/8CgWPO4rnlHkTqph+rbCFrj1O6Ms9UbYGb85zkw/l4KQRX8kadAWTdV E3pw== X-Gm-Message-State: AOAM533gXYoThjCxRtAmFT7lQrPg0HoEnfnnEdREgxrnfMg0rvVFPhJq yMkfoLVD03qwOp7TY9SruBeSWIeAF6B7bw== X-Google-Smtp-Source: ABdhPJxwkhQoQVKtjypjNLDA68ASZmd8QH0w6dcAJLS8dPZxhNXSRqDp2/MG91JD3zWOpcmqJtwxow== X-Received: by 2002:a1c:5406:: with SMTP id i6mr232782wmb.5.1601915754535; Mon, 05 Oct 2020 09:35:54 -0700 (PDT) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id v9sm143079wmh.23.2020.10.05.09.35.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 09:35:53 -0700 (PDT) From: zimoun To: guix-patches@gnu.org Subject: [PATCH 0/1] guix: build: hg: Add 'guard' to handle error. Date: Mon, 5 Oct 2020 18:35:44 +0200 Message-Id: <20201005163544.3947-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: 0.5 (/) X-Debbugs-Envelope-To: submit Cc: zimoun 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 (--) Dear, This patch allows to gently report failure with 'hg clone'. For example, let consider the package using 'hg-fetch': --8<---------------cut here---------------start------------->8--- (define-module (hello) #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (guix hg-download)) (define-public hi-hg (package (inherit hello) (name "hi-hg") (source (origin (method hg-fetch) (uri (hg-reference (url "https://example.org/hg") (changeset "314a11282586"))) (sha256 (base32 "1yb0rsrbjg2bwyhfk677crhw0k7ijm6slaq0qq7cd4lznlz2yvji")))) (home-page "https://example.org/hg"))) --8<---------------cut here---------------end--------------->8--- Then, the current behaviour report an (opinionated: ugly!) backtrace: --8<---------------cut here---------------start------------->8--- $ guix build -L /tmp/foo/ hi-hg The following derivations will be built: /gnu/store/awdr7qhl6hyjgr1m9a40zfnban9ip98x-hi-hg-2.10.drv /gnu/store/bgdwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv building /gnu/store/bgdwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv... guile: warning: failed to install locale warning: connection security to example.org is disabled per current settings; communication is susceptible to eavesdropping and tampering abort: HTTP Error 404: Not Found Backtrace: 3 (primitive-load "/gnu/store/rf02zx0dscns2bzzics9i93l1xm?") In ice-9/eval.scm: 293:34 2 (_ #) In guix/build/hg.scm: 38:2 1 (hg-fetch "https://example.org/hg" "314a11282586" "/gn?" ?) In guix/build/utils.scm: 654:6 0 (invoke _ . _) guix/build/utils.scm:654:6: In procedure invoke: ERROR: 1. &invoke-error: program: "/gnu/store/0qx1yjfnjn77jag9rmv4z49vfrzk5bgc-mercurial-5.5.1/bin/hg" arguments: ("clone" "https://example.org/hg" "--rev" "314a11282586" "--insecure" "/gnu/store/6x6hccx9cqpfrcav79inl43ys6frgvw2-hg-checkout") exit-status: 255 term-signal: #f stop-signal: #f builder for `/gnu/store/bgdwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv' failed with exit code 1 build of /gnu/store/bgdwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv failed View build log at '/var/log/guix/drvs/bg/dwj7ajkm9xwcyib83wpby1zb9l8si2-hg-checkout.drv.bz2'. cannot build derivation `/gnu/store/awdr7qhl6hyjgr1m9a40zfnban9ip98x-hi-hg-2.10.drv': 1 dependencies couldn't be built guix build: error: build of `/gnu/store/awdr7qhl6hyjgr1m9a40zfnban9ip98x-hi-hg-2.10.drv' failed --8<---------------cut here---------------end--------------->8--- Instead, the proposing patch handles the error and reports: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -L /tmp/foo/ hi-hg The following derivations will be built: /gnu/store/zam0r6fvyp9qkzp6kf087iifvnhw140n-hi-hg-2.10.drv /gnu/store/z4y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv building /gnu/store/z4y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv... guile: warning: failed to install locale warning: connection security to example.org is disabled per current settings; communication is susceptible to eavesdropping and tampering abort: HTTP Error 404: Not Found hg-fetch: '/gnu/store/0qx1yjfnjn77jag9rmv4z49vfrzk5bgc-mercurial-5.5.1/bin/hg clone https://example.org/hg --rev 314a11282586 --insecure /gnu/store/6x6hccx9cqpfrcav79inl43ys6frgvw2-hg-checkout' failed with exit code 255 Trying content-addressed mirror at berlin.guix.gnu.org... Trying content-addressed mirror at berlin.guix.gnu.org... builder for `/gnu/store/z4y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv' failed to produce output path `/gnu/store/6x6hccx9cqpfrcav79inl43ys6frgvw2-hg-checkout' build of /gnu/store/z4y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv failed View build log at '/var/log/guix/drvs/z4/y6xhnaipx0p7sx4ink0bll9i7rww87-hg-checkout.drv.bz2'. cannot build derivation `/gnu/store/zam0r6fvyp9qkzp6kf087iifvnhw140n-hi-hg-2.10.drv': 1 dependencies couldn't be built guix build: error: build of `/gnu/store/zam0r6fvyp9qkzp6kf087iifvnhw140n-hi-hg-2.10.drv' failed --8<---------------cut here---------------end--------------->8--- (Note: the code is highly copied from guix/build/git.scm. :-)) All the best, simon zimoun (1): guix: build: hg: Add 'guard' to handle error. guix/build/hg.scm | 50 +++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 17 deletions(-) base-commit: 2b73e50c31a61b5dcef35a1e4b9484d9dbcb0fbc -- 2.28.0 ------------=_1601972822-29507-1-- From unknown Tue Jun 17 22:29:08 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43817] [PATCH 0/1] guix: build: hg: Add 'guard' to handle error. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Oct 2020 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43817 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 43817-done@debbugs.gnu.org Received: via spool by 43817-done@debbugs.gnu.org id=D43817.160209177220653 (code D ref 43817); Wed, 07 Oct 2020 17:30:02 +0000 Received: (at 43817-done) by debbugs.gnu.org; 7 Oct 2020 17:29:32 +0000 Received: from localhost ([127.0.0.1]:57998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQDFr-0005N3-Uc for submit@debbugs.gnu.org; Wed, 07 Oct 2020 13:29:32 -0400 Received: from mail-qv1-f65.google.com ([209.85.219.65]:35307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQDFp-0005Mq-Iq for 43817-done@debbugs.gnu.org; Wed, 07 Oct 2020 13:29:30 -0400 Received: by mail-qv1-f65.google.com with SMTP id cv1so1613732qvb.2 for <43817-done@debbugs.gnu.org>; Wed, 07 Oct 2020 10:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0bTZgSv1/YzZ9tvylHOk/Vd0ILT1Am5YEhg9wwRmo7E=; b=iL728ZiNBrJNEiGAgmaCcUyfH100pjtelJTRTX1VRmRA4DuHLDo7Dx+1d0O7AoJC9V w9fB48849AyvlEWnsrY07CG0ShBC3F8H6XVjps8UKYR9PWiOZDAuwr0DfmzGi46nOaY7 +h5wVArVFdO+M5UbLsNNWmAyzR84YJBAoVlPTKXQUQGukqqURzfzx2ygSPbs7cwYLlhI 2CYx0L/3+512sO88dw2gp9u9ZN9LTS2SHV6wpfvQe9w0K+snrCh89MFuAz9JO1YjXYMH BehqcAXHB3MOECCHFwf2hnYwSdVqmFirZJ6UwtrjZrX1grNEQVcLtCHd6O7gAJCsJPJM oTkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0bTZgSv1/YzZ9tvylHOk/Vd0ILT1Am5YEhg9wwRmo7E=; b=g7adosfiI+1N5tPXwTJeBVnPPOapkbdFBL3frhJGfcaGwDcetDCpFQJIBbmhg/DwdP 3NV6MYvTFdjlPuGNfI19uCxu8HR2sYH/Z4lE/w+IihLbVpZno30p2Of1TSI/Up/OhuMu 64vkET7Cy/cLcq328cFj36iZyCcsQb1mlXE+FDiLCsEB7HgM4fGzy50ExSVObGxxW4sY yxvs2RvIzIpPUeRkXQ9KLw12dxl1FHOipwMTXEVV9x/kNGXJkBieTSUyM9eZ6sruz2Lj 9KrvlreBfwx2z7QR61Xwa5ILnLKINw/bZ6aKRq3pa9ZacIitajSflWr5dUDx3YtJmXl9 S6HQ== X-Gm-Message-State: AOAM531f711mFPOr/Gr0m+qgoj6LZ9ejCAgUs/vORAvW7+2WcM4CUL04 NHfSiCETEhvCgkAfzTT4GasPxKTVf5MnYTKSehM= X-Google-Smtp-Source: ABdhPJxg7HmmwZuX5h7U7Nj+n/s59eGO/g3CvkrEpsR3xPfLbq/1EUOPEZA+6c/itLyMOzKmRdCsrB+9222TR9guaYQ= X-Received: by 2002:a05:6214:1767:: with SMTP id et7mr4152808qvb.43.1602091764086; Wed, 07 Oct 2020 10:29:24 -0700 (PDT) MIME-Version: 1.0 References: <20201005163544.3947-1-zimon.toutoune@gmail.com> <877ds34v6s.fsf@gnu.org> In-Reply-To: <877ds34v6s.fsf@gnu.org> From: zimoun Date: Wed, 7 Oct 2020 19:29:13 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 Mathieu, On Tue, 6 Oct 2020 at 10:26, Mathieu Othacehe wrote: > > This patch allows to gently report failure with 'hg clone'. > > I applied both patches with minor edits. Thank you. Paul spotted out an issue that I missed about the patch tweaking 'svn-fetch'. Now, it is fixed; see patch in [1]. Well, I am not a Git's guru but "git am --scissors" should do the job. [1] https://lists.gnu.org/archive/html/guix-commits/2020-10/msg00470.html Sorry for the annoyance. Thanks, simon