mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 07:52:35 +03:00
Tidied up some unused junk
This commit is contained in:
parent
94598a05f5
commit
a762a0cb04
4 changed files with 3 additions and 14 deletions
|
@ -504,7 +504,7 @@ def parse_metadata(metafile, verbose=False):
|
||||||
thisbuild['version'] = parts[0]
|
thisbuild['version'] = parts[0]
|
||||||
thisbuild['vercode'] = parts[1]
|
thisbuild['vercode'] = parts[1]
|
||||||
try:
|
try:
|
||||||
testvercode = int(thisbuild['vercode'])
|
int(thisbuild['vercode'])
|
||||||
except:
|
except:
|
||||||
raise MetaDataException("Invalid version code for build in " + metafile.name)
|
raise MetaDataException("Invalid version code for build in " + metafile.name)
|
||||||
if parts[2].startswith('!'):
|
if parts[2].startswith('!'):
|
||||||
|
@ -656,7 +656,7 @@ def parse_metadata(metafile, verbose=False):
|
||||||
curbuild['version'] = vv[0]
|
curbuild['version'] = vv[0]
|
||||||
curbuild['vercode'] = vv[1]
|
curbuild['vercode'] = vv[1]
|
||||||
try:
|
try:
|
||||||
testvercode = int(curbuild['vercode'])
|
int(curbuild['vercode'])
|
||||||
except:
|
except:
|
||||||
raise MetaDataException("Invalid version code for build in " + metafile.name)
|
raise MetaDataException("Invalid version code for build in " + metafile.name)
|
||||||
buildlines = []
|
buildlines = []
|
||||||
|
@ -1063,7 +1063,6 @@ def fetch_real_name(app_dir, flavour):
|
||||||
app_search = re.compile(r'.*<application.*').search
|
app_search = re.compile(r'.*<application.*').search
|
||||||
name_search = re.compile(r'.*android:label="([^"]+)".*').search
|
name_search = re.compile(r'.*android:label="([^"]+)".*').search
|
||||||
app_found = False
|
app_found = False
|
||||||
name = None
|
|
||||||
for f in manifest_paths(app_dir, flavour):
|
for f in manifest_paths(app_dir, flavour):
|
||||||
if not f.endswith(".xml"):
|
if not f.endswith(".xml"):
|
||||||
continue
|
continue
|
||||||
|
@ -1212,9 +1211,6 @@ def parse_srclib(metafile, **kw):
|
||||||
if metafile is None:
|
if metafile is None:
|
||||||
return thisinfo
|
return thisinfo
|
||||||
|
|
||||||
mode = 0
|
|
||||||
buildlines = []
|
|
||||||
|
|
||||||
for line in metafile:
|
for line in metafile:
|
||||||
line = line.rstrip('\r\n')
|
line = line.rstrip('\r\n')
|
||||||
if len(line) == 0:
|
if len(line) == 0:
|
||||||
|
@ -1573,8 +1569,6 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
|
||||||
|
|
||||||
# Run a pre-build command if one is required...
|
# Run a pre-build command if one is required...
|
||||||
if 'prebuild' in build:
|
if 'prebuild' in build:
|
||||||
output = ''
|
|
||||||
error = ''
|
|
||||||
cmd = build['prebuild']
|
cmd = build['prebuild']
|
||||||
|
|
||||||
# Substitute source library paths into prebuild commands...
|
# Substitute source library paths into prebuild commands...
|
||||||
|
|
|
@ -21,7 +21,6 @@ import sys
|
||||||
import os
|
import os
|
||||||
import traceback
|
import traceback
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import HTMLParser
|
|
||||||
import common
|
import common
|
||||||
from common import BuildException
|
from common import BuildException
|
||||||
from common import VCSException
|
from common import VCSException
|
||||||
|
@ -54,8 +53,6 @@ def main():
|
||||||
print "No such package"
|
print "No such package"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
html_parser = HTMLParser.HTMLParser()
|
|
||||||
|
|
||||||
problems = []
|
problems = []
|
||||||
|
|
||||||
build_dir = 'build'
|
build_dir = 'build'
|
||||||
|
|
|
@ -60,7 +60,6 @@ def main():
|
||||||
|
|
||||||
statsdir = 'stats'
|
statsdir = 'stats'
|
||||||
logsdir = os.path.join(statsdir, 'logs')
|
logsdir = os.path.join(statsdir, 'logs')
|
||||||
logsarchivedir = os.path.join(logsdir, 'archive')
|
|
||||||
datadir = os.path.join(statsdir, 'data')
|
datadir = os.path.join(statsdir, 'data')
|
||||||
if not os.path.exists(statsdir):
|
if not os.path.exists(statsdir):
|
||||||
os.mkdir(statsdir)
|
os.mkdir(statsdir)
|
||||||
|
@ -94,7 +93,7 @@ def main():
|
||||||
os.path.getsize(destpath) != destsize):
|
os.path.getsize(destpath) != destsize):
|
||||||
print "...retrieving " + f
|
print "...retrieving " + f
|
||||||
ftp.get(f, destpath)
|
ftp.get(f, destpath)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
finally:
|
finally:
|
||||||
|
|
|
@ -588,7 +588,6 @@ def make_index(apps, apks, repodir, archive, categories):
|
||||||
addElement('sdkver', str(apk['sdkversion']), doc, apkel)
|
addElement('sdkver', str(apk['sdkversion']), doc, apkel)
|
||||||
if 'added' in apk:
|
if 'added' in apk:
|
||||||
addElement('added', time.strftime('%Y-%m-%d', apk['added']), doc, apkel)
|
addElement('added', time.strftime('%Y-%m-%d', apk['added']), doc, apkel)
|
||||||
perms = ""
|
|
||||||
if app['Requires Root']:
|
if app['Requires Root']:
|
||||||
if 'ACCESS_SUPERUSER' not in apk['permissions']:
|
if 'ACCESS_SUPERUSER' not in apk['permissions']:
|
||||||
apk['permissions'].append('ACCESS_SUPERUSER')
|
apk['permissions'].append('ACCESS_SUPERUSER')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue