diff options
author | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2008-07-09 13:19:39 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2008-07-09 13:19:39 +0530 |
commit | de6b6ab8497bd5f30eb38847bf9b7dbddea46a4c (patch) | |
tree | 359116c8e05f28fe80aa7585fcf887f74ca5811a /slave/autotua | |
parent | Cleanup after premature dying. Temporary till we haz nice exception handling. (diff) | |
download | autotua-de6b6ab8497bd5f30eb38847bf9b7dbddea46a4c.tar.gz autotua-de6b6ab8497bd5f30eb38847bf9b7dbddea46a4c.tar.bz2 autotua-de6b6ab8497bd5f30eb38847bf9b7dbddea46a4c.zip |
- Message to indicate status (Preparing WorkChroot)
- Another bug! (armin76 you... :P)
RMTREE_INIT was incomplete and incorrect
Diffstat (limited to 'slave/autotua')
-rw-r--r-- | slave/autotua/chroot/__init__.py | 1 | ||||
-rw-r--r-- | slave/autotua/sync/__init__.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/slave/autotua/chroot/__init__.py b/slave/autotua/chroot/__init__.py index 8899181..167f643 100644 --- a/slave/autotua/chroot/__init__.py +++ b/slave/autotua/chroot/__init__.py @@ -135,6 +135,7 @@ class WorkChroot(object): # Tidy up incase we screwed up last time self.tidy() # self.pristine.dir/ => rsync *contents* to self.chrootdir + print "Preparing Work Chroot..." sync.Syncer(uri=self.pristine.dir+"/", destdir=self.chrootdir, scheme='rsync-nc').sync() for dir in ['bin', 'jobfiles', 'jobtage', 'src']: os.makedirs('%s/tmp/autotua/%s' % (self.chrootdir, dir)) diff --git a/slave/autotua/sync/__init__.py b/slave/autotua/sync/__init__.py index 2067839..7b30ae8 100644 --- a/slave/autotua/sync/__init__.py +++ b/slave/autotua/sync/__init__.py @@ -69,7 +69,7 @@ class Syncer(object): raise 'Unknown scm: "%s"' % self.scheme result = subprocess.Popen('cd "%s"; %s' % (self.destdir, is_repo_cmd), shell=True) returncode = result.wait() - if returncode < 0: + if returncode != 0: return RMTREE_INIT return INIT_SYNC elif self.scheme in ['git-export', 'bzr-export']: @@ -89,6 +89,7 @@ class Syncer(object): elif result == INIT_SYNC: self.command.run('sync') elif result == RMTREE_INIT: + shutil.rmtree(self.destdir) self.command.run('init') else: raise 'Erm. I did not expect this. DIE DIE DIE.' |