Skip to content

Commit

Permalink
fixup! Do not export PMS variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowdalic committed Jan 7, 2025
1 parent ddf56a9 commit 7ef309a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/portage/package/ebuild/doebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -2197,10 +2197,15 @@ def spawn(
env = orig_env.copy()

t = env["T"]
if not os.path.isdir(t):
os.makedirs(t)
if os.path.isdir(t):
ebuild_extra_source_path = os.path.join(t, ".portage-ebuild-extra-source")
else:
ebuild_extra_source_path = tempfile.NamedTemporaryFile(
prefix=f"portage-ebuild-extra-source",
delete=True,
delete_on_close=False,
).name

ebuild_extra_source_path = os.path.join(t, ".portage-ebuild-extra-source")
with open(ebuild_extra_source_path, mode="w") as f:
for var_name in unexported_env_vars:
var_value = orig_env.get(var_name)
Expand Down

0 comments on commit 7ef309a

Please sign in to comment.