GNU bug report logs -
#31956
guix environment: add option to download and unpack source
Previous Next
To reply to this bug, email your comments to 31956 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#31956
; Package
guix
.
(Sun, 24 Jun 2018 19:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Vagrant Cascadian <vagrant <at> debian.org>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sun, 24 Jun 2018 19:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I've a minor feature request.
When working on new package definitions, it's often useful to debug
build failures with guix environment.
The current implementation, as I understand it, requires manually
downloading the source, and merely drops you into whatever working
directory you happen to be it.
It would be great if there were an option you could pass that downloads
and unpacks the source somewhere and drops you into the newly unpacked
source directory.
Not sure what to call it exactly, but something like:
guix environment --with-source hello
Should drop you into an unpacked source directory with the inputs and
such for building "hello".
live well,
vagrant
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#31956
; Package
guix
.
(Sun, 24 Jun 2018 19:21:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 31956 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, 24 Jun 2018 12:06:17 -0700
Vagrant Cascadian <vagrant <at> debian.org> wrote:
> I've a minor feature request.
>
> When working on new package definitions, it's often useful to debug
> build failures with guix environment.
>
> The current implementation, as I understand it, requires manually
> downloading the source, and merely drops you into whatever working
> directory you happen to be it.
>
> It would be great if there were an option you could pass that
> downloads and unpacks the source somewhere and drops you into the
> newly unpacked source directory.
>
> Not sure what to call it exactly, but something like:
>
> guix environment --with-source hello
>
> Should drop you into an unpacked source directory with the inputs and
> such for building "hello".
Hi Vagrant,
if you need this in the case of build failures, use the "-K" option:
https://www.gnu.org/software/guix/manual/guix.html#Common-Build-Options
--keep-failed
-K
Keep the build tree of failed builds. Thus, if a build fails, its
build tree is kept under /tmp, in a directory whose name is shown at
the end of the build log. This is useful when debugging build issues.
See Debugging Build Failures, for tips and tricks on how to debug build
issues.
See also
https://www.gnu.org/software/guix/manual/guix.html#Debugging-Build-Failures
For the case that the built went through OK, there is no such option.
You could raise an exception at the end of your package
definition/build phases.
Also there is the -S option to build:
guix build -S <package-name>
builds the source of your package. This will download the package,
verifies the checkum applies patches and applies snippets (i.e. rules
to remove for example binaries or other non-free-licensed parts).
Björn
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#31956
; Package
guix
.
(Sun, 24 Jun 2018 19:28:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 31956 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Vagrant,
On Sun, 24 Jun 2018 12:06:17 -0700
Vagrant Cascadian <vagrant <at> debian.org> wrote:
> It would be great if there were an option you could pass that downloads
> and unpacks the source somewhere and drops you into the newly unpacked
> source directory.
>
> Not sure what to call it exactly, but something like:
>
> guix environment --with-source hello
+1
Right now, my silly workaround is to add a phase which fails
(add-after 'unpack 'fail
(lambda _
(error "stop it")))
and then do
guix build --keep-failed hello
and then do
guix environment --pure hello
cd /tmp/guix-build-hello*
That's... very manual.
Also, if the directory in /tmp is not .drv-0, the environment is technically not the same as it was inside the guix-daemon build container.
In that case there'd be an extra step
rm -rf /tmp/guix-build-hello-*.drv-0
ln -s /tmp/guix-build-hello-* /tmp/guix-build-hello-<...>.drv-0
cd /tmp/guix-build-hello-<...>.drv-0
All in all that's not simple.
Also, guix-daemon is taken from Nix and thus not exactly the same as
guix environment in some cases.
That's why in some cases I have to (edit the package definition and
invoke guix build) over and over again in order to find a problem.
In the long term we'll replace guix-daemon by guix environment.
Much easier to reproduce situations then.
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#31956
; Package
guix
.
(Sun, 24 Jun 2018 20:52:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 31956 <at> debbugs.gnu.org (full text, mbox):
Danny Milosavljevic writes:
>> Not sure what to call it exactly, but something like:
>>
>> guix environment --with-source hello
>
> +1
>
> Right now, my silly workaround is to add a phase which fails
>
> (add-after 'unpack 'fail
> (lambda _
> (error "stop it")))
>
> and then do
>
> guix build --keep-failed hello
>
> and then do
>
> guix environment --pure hello
> cd /tmp/guix-build-hello*
>
> That's... very manual.
A very nice recipe...interesting we had a discussion about this today on
#guix. What I would really like, is for the --with-source directory
be a git archive, so that edits can be made and tested until it works.
Attempt a rebuild with new patches/new git commit and repeat.
Making repeated patches until a build succeeds is something I find
pretty cumbersome.
It could be an ad-hoc, new git archive. It would also be nice if Guix
could somehow record upstream sources as (shallow?, tarred?) git
archives.
janneke
--
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
This bug report was last modified 6 years and 353 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.