GNU bug report logs -
#55270
unpack phase randomly changes the cwd
Previous Next
Full log
Message #8 received at 55270 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Attila Lendvai schreef op do 05-05-2022 om 11:16 [+0000]:
> at the end of the unpack phase, the working directory is changed to a random directory.
>
> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/gnu-build-system.scm#n178
It takes the first result 'scandir' -- i.e., the 'smallest' file name
according to string-locale<?, so technically it's not random (so no
reproducibility problems)
>
> this is fine *when* the archive contains a single dir... but this DWIM'ness has just burned 15 mintues of my life, and i recommend removing it.
>
> if it is to stay, then at least it should be patched that it only happens when the dir after extraction only contains a single subdir, and no files otherwise.
Except maybe when using 'out-of-source?', I think it has to stay in
some form -- somehow, we will have to run build scripts, "make", maybe
do some 'substitute*', and having to type the version number and
directory name inside build phases seems a bit error-prone (what if the
source is changed fom tarball or 'zip' to a vcs checkout?).
I agree with only chdiring if there's only one subdir (and no other
files) though -- ‘just the first’ is a bit arbitrary.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 337 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.