mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Merge commit 'refs/merge-requests/74' of git://gitorious.org/f-droid/fdroidserver into merge-requests/74
This commit is contained in:
commit
3dfd7956e1
1 changed files with 9 additions and 9 deletions
18
common.py
18
common.py
|
|
@ -829,6 +829,15 @@ def prepare_source(vcs, app, build, build_dir, extlib_dir, sdk_path, ndk_path, j
|
||||||
if os.path.exists(badpath):
|
if os.path.exists(badpath):
|
||||||
shutil.rmtree(badpath)
|
shutil.rmtree(badpath)
|
||||||
|
|
||||||
|
# Apply patches if any
|
||||||
|
if 'patch' in build:
|
||||||
|
for patch in build['patch'].split(';'):
|
||||||
|
print "Applying " + patch
|
||||||
|
patch_path = os.path.join('metadata', app['id'], patch)
|
||||||
|
if subprocess.call(['patch', '-p1',
|
||||||
|
'-i', os.path.abspath(patch_path)], cwd=build_dir) != 0:
|
||||||
|
raise BuildException("Failed to apply patch %s" % patch_path)
|
||||||
|
|
||||||
# Run a pre-build command if one is required...
|
# Run a pre-build command if one is required...
|
||||||
if build.has_key('prebuild'):
|
if build.has_key('prebuild'):
|
||||||
prebuild = build['prebuild']
|
prebuild = build['prebuild']
|
||||||
|
|
@ -839,15 +848,6 @@ def prepare_source(vcs, app, build, build_dir, extlib_dir, sdk_path, ndk_path, j
|
||||||
if subprocess.call(prebuild, cwd=root_dir, shell=True) != 0:
|
if subprocess.call(prebuild, cwd=root_dir, shell=True) != 0:
|
||||||
raise BuildException("Error running pre-build command")
|
raise BuildException("Error running pre-build command")
|
||||||
|
|
||||||
# Apply patches if any
|
|
||||||
if 'patch' in build:
|
|
||||||
for patch in build['patch'].split(';'):
|
|
||||||
print "Applying " + patch
|
|
||||||
patch_path = os.path.join('metadata', app['id'], patch)
|
|
||||||
if subprocess.call(['patch', '-p1',
|
|
||||||
'-i', os.path.abspath(patch_path)], cwd=build_dir) != 0:
|
|
||||||
raise BuildException("Failed to apply patch %s" % patch_path)
|
|
||||||
|
|
||||||
# Special case init functions for funambol...
|
# Special case init functions for funambol...
|
||||||
if build.get('initfun', 'no') == "yes":
|
if build.get('initfun', 'no') == "yes":
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue