unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Attila Lendvai <attila@lendvai.name>, 55270@debbugs.gnu.org
Subject: bug#55270: unpack phase randomly changes the cwd
Date: Thu, 05 May 2022 14:18:21 +0200	[thread overview]
Message-ID: <378a823f4ae3a60c2d3ad419b22958524c933b19.camel@telenet.be> (raw)
In-Reply-To: <IN6Ty5_9Tk68JceEubR3zTKjm8XTJOPv4-llOHUM18euCVLhGnRAeB_ncVn3AC2PbfDu_63Zq0YXlxXYHX8186pUHrciuQdCJCfH8TS69k4=@lendvai.name>

[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-05-05 12:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 11:16 bug#55270: unpack phase randomly changes the cwd Attila Lendvai
2022-05-05 12:18 ` Maxime Devos [this message]
2022-05-05 13:15   ` Attila Lendvai
2022-05-05 20:12 ` Liliana Marie Prikler
2022-07-12 14:11   ` Maxim Cournoyer
2022-07-12 16:47     ` Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=378a823f4ae3a60c2d3ad419b22958524c933b19.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=55270@debbugs.gnu.org \
    --cc=attila@lendvai.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).