mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
build: check that metadata is present before creating tmp dirs
Before, `fdroid build` would create some subdirs, then fail when it could not read the metadata via metadata.read_metadata(). This checks before whether there is any metadata available, and warns the user accordingly.
This commit is contained in:
parent
751fd3fb0a
commit
8489047bcf
1 changed files with 9 additions and 0 deletions
|
|
@ -1001,6 +1001,15 @@ def main():
|
|||
global options, config
|
||||
|
||||
options, parser = parse_commandline()
|
||||
|
||||
metadata_files = glob.glob('.fdroid.*[a-z]') # ignore files ending in ~
|
||||
if len(metadata_files) > 1:
|
||||
raise FDroidException("Only one local metadata file allowed! Found: "
|
||||
+ " ".join(metadata_files))
|
||||
|
||||
if not os.path.isdir('metadata') and len(metadata_files) == 0:
|
||||
raise FDroidException("No app metadata found, nothing to process!")
|
||||
|
||||
if not options.appid and not options.all:
|
||||
parser.error("option %s: If you really want to build all the apps, use --all" % "all")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue