mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
Fix some crashes with clean/build procedures
This commit is contained in:
parent
603aa34114
commit
1b291a58d7
1 changed files with 22 additions and 22 deletions
|
|
@ -371,12 +371,13 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||||
|
|
||||||
p = subprocess.Popen(cmd, cwd=gradle_dir,
|
p = subprocess.Popen(cmd, cwd=gradle_dir,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
else:
|
elif thisbuild.get('update', '.') != 'no':
|
||||||
print "Cleaning Ant project..."
|
print "Cleaning Ant project..."
|
||||||
cmd = ['ant', 'clean']
|
cmd = ['ant', 'clean']
|
||||||
p = subprocess.Popen(cmd, cwd=root_dir,
|
p = subprocess.Popen(cmd, cwd=root_dir,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
||||||
|
if p is not None:
|
||||||
for line in iter(p.stdout.readline, ''):
|
for line in iter(p.stdout.readline, ''):
|
||||||
if verbose:
|
if verbose:
|
||||||
# Output directly to console
|
# Output directly to console
|
||||||
|
|
@ -391,7 +392,6 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
else:
|
else:
|
||||||
error += line
|
error += line
|
||||||
|
|
||||||
p.communicate()
|
p.communicate()
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
raise BuildException("Error cleaning %s:%s" %
|
raise BuildException("Error cleaning %s:%s" %
|
||||||
|
|
@ -435,7 +435,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||||
output = ''
|
output = ''
|
||||||
error = ''
|
error = ''
|
||||||
if 'build' in thisbuild:
|
if 'build' in thisbuild:
|
||||||
build = thisbuild['build']
|
cmd = thisbuild['build']
|
||||||
# Substitute source library paths into commands...
|
# Substitute source library paths into commands...
|
||||||
for name, libpath in srclibpaths:
|
for name, libpath in srclibpaths:
|
||||||
libpath = os.path.relpath(libpath, root_dir)
|
libpath = os.path.relpath(libpath, root_dir)
|
||||||
|
|
@ -446,7 +446,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||||
if verbose:
|
if verbose:
|
||||||
print "Running 'build' commands in %s" % root_dir
|
print "Running 'build' commands in %s" % root_dir
|
||||||
|
|
||||||
p = subprocess.Popen(['bash', '-x', '-c', build], cwd=root_dir,
|
p = subprocess.Popen(['bash', '-x', '-c', cmd], cwd=root_dir,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
for line in iter(p.stdout.readline, ''):
|
for line in iter(p.stdout.readline, ''):
|
||||||
if verbose:
|
if verbose:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue