mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 15:13:27 +02:00
Translate disabled commit to proper disabled
This commit is contained in:
parent
327e472169
commit
945f99e4ca
@ -472,7 +472,19 @@ def parse_metadata(metafile, verbose=False):
|
||||
testvercode = int(thisbuild['vercode'])
|
||||
except:
|
||||
raise MetaDataException("Invalid version code for build in " + metafile.name)
|
||||
thisbuild['commit'] = parts[2]
|
||||
if parts[2].startswith('!'):
|
||||
# For backwards compatibility, handle old-style disabling,
|
||||
# including attempting to extract the commit from the message
|
||||
thisbuild['disabled'] = parts[2]
|
||||
commit = 'unknown - see disabled'
|
||||
index = parts[2].rfind('at ')
|
||||
if index != -1:
|
||||
commit = parts[2][index+3:]
|
||||
if commit.endswith(')'):
|
||||
commit = commit[:-1]
|
||||
thisbuild['commit'] = commit
|
||||
else:
|
||||
thisbuild['commit'] = parts[2]
|
||||
for p in parts[3:]:
|
||||
pk, pv = p.split('=', 1)
|
||||
thisbuild[pk.strip()] = pv
|
||||
|
Loading…
Reference in New Issue
Block a user