Sourcing environment-variables may send to wrong directory

  • Done
  • quality assurance status badge
Details
2 participants
  • Alexandre Hannud Abdo
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
Alexandre Hannud Abdo
Severity
normal
A
A
Alexandre Hannud Abdo wrote on 20 Apr 2021 22:37
(address . bug-guix@gnu.org)
db37b88c3d5fb402bb39efcb1163191cdff3b72d.camel@member.fsf.org
Ni!

While debugging a package definition I met the following odd behavior:

On subsequent failed builds, if I go to build dir and source
'environment-variables', this is what happens:


/tmp/guix-build-[package].drv-1$ source environment-variables
/tmp/guix-build-[package].drv-0/[package]$


See how I source it in failed build '-1', but my cwd gets changed to
failed build '-0'!

Cheers,
ale
.~´
T
T
Tobias Geerinckx-Rice wrote on 20 Apr 2021 23:20
(name . Alexandre Hannud Abdo)(address . abdo@member.fsf.org)
875z0gmz5f.fsf@nckx
Alexandre,

Alexandre Hannud Abdo writes:
Toggle quote (3 lines)
> /tmp/guix-build-[package].drv-1$ source environment-variables
> /tmp/guix-build-[package].drv-0/[package]$

If Guix used a different build directory depending on how many
previous builds were kept, many builds would become
irreproducible.

Instead, Guix always uses .drv-0 inside the build container. When
you pass --keep and the build fails and .drv-0 already exists on
the host, it's renamed.

If you want ‘environment-variables’ to match the environment
outside of the container, rename /tmp/guix-build-[package].drv-1
to /tmp/guix-build-[package].drv-0.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYH9FjQ0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15Cd0A/RgCltWkrFSlHDbKo7InkVvyfLrmm7dWw6yBmdwh
U2HqAP0chpIdpinbEVrCNOSZZx+VETrrHjLR5XnCmNU8H4loBQ==
=k3rB
-----END PGP SIGNATURE-----

A
A
Alexandre Hannud Abdo wrote on 12 Jan 22:32 +0100
Sourcing environment-variables may send to wrong directory
(address . 47919-done@debbugs.gnu.org)
59a13e98-88fa-9230-008f-af5adda866a3@member.fsf.org
Ni! I see. Thanks for the explanation. .~´
Closed
?