diff options
Diffstat (limited to 'lorry')
-rwxr-xr-x | lorry | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -269,19 +269,18 @@ class Lorry(cliapp.Application): assert os.path.exists(sourceobjects), "No source objects" objectspath = os.path.join(dest, 'objects') os.mkdir(objectspath) - for dirpath, dirnames, filenames in os.walk(objectspath): - assert dirpath.startswith(objectspath) - # strip objectspath and / from relpath - relpath = dirpath[len(objectspath)+1:] + for dirpath, dirnames, filenames in os.walk(sourceobjects): + assert dirpath.startswith(sourceobjects) + # strip sourceobjects and / from relpath + relpath = dirpath[len(sourceobjects)+1:] for dirname in dirnames: - os.mkdir(os.path.join(dest, relpath, dirname)) + os.mkdir(os.path.join(objectspath, relpath, dirname)) for filename in filenames: - assert os.path.exists(os.path.join(dest, relpath)) + assert os.path.exists(os.path.join(objectspath, relpath)) os.link(os.path.join(dirpath, filename), - os.path.join(dest, relpath, filename)) + os.path.join(objectspath, relpath, filename)) return dest - def mirror_git(self, project_name, dirname, gitdir, spec): if not os.path.exists(gitdir): self.progress('.. initialising git dir') @@ -462,6 +461,7 @@ class Lorry(cliapp.Application): kwargs['stdout'] = open(self.settings['command-stdout'], 'a') if self.settings['command-stderr']: kwargs['stderr'] = open(self.settings['command-stderr'], 'a') + kwargs['stdin'] = open('/dev/null', 'r') logging.debug('Running: argv=%s kwargs=%s' % (repr(argv), repr(kwargs))) exit, out, err = self.runcmd_unchecked(argv, **kwargs) |