diff options
author | Michael E Brown <michael_e_brown@dell.com> | 2007-12-14 16:27:39 -0600 |
---|---|---|
committer | Michael E Brown <michael_e_brown@dell.com> | 2007-12-14 16:27:39 -0600 |
commit | 184afb1852bccc8e9d1b38dea05f30af1180f122 (patch) | |
tree | a482f4f9bcaab39def5728ea060a28c07119ea9b | |
parent | 987d7c07a71dc792613f26c060efe4d354bf6891 (diff) | |
download | mock-184afb1852bccc8e9d1b38dea05f30af1180f122.tar.gz mock-184afb1852bccc8e9d1b38dea05f30af1180f122.tar.xz mock-184afb1852bccc8e9d1b38dea05f30af1180f122.zip |
remove uses of chroot rootdir attribute and use accessor.
-rw-r--r-- | py/mock/plugins/bind_mount.py | 1 | ||||
-rw-r--r-- | py/mock/plugins/root_cache.py | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/py/mock/plugins/bind_mount.py b/py/mock/plugins/bind_mount.py index df5e215..ff531f0 100644 --- a/py/mock/plugins/bind_mount.py +++ b/py/mock/plugins/bind_mount.py @@ -25,7 +25,6 @@ class BindMount(object): def __init__(self, rootObj, conf): self.rootObj = rootObj self.bind_opts = conf - self.rootdir = rootObj.rootdir rootObj.bindMountObj = self rootObj.addHook("preinit", self._bindMountPreInitHook) for srcdir, destdir in self.bind_opts['dirs']: diff --git a/py/mock/plugins/root_cache.py b/py/mock/plugins/root_cache.py index 5082925..6e9c60e 100644 --- a/py/mock/plugins/root_cache.py +++ b/py/mock/plugins/root_cache.py @@ -30,7 +30,6 @@ class RootCache(object): self.rootCacheFile = os.path.join(self.rootSharedCachePath, "cache.tar.gz") self.rootCacheLock = None self.state = rootObj.state - self.rootdir = rootObj.rootdir rootObj.rootCacheObj = self rootObj.addHook("preinit", self._rootCachePreInitHook) rootObj.addHook("postinit", self._rootCachePostInitHook) @@ -75,7 +74,7 @@ class RootCache(object): if os.path.exists(self.rootCacheFile) and self.rootObj.chrootWasCleaned: self.state("unpacking cache") self._rootCacheLock() - mock.util.do("tar xzf %s -C %s" % (self.rootCacheFile, self.rootdir)) + mock.util.do("tar xzf %s -C %s" % (self.rootCacheFile, self.rootObj.makeChrootPath())) self._rootCacheUnlock() self.chroot_setup_cmd = "update" self.rootObj.chrootWasCleaned = False @@ -86,6 +85,6 @@ class RootCache(object): if self.rootObj.chrootWasCleaned: self.state("creating cache") self._rootCacheLock(shared=0) - mock.util.do("tar czf %s -C %s ." % (self.rootCacheFile, self.rootdir)) + mock.util.do("tar czf %s -C %s ." % (self.rootCacheFile, self.rootObj.makeChrootPath())) self._rootCacheUnlock() |