Another try at this. I noticed I used the wrong variable and could have
wound up removing /etc/resolv.conf by accident.
--
Jes
Show replies by date
---
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..6c9bb6e 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(resolvpath):
+ os.remove(resolvpath)
+ shutil.copy2('/etc/localtime', localtimedir)
+
# done with init
self._callHooks('postinit')
--
1.6.0.6