mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 15:32:30 +03:00
Don't try and xref-check descriptions on the build server
This commit is contained in:
parent
50c1afdded
commit
a68778c5a1
2 changed files with 16 additions and 15 deletions
|
@ -467,7 +467,7 @@ def parse_commandline():
|
||||||
help="Use build server")
|
help="Use build server")
|
||||||
parser.add_option("--resetserver", action="store_true", default=False,
|
parser.add_option("--resetserver", action="store_true", default=False,
|
||||||
help="Reset and create a brand new build server, even if the existing one appears to be ok.")
|
help="Reset and create a brand new build server, even if the existing one appears to be ok.")
|
||||||
parser.add_option("--on-server", action="store_true", default=False,
|
parser.add_option("--on-server", dest="onserver", action="store_true", default=False,
|
||||||
help="Specify that we're running on the build server")
|
help="Specify that we're running on the build server")
|
||||||
parser.add_option("-f", "--force", action="store_true", default=False,
|
parser.add_option("-f", "--force", action="store_true", default=False,
|
||||||
help="Force build of disabled apps, and carries on regardless of scan problems. Only allowed in test mode.")
|
help="Force build of disabled apps, and carries on regardless of scan problems. Only allowed in test mode.")
|
||||||
|
@ -517,7 +517,7 @@ def main():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Get all apps...
|
# Get all apps...
|
||||||
apps = common.read_metadata(options.verbose)
|
apps = common.read_metadata(options.verbose, xref=not options.onserver)
|
||||||
|
|
||||||
log_dir = 'logs'
|
log_dir = 'logs'
|
||||||
if not os.path.isdir(log_dir):
|
if not os.path.isdir(log_dir):
|
||||||
|
|
|
@ -607,26 +607,27 @@ def write_metadata(dest, app):
|
||||||
|
|
||||||
# Read all metadata. Returns a list of 'app' objects (which are dictionaries as
|
# Read all metadata. Returns a list of 'app' objects (which are dictionaries as
|
||||||
# returned by the parse_metadata function.
|
# returned by the parse_metadata function.
|
||||||
def read_metadata(verbose=False):
|
def read_metadata(verbose=False, xref=True):
|
||||||
apps = []
|
apps = []
|
||||||
for metafile in sorted(glob.glob(os.path.join('metadata', '*.txt'))):
|
for metafile in sorted(glob.glob(os.path.join('metadata', '*.txt'))):
|
||||||
if verbose:
|
if verbose:
|
||||||
print "Reading " + metafile
|
print "Reading " + metafile
|
||||||
apps.append(parse_metadata(metafile, verbose=verbose))
|
apps.append(parse_metadata(metafile, verbose=verbose))
|
||||||
|
|
||||||
# Parse all descriptions at load time, just to ensure cross-referencing
|
if xref:
|
||||||
# errors are caught early rather than when they hit the build server.
|
# Parse all descriptions at load time, just to ensure cross-referencing
|
||||||
def linkres(link):
|
# errors are caught early rather than when they hit the build server.
|
||||||
|
def linkres(link):
|
||||||
|
for app in apps:
|
||||||
|
if app['id'] == link:
|
||||||
|
return ("fdroid.app:" + link, "Dummy name - don't know yet")
|
||||||
|
raise MetaDataException("Cannot resolve app id " + link)
|
||||||
for app in apps:
|
for app in apps:
|
||||||
if app['id'] == link:
|
try:
|
||||||
return ("fdroid.app:" + link, "Dummy name - don't know yet")
|
description_html(app['Description'], linkres)
|
||||||
raise MetaDataException("Cannot resolve app id " + link)
|
except Exception, e:
|
||||||
for app in apps:
|
raise MetaDataException("Problem with description of " + app['id'] +
|
||||||
try:
|
" - " + str(e))
|
||||||
description_html(app['Description'], linkres)
|
|
||||||
except Exception, e:
|
|
||||||
raise MetaDataException("Problem with description of " + app['id'] +
|
|
||||||
" - " + str(e))
|
|
||||||
|
|
||||||
return apps
|
return apps
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue