mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
Remove incorrect newlines in AM.xml
This fixes the all-popular ndk r8c or later wordlist error
This commit is contained in:
parent
9d72d655a6
commit
3c3ca99baa
1 changed files with 11 additions and 0 deletions
|
|
@ -318,6 +318,17 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, extlib_dir, tmp_dir,
|
||||||
for d in jni_components:
|
for d in jni_components:
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print "Running ndk-build in " + root_dir + '/' + d
|
print "Running ndk-build in " + root_dir + '/' + d
|
||||||
|
manifest = root_dir + '/' + d + '/AndroidManifest.xml'
|
||||||
|
if os.path.exists(manifest):
|
||||||
|
# Read and write the whole AM.xml to fix newlines and avoid
|
||||||
|
# the ndk r8c or later 'wordlist' errors. The outcome of this
|
||||||
|
# under gnu/linux is the same as when using tools like
|
||||||
|
# dos2unix, but the native python way is faster and will
|
||||||
|
# work in non-unix systems.
|
||||||
|
manifest_text = open(manifest, 'U').read()
|
||||||
|
open(manifest, 'w').write(manifest_text)
|
||||||
|
# In case the AM.xml read was big, free the memory
|
||||||
|
del manifest_text
|
||||||
p = subprocess.Popen([ndkbuild], cwd=root_dir + '/' + d,
|
p = subprocess.Popen([ndkbuild], cwd=root_dir + '/' + d,
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue