-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PoC: Do not export A #1357
base: master
Are you sure you want to change the base?
PoC: Do not export A #1357
Conversation
319ef51
to
4b61907
Compare
Why do you need to pass it via a file? It shouldn't be used by any external process, so it should be sufficient to leave it as a non-exported bash variable. |
I assumed that this is not possible. The I'd love to pass the variable directly, without a file. But I don't see how this is possible. What am I missing? |
ebuildExtraSource = os.path.join(env["T"], "portage-ebuild-extra-source") | ||
with open(ebuildExtraSource, mode="w") as f: | ||
for name, value in orig_env.items(): | ||
if name != "A": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize that this is not optimal, but that's a leftover from a previous implementation where everything was passed via file and not via env
. This should be changed once this PR leaves the PoC stage.
Perhaps we could write it straight into |
d9ec4a2
to
ac7f204
Compare
I've looked into this and I believe the resulting code would be more convoluted that we we have right now. |
Instead of passing A as part of the process environment, we pass it via a file. Since A is usually the greatest contributor to the process environment, removing it from the process environment significantly helps running into MAX_ARG_STRLEN when spawning a new child process. This means that A is now unexported in the ebuild. However, A is mostly used as part of the default_src_unpack function. And there A does not need to be exported. Proof-of-concept for https://bugs.gentoo.org/721088 Bug: https://bugs.gentoo.org/721088 Signed-off-by: Florian Schmaus <[email protected]>
ac7f204
to
fc3acfa
Compare
Instead of passing A as part of the process environment, we pass it via a file. Since A is usually the greatest contributor to the process environment, removing it from the process environment significantly helps running into MAX_ARG_STRLEN when spawning a new child process.
This means that A is now unexported in the ebuild. However, A is mostly used as part of the default_src_unpack function. And there A does not need to be exported.
Proof-of-concept for https://bugs.gentoo.org/721088
Bug: https://bugs.gentoo.org/721088