GNU bug report logs - #33911
SWH fallback is never reached due to an uncaught exception

Previous Next

Package: guix;

Reported by: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>

Date: Sat, 29 Dec 2018 16:00:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33911 in the body.
You can then email your comments to 33911 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#33911; Package guix. (Sat, 29 Dec 2018 16:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 29 Dec 2018 16:00:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
To: <bug-guix <at> gnu.org>
Subject: SWH fallback is never reached due to an uncaught exception
Date: Sat, 29 Dec 2018 16:47:45 +0100
[Message part 1 (text/plain, inline)]
git-download has a built-in option to download from Software Heritage
(SWH) as a fall-back, when a repository is unavailable. Unfortunately,
that code is never reached:


./pre-inst-env guix build guile-bash --no-substitutes --no-grafts -S

The following derivation will be built:
   /gnu/store/1y7jrh6szq3xlcissh4m963pvvygv3m4-guile-bash-0.1.6-0.1eabc56-checkout.drv
building /gnu/store/1y7jrh6szq3xlcissh4m963pvvygv3m4-guile-bash-0.1.6-0.1eabc56-checkout.drv...
environment variable `PATH' set to `/gnu/store/q09sy224qnxrp982z4xfaxi19721mjx8-gzip-1.9/bin:/gnu/store/ipx79bfj2mrc8npj7s3qi3zri11jfhaw-tar-1.30/bin'
Initialized empty Git repository in /gnu/store/7p7mkiqv9ah6x0x20qzpas44sdf7jqkl-guile-bash-0.1.6-0.1eabc56-checkout/.git/
fatal: repository 'https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git/' not found
Failed to do a shallow fetch; retrying a full fetch...
fatal: repository 'https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git/' not found
Backtrace:
           3 (primitive-load "/gnu/store/4qlm9ih5nhwj38jl46vdy3s37qj?")
In ice-9/eval.scm:
   293:34  2 (_ #<directory (guile-user) 5ce140>)
In ./guix/build/git.scm:
    50:10  1 (git-fetch "https://anonscm.debian.org/cgit/users/kact?" ?)
In ./guix/build/utils.scm:
    616:6  0 (invoke _ . _)

./guix/build/utils.scm:616:6: In procedure invoke:
Throw to key `srfi-34' with args `(#<condition &invoke-error [program: "/gnu/store/aqldm6f3963q8qgqxdzdsdhd7l036f85-git-minimal-2.20.1/bin/git" arguments: ("fetch" "origin") exit-status: 128 term-signal: #f stop-signal: #f] 5fb640>)'.
builder for `/gnu/store/1y7jrh6szq3xlcissh4m963pvvygv3m4-guile-bash-0.1.6-0.1eabc56-checkout.drv' failed with exit code 1
build of /gnu/store/1y7jrh6szq3xlcissh4m963pvvygv3m4-guile-bash-0.1.6-0.1eabc56-checkout.drv failed
View build log at '/var/log/guix/drvs/1y/7jrh6szq3xlcissh4m963pvvygv3m4-guile-bash-0.1.6-0.1eabc56-checkout.drv.bz2'.
guix build: error: build failed: build of `/gnu/store/1y7jrh6szq3xlcissh4m963pvvygv3m4-guile-bash-0.1.6-0.1eabc56-checkout.drv' failed


The code is in git-download.scm, line 133:

            (or (git-fetch (getenv "git url") (getenv "git commit")
                           #$output
                           #:recursive? recursive?
                           #:git-command (string-append #+git "/bin/git"))
                (download-nar #$output)

                ;; As a last resort, attempt to download from Software Heritage.
                ;; XXX: Currently recursive checkouts are not supported.
                (and (not recursive?)
                     (swh-download (getenv "git url") (getenv "git commit")
                                   #$output)))))))

If I change the order of the or and add the shw-download first, it
works.

Björn
[Message part 2 (application/pgp-signature, inline)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 06 Jan 2019 10:39:02 GMT) Full text and rfc822 format available.

Notification sent to Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>:
bug acknowledged by developer. (Sun, 06 Jan 2019 10:39:02 GMT) Full text and rfc822 format available.

Message #10 received at 33911-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
Cc: 33911-done <at> debbugs.gnu.org
Subject: Re: bug#33911: SWH fallback is never reached due to an uncaught
 exception
Date: Sun, 06 Jan 2019 11:38:20 +0100
Hi Björn,

Good catch!  I believe the bug was introduced by
329dabe13bf98b899b907b45565434c5140804f5.  I suppose I didn’t see it
when hacking on SWH support because I commented out the ‘git-fetch’ call
to test the other path.

Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de> skribis:

> The code is in git-download.scm, line 133:
>
>             (or (git-fetch (getenv "git url") (getenv "git commit")
>                            #$output
>                            #:recursive? recursive?
>                            #:git-command (string-append #+git "/bin/git"))
>                 (download-nar #$output)
>
>                 ;; As a last resort, attempt to download from Software Heritage.
>                 ;; XXX: Currently recursive checkouts are not supported.
>                 (and (not recursive?)
>                      (swh-download (getenv "git url") (getenv "git commit")
>                                    #$output)))))))

Fixed in commit 18524466bb25a1926277b1111d15fb378ff7941e.  Now I get:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build -S guile-bash --check
building /gnu/store/7w2xsqy12lyfshgpz61z8cg3s5zjsscs-guile-bash-0.1.6-0.1eabc56-checkout.drv...
environment variable `PATH' set to `/gnu/store/q09sy224qnxrp982z4xfaxi19721mjx8-gzip-1.9/bin:/gnu/store/ipx79bfj2mrc8npj7s3qi3zri11jfhaw-tar-1.30/bin'
Initialized empty Git repository in /gnu/store/7p7mkiqv9ah6x0x20qzpas44sdf7jqkl-guile-bash-0.1.6-0.1eabc56-checkout/.git/
fatal: repository 'https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git/' not found
Failed to do a shallow fetch; retrying a full fetch...
fatal: repository 'https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git/' not found
git-fetch: '/gnu/store/26s82xpawy0z13lfhkd7iprr2ahcbl5f-git-minimal-2.20.1/bin/git fetch origin' failed with exit code 128
Trying content-addressed mirror at mirror.hydra.gnu.org...
Downloading from http://mirror.hydra.gnu.org/guix/nar/gzip/7p7mkiqv9ah6x0x20qzpas44sdf7jqkl-guile-bash-0.1.6-0.1eabc56-checkout (0.04 MiB)...
 7p7mki...-guile-bash-0.1.6-0.1eabc56-checkout  37KiB 730KiB/s 00:00 [##################] 100.0%
/gnu/store/7p7mkiqv9ah6x0x20qzpas44sdf7jqkl-guile-bash-0.1.6-0.1eabc56-checkout
--8<---------------cut here---------------end--------------->8---

Thanks for the heads-up!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 03 Feb 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.