aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2008-08-30 16:49:00 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2008-08-30 16:49:00 +0530
commit166f1443e8ae3fd46e9af64fbd5202fa916aea79 (patch)
tree6989591a22fa151314354a596870ba237cb9fb26 /slave/autotua
parentUse "atexit" for cleaning up instead of the test_modules.sh kludge. (diff)
downloadautotua-166f1443e8ae3fd46e9af64fbd5202fa916aea79.tar.gz
autotua-166f1443e8ae3fd46e9af64fbd5202fa916aea79.tar.bz2
autotua-166f1443e8ae3fd46e9af64fbd5202fa916aea79.zip
Mount PORTAGE_DIR and DISTFILES_DIR only if they are directories. Also,
don't mount DISTFILES_DIR if it's PORTAGE_DIR+'/distfiles'
Diffstat (limited to 'slave/autotua')
-rw-r--r--slave/autotua/chroot/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/slave/autotua/chroot/__init__.py b/slave/autotua/chroot/__init__.py
index 4ed0cec..042b44d 100644
--- a/slave/autotua/chroot/__init__.py
+++ b/slave/autotua/chroot/__init__.py
@@ -118,11 +118,13 @@ class WorkChroot(object):
if const.PORTAGE_DIR:
if not osp.isdir(const.PORTAGE_DIR):
print "\"%s\" is not a directory, cannot mount" % const.PORTAGE_DIR
- self._bind(const.PORTAGE_DIR, '/usr/portage')
- if const.DISTFILES_DIR:
+ else:
+ self._bind(const.PORTAGE_DIR, '/usr/portage')
+ if const.DISTFILES_DIR and not os.path.samefile(const.DISTFILES_DIR, const.PORTAGE_DIR+'/distfiles'):
if not osp.isdir(const.DISTFILES_DIR):
print "\"%s\" is not a directory, cannot mount" % const.DISTFILES_DIR
- self._bind(const.DISTFILES_DIR, '/usr/portage/distfiles', ro=False)
+ else:
+ self._bind(const.DISTFILES_DIR, '/usr/portage/distfiles', ro=False)
self._bind(const.AUTOTUA_DIR+'/bin', const.CHAUTOTUA_DIR+'/bin')
self._bind(self.jobdir+'/jobtage', const.CHAUTOTUA_DIR+'/jobtage')