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

> 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)


fair enough. what i meant to communicate is that it's arbitrary, not random.

another potential issue:

if the root of the archive contains a file called 'environment-variables', then this way it would overwrite the one generated by Guix. this may not necessarily be an issue, though, if that file is never used after the unpack phase.

maybe the cleanest would be to:

1) mkdir a directory ('extracted/'?) and chdir into it prior to
   unpacking, and

2) only do the DWIM chdir if the toplevel of the archive was a single
   dir.

but i lack the necessary perspective to see all the implications.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“There is always a philosophy for lack of courage.”
	— Albert Camus (1913–1960)





  reply	other threads:[~2022-05-05 13:16 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
2022-05-05 13:15   ` Attila Lendvai [this message]
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='Bp8HCSiQBKqwlPg7xZPY-2mqTh7jppBKwk0rBCg5cJ2N7MHGm2ci-jsXnKjRqDRc7N2oXR5xJ_eeekBJfUZQew45gnA1WeGFTMwMEcGZ0_I=@lendvai.name' \
    --to=attila@lendvai.name \
    --cc=55270@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    /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).