Closed tin-machine closed 1 year ago
I'm a little confused how this could be impacting your build of the dhcpd package.
The file
"${PROJECT_DIR}/chroot/em-$$"
is written into the chroot's directory, and then executed inside of the chroot, without the environment from the host.
The SCRIPTS
environment variable shouldn't be set when em-$$
is running, unless it's coming from something inside of the chroot.
Notably, I don't run into this, and i'm pretty sure dhcpd is emerged as part of the default set of packages.
This isn't to say that we can't unset the SCRIPTS variable. But before doing that, i'd like to understand what's setting it in the first place?
E.g. what value does it have when it's breaking?
Thanks for checking. I tried to share the following file but it disappeared. Build.Dist/build/GenPi64Systemd/chroot/var/tmp/portage/net-misc/dhcpcd-9.5.1/temp/environment
It will take a few days to get back to you. Please take your time.
Sorry for the delay in getting back to you. I don't think this pull request is appropriate and I will close it.
However, I will leave my confirmation result as a verification result. I have stopped at a different package, which may be due to a change in the status of the Gentoo repositories. The logs are for a different package.
I built with build.sh and got an error in dev-util/cmake This error seems to be a general error, not one caused by an environment variable.
All of the environment variables seem to be taken over. I think chroot is the ideal way to do this in a clean environment.
I wondered why and looked into it. I thought "os.environ.clear()" might be necessary (I could be wrong, I'm not sure...). For example, the script below.
import os
import pychroot
chroot_path = "/var/tmp"
with pychroot.Chroot(chroot_path):
os.environ.clear()
os.environ["PATH"] = "/bin:/usr/bin"
os.environ["TERM"] = "xterm"
for key, value in os.environ.items():
print(f"{key}={value}")
print("Back in host environment")
os.environ.clear() is commented out, the environment variables are inherited. So I would like to close my pullrequest. I will try another way.
I will try another method.
Overview
net-misc/dhcpcd-9.5.1 fails to emerge at JOB emerge_new_profile.
Changes
parsers/emerge/emerge
I want to unset $SCRIPTS just before an emerge done in a child process.
My environment
Issues
Log of failed emerge of net-misc/dhcpcd-9.5.1 at JOB emerge_new_profile.
The logs before and after are shown below.
Checking the Makefile in net-misc/dhcpcd, uses $SCRIPTS as the target for all.
This seems to cause net-misc/dhcpcd-9.5.1 to refer to Build.Dist/scripts when building. ( It appears that you are trying to reference an area outside of the chroot. I would appreciate it if you could point out if this is a problem in my environment )
I thought there are two approaches to improve this problem.
If there are any dangers I am unaware of, please reject.
Additional Information
I have confirmed that unsetting in the child process does not affect the parent process as follows.
Parent script
child script( child_script.sh )