mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 15:30:28 +03:00
Remove trailing spaces and tabs
This commit is contained in:
parent
c113371297
commit
0765f14c9d
14 changed files with 142 additions and 142 deletions
|
|
@ -464,7 +464,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||
print "Running 'build' commands in %s" % root_dir
|
||||
|
||||
p = FDroidPopen(['bash', '-x', '-c', cmd], cwd=root_dir)
|
||||
|
||||
|
||||
if p.returncode != 0:
|
||||
raise BuildException("Error running build command for %s:%s" %
|
||||
(app['id'], thisbuild['version']), p.stdout, p.stderr)
|
||||
|
|
@ -533,7 +533,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||
raise BuildException("Expected to find buildozer-compatible spec at {0}"
|
||||
.format(spec))
|
||||
|
||||
defaults = {'orientation': 'landscape', 'icon': '',
|
||||
defaults = {'orientation': 'landscape', 'icon': '',
|
||||
'permissions': '', 'android.api': "18"}
|
||||
bconfig = ConfigParser(defaults, allow_no_value=True)
|
||||
bconfig.read(spec)
|
||||
|
|
@ -550,7 +550,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||
cmd += ' ANDROIDAPI=' + str(bconfig.get('app', 'android.api'))
|
||||
cmd += ' VIRTUALENV=virtualenv'
|
||||
cmd += ' ./distribute.sh'
|
||||
cmd += ' -m ' + "'" + ' '.join(modules) + "'"
|
||||
cmd += ' -m ' + "'" + ' '.join(modules) + "'"
|
||||
cmd += ' -d fdroid'
|
||||
if subprocess.call(cmd, cwd='python-for-android', shell=True) != 0:
|
||||
raise BuildException("Distribute build failed")
|
||||
|
|
@ -614,7 +614,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||
|
||||
if flavour in ['main', 'yes', '']:
|
||||
flavour = ''
|
||||
|
||||
|
||||
commands = [config['gradle']]
|
||||
if 'preassemble' in thisbuild:
|
||||
for task in thisbuild['preassemble'].split():
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ class vcs_svn(vcs):
|
|||
def userargs(self):
|
||||
if self.username is None:
|
||||
return ['--non-interactive']
|
||||
return ['--username', self.username,
|
||||
return ['--username', self.username,
|
||||
'--password', self.password,
|
||||
'--non-interactive']
|
||||
|
||||
|
|
@ -615,7 +615,7 @@ def manifest_paths(app_dir, flavour):
|
|||
if flavour:
|
||||
possible_manifests.append(
|
||||
os.path.join(app_dir, 'src', flavour, 'AndroidManifest.xml'))
|
||||
|
||||
|
||||
return [path for path in possible_manifests if os.path.isfile(path)]
|
||||
|
||||
# Retrieve the package name
|
||||
|
|
@ -839,7 +839,7 @@ def getsrclib(spec, srclib_dir, srclibpaths=[], subdir=None, target=None,
|
|||
if p.returncode != 0:
|
||||
raise BuildException("Error running prepare command for srclib %s"
|
||||
% name, p.stdout, p.stderr)
|
||||
|
||||
|
||||
if srclib["Update Project"] == "Yes":
|
||||
print "Updating srclib %s at path %s" % (name, libdir)
|
||||
cmd = [os.path.join(config['sdk_path'], 'tools', 'android'),
|
||||
|
|
@ -1234,7 +1234,7 @@ def scan_source(build_dir, root_dir, thisbuild):
|
|||
def removeproblem(what, fd, fp):
|
||||
print 'Removing %s at %s' % (what, fd)
|
||||
os.remove(fp)
|
||||
|
||||
|
||||
def handleproblem(what, fd, fp):
|
||||
if todelete(fd):
|
||||
removeproblem(what, fd, fp)
|
||||
|
|
@ -1285,7 +1285,7 @@ def scan_source(build_dir, root_dir, thisbuild):
|
|||
# Presence of a jni directory without buildjni=yes might
|
||||
# indicate a problem... (if it's not a problem, explicitly use
|
||||
# buildjni=no to bypass this check)
|
||||
if (os.path.exists(os.path.join(root_dir, 'jni')) and
|
||||
if (os.path.exists(os.path.join(root_dir, 'jni')) and
|
||||
thisbuild.get('buildjni') is None):
|
||||
msg = 'Found jni directory, but buildjni is not enabled'
|
||||
problems.append(msg)
|
||||
|
|
@ -1381,19 +1381,19 @@ class AsynchronousFileReader(threading.Thread):
|
|||
in a separate thread. Pushes read lines on a queue to
|
||||
be consumed in another thread.
|
||||
'''
|
||||
|
||||
|
||||
def __init__(self, fd, queue):
|
||||
assert isinstance(queue, Queue.Queue)
|
||||
assert callable(fd.readline)
|
||||
threading.Thread.__init__(self)
|
||||
self._fd = fd
|
||||
self._queue = queue
|
||||
|
||||
|
||||
def run(self):
|
||||
'''The body of the tread: read lines and put them on the queue.'''
|
||||
for line in iter(self._fd.readline, ''):
|
||||
self._queue.put(line)
|
||||
|
||||
|
||||
def eof(self):
|
||||
'''Check whether there is no more content to expect.'''
|
||||
return not self.is_alive() and self._queue.empty()
|
||||
|
|
@ -1419,14 +1419,14 @@ def FDroidPopen(commands, cwd=None):
|
|||
result = PopenResult()
|
||||
p = subprocess.Popen(commands, cwd=cwd,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
|
||||
stdout_queue = Queue.Queue()
|
||||
stdout_reader = AsynchronousFileReader(p.stdout, stdout_queue)
|
||||
stdout_reader.start()
|
||||
stderr_queue = Queue.Queue()
|
||||
stderr_reader = AsynchronousFileReader(p.stderr, stderr_queue)
|
||||
stderr_reader.start()
|
||||
|
||||
|
||||
# Check the queues for output (until there is no more to get)
|
||||
while not stdout_reader.eof() or not stderr_reader.eof():
|
||||
# Show what we received from standard output
|
||||
|
|
@ -1460,7 +1460,7 @@ def remove_signing_keys(build_dir):
|
|||
|
||||
with open(path, "r") as o:
|
||||
lines = o.readlines()
|
||||
|
||||
|
||||
opened = 0
|
||||
with open(path, "w") as o:
|
||||
for line in lines:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import java.util.jar.JarEntry;
|
|||
import java.util.jar.JarFile;
|
||||
|
||||
public class getsig {
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
String apkPath = null;
|
||||
|
|
@ -29,12 +29,12 @@ public class getsig {
|
|||
System.out.println("Specify the APK file to get the signature from!");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
|
||||
JarFile apk = new JarFile(apkPath);
|
||||
java.security.cert.Certificate[] certs = null;
|
||||
|
||||
|
||||
Enumeration entries = apk.entries();
|
||||
while (entries.hasMoreElements()) {
|
||||
JarEntry je = (JarEntry) entries.nextElement();
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ def main():
|
|||
else:
|
||||
spec = os.path.join(root_dir, 'buildozer.spec')
|
||||
if os.path.exists(spec):
|
||||
defaults = {'orientation': 'landscape', 'icon': '',
|
||||
defaults = {'orientation': 'landscape', 'icon': '',
|
||||
'permissions': '', 'android.api': "18"}
|
||||
bconfig = ConfigParser(defaults, allow_no_value=True)
|
||||
bconfig.read(spec)
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ def main():
|
|||
|
||||
apks = { common.apknameinfo(apkfile)[0] : apkfile for apkfile in
|
||||
sorted(glob.glob(os.path.join(output_dir, '*.apk'))) }
|
||||
|
||||
|
||||
for appid, apk in apks.iteritems():
|
||||
# Get device list each time to avoid device not found errors
|
||||
devs = devices()
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class MetaDataException(Exception):
|
|||
def __str__(self):
|
||||
return repr(self.value)
|
||||
|
||||
# Designates a metadata field type and checks that it matches
|
||||
# Designates a metadata field type and checks that it matches
|
||||
#
|
||||
# 'name' - The long name of the field type
|
||||
# 'matching' - List of possible values or regex expression
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ def main():
|
|||
# Do the scan...
|
||||
buildprobs = common.scan_source(build_dir, root_dir, thisbuild)
|
||||
for problem in buildprobs:
|
||||
problems.append(problem +
|
||||
problems.append(problem +
|
||||
' in ' + app['id'] + ' ' + thisbuild['version'])
|
||||
|
||||
except BuildException as be:
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ def make_index(apps, apks, repodir, archive, categories):
|
|||
if app['id'] == link:
|
||||
return ("fdroid.app:" + link, app['Name'])
|
||||
raise MetaDataException("Cannot resolve app id " + link)
|
||||
addElement('desc',
|
||||
addElement('desc',
|
||||
metadata.description_html(app['Description'], linkres), doc, apel)
|
||||
addElement('license', app['License'], doc, apel)
|
||||
if 'Categories' in app:
|
||||
|
|
@ -618,7 +618,7 @@ def make_index(apps, apks, repodir, archive, categories):
|
|||
if app['Requires Root']:
|
||||
if 'ACCESS_SUPERUSER' not in apk['permissions']:
|
||||
apk['permissions'].append('ACCESS_SUPERUSER')
|
||||
|
||||
|
||||
if len(apk['permissions']) > 0:
|
||||
addElement('permissions', ','.join(apk['permissions']), doc, apkel)
|
||||
if 'nativecode' in apk and len(apk['nativecode']) > 0:
|
||||
|
|
@ -639,7 +639,7 @@ def make_index(apps, apks, repodir, archive, categories):
|
|||
if not options.quiet:
|
||||
print "Creating signed index."
|
||||
print "Key fingerprint:", repo_pubkey_fingerprint
|
||||
|
||||
|
||||
#Create a jar of the index...
|
||||
p = subprocess.Popen(['jar', 'cf', 'index.jar', 'index.xml'],
|
||||
cwd=repodir, stdout=subprocess.PIPE)
|
||||
|
|
@ -860,7 +860,7 @@ def main():
|
|||
print "Generated skeleton metadata for " + apk['id']
|
||||
else:
|
||||
print "WARNING: " + apk['apkname'] + " (" + apk['id'] + ") has no metadata"
|
||||
print " " + apk['name'] + " - " + apk['version']
|
||||
print " " + apk['name'] + " - " + apk['version']
|
||||
|
||||
if len(repodirs) > 1:
|
||||
archive_old_apks(apps, apks, repodirs[0], repodirs[1], config['archive_older'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue