summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-04-24 23:20:04 +0100
committerCarl Hetherington <cth@carlh.net>2013-04-24 23:20:04 +0100
commitbe71017812c947d1a2ca045279f52137df06a825 (patch)
tree067fad54b139ad4aa6f5a6b215124daec792c174
parent50aa3e5ca90accdc725bfaf78676ccd9c9372294 (diff)
Hopefully fix cwd confusion.
-rwxr-xr-xcdist8
1 files changed, 3 insertions, 5 deletions
diff --git a/cdist b/cdist
index 25acfc9..9fc6a31 100755
--- a/cdist
+++ b/cdist
@@ -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)