From ccdea798fce51e076d874976db40bd5de7f029f0 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Sun, 27 Oct 2013 14:40:02 +0000 Subject: [PATCH] Don't need legacy disabled build handling everywhere now --- fdroidserver/build.py | 2 +- fdroidserver/common.py | 4 ++-- fdroidserver/scanner.py | 2 +- fdroidserver/update.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fdroidserver/build.py b/fdroidserver/build.py index a2ca3cf8..82b8dc22 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -681,7 +681,7 @@ def trybuild(app, thisbuild, build_dir, output_dir, also_check_dir, srclib_dir, if os.path.exists(dest_also): return False - if thisbuild['commit'].startswith('!') or 'disable' in thisbuild: + if 'disable' in thisbuild: return False print "Building version " + thisbuild['version'] + ' of ' + app['id'] diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 22dc70c3..9732ceb0 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -475,7 +475,7 @@ def parse_metadata(metafile, verbose=False): if parts[2].startswith('!'): # For backwards compatibility, handle old-style disabling, # including attempting to extract the commit from the message - thisbuild['disabled'] = parts[2] + thisbuild['disable'] = parts[2] commit = 'unknown - see disabled' index = parts[2].rfind('at ') if index != -1: @@ -757,7 +757,7 @@ def write_metadata(dest, app, verbose=False): # This defines the preferred order for the build items - as in the # manual, they're roughly in order of application. - keyorder = ['disabled', 'commit', 'subdir', 'submodules', 'init', + keyorder = ['disable', 'commit', 'subdir', 'submodules', 'init', 'oldsdkloc', 'target', 'compilesdk', 'update', 'encoding', 'forceversion', 'forcevercode', 'rm', 'fixtrans', 'fixapos', 'extlibs', 'srclibs', diff --git a/fdroidserver/scanner.py b/fdroidserver/scanner.py index 2b62e213..22874934 100644 --- a/fdroidserver/scanner.py +++ b/fdroidserver/scanner.py @@ -86,7 +86,7 @@ def main(): for thisbuild in app['builds']: - if thisbuild['commit'].startswith('!') or 'disable' in thisbuild: + if 'disable' in thisbuild: print ("..skipping version " + thisbuild['version'] + " - " + thisbuild.get('disable', thisbuild['commit'][1:])) else: diff --git a/fdroidserver/update.py b/fdroidserver/update.py index ef31cae2..ac99b2ac 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -232,7 +232,7 @@ def delete_disabled_builds(apps, apkcache, repodirs): """ for app in apps: for build in app['builds']: - if build['commit'].startswith('!') or 'disable' in build: + if 'disable' in build: apkfilename = app['id'] + '_' + str(build['vercode']) + '.apk' for repodir in repodirs: apkpath = os.path.join(repodir, apkfilename)