diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-24 23:20:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-24 23:20:04 +0100 |
| commit | be71017812c947d1a2ca045279f52137df06a825 (patch) | |
| tree | 067fad54b139ad4aa6f5a6b215124daec792c174 | |
| parent | 50aa3e5ca90accdc725bfaf78676ccd9c9372294 (diff) | |
Hopefully fix cwd confusion.
| -rwxr-xr-x | cdist | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -138,12 +138,13 @@ class Environment(object): assert(false) def build_dependencies(self, target, project): + cwd = os.getcwd() if 'dependencies' in project.cscript: for d in project.cscript['dependencies'](target): - print d[0], d[1] dep = Project(d[0], d[1]) dep.checkout(self) self.build(target, dep) + os.chdir(cwd) def build(self, target, project): project.cscript['build'](self, target) @@ -196,7 +197,7 @@ class ChrootEnvironment(Environment): assert(cwd.startswith(prefix)) cwd = cwd[len(prefix):] - log('schroot[%s] -> %s' % (cwd, c)) + log('schroot [%s] -> %s' % (cwd, c)) command('%s schroot -c %s -d %s -p -- %s' % (self.variables_string(), self.chroot, cwd, c)) # @@ -294,7 +295,6 @@ class Project(object): self.specifier = 'master' def checkout(self, env): - print 'CHECKOUT %s' % self.name flags = '' redirect = '' if args.quiet: @@ -393,9 +393,7 @@ if args.command == 'build': target = Target(args.target) env = target.environment - print '1st checkout' project.checkout(env) - print 'deps' env.build_dependencies(target, project) env.build(target, project) |
