diff options
author | Jesse Keating <jkeating@redhat.com> | 2009-02-05 17:53:48 -0800 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2009-02-05 18:05:42 -0800 |
commit | d6a3d9400521f912ce57fc3d7ac84a950ce05167 (patch) | |
tree | 9c649327d91aae7e68d4888e10c29c6c8d946d8a /py/mock | |
parent | 1d010be6f558ba252222bd26974c79f37b236ed4 (diff) | |
download | mock-d6a3d9400521f912ce57fc3d7ac84a950ce05167.tar.gz mock-d6a3d9400521f912ce57fc3d7ac84a950ce05167.tar.xz mock-d6a3d9400521f912ce57fc3d7ac84a950ce05167.zip |
Copy the hosts tzdata (/etc/localtime) into the chroot
Diffstat (limited to 'py/mock')
-rw-r--r-- | py/mock/backend.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/py/mock/backend.py b/py/mock/backend.py index 2bc63df..86b3fb7 100644 --- a/py/mock/backend.py +++ b/py/mock/backend.py @@ -263,6 +263,13 @@ class Root(object): # create rpmbuild dir self._buildDirSetup() + # set up timezone to match host + localtimedir = self.makeChrootPath('etc') + localtimepath = self.makeChrootPath('etc', 'localtime') + if os.path.exists(localtimepath): + os.remove(localtimepath) + shutil.copy2('/etc/localtime', localtimedir) + # done with init self._callHooks('postinit') |