diff options
author | Clark Williams <williams@redhat.com> | 2009-02-01 09:41:49 -0600 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2009-02-01 09:41:49 -0600 |
commit | bc4dc3f77deed7b59dc872f634a13380b06a33d5 (patch) | |
tree | 3233d14c0134af081b98ba785c1041e6b45f2751 | |
parent | 43b9b5a58bc1533c245202bde51e8f091d25b440 (diff) | |
download | mock-bc4dc3f77deed7b59dc872f634a13380b06a33d5.tar.gz mock-bc4dc3f77deed7b59dc872f634a13380b06a33d5.tar.xz mock-bc4dc3f77deed7b59dc872f634a13380b06a33d5.zip |
set HOME environment variable to be the chroot home
-rwxr-xr-x | py/mock.py | 2 | ||||
-rw-r--r-- | py/mock/backend.py | 2 |
2 files changed, 1 insertions, 3 deletions
@@ -411,7 +411,6 @@ def main(ret): uidManager = mock.uid.uidManager(unprivUid, unprivGid) uidManager._becomeUser(unprivUid, unprivGid) - del(os.environ["HOME"]) # defaults config_opts = {} @@ -499,6 +498,7 @@ def main(ret): ret["chroot"] = chroot ret["config_opts"] = config_opts os.umask(002) + os.environ["HOME"] = chroot.homedir # New namespace starting from here try: diff --git a/py/mock/backend.py b/py/mock/backend.py index f259afe..d812743 100644 --- a/py/mock/backend.py +++ b/py/mock/backend.py @@ -383,8 +383,6 @@ class Root(object): srpmChrootFilename = self._copySrpmIntoChroot(srpm) srpmBasename = os.path.basename(srpmChrootFilename) - # install srpm - os.environ["HOME"] = self.homedir # Completely/Permanently drop privs while running the following: self.doChroot( ["rpm", "-Uvh", "--nodeps", srpmChrootFilename], |