1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-07 01:40:10 +02:00

build: refactor missing srclibs error reporting for only .yml

This commit is contained in:
Hans-Christoph Steiner 2020-08-24 16:23:13 +02:00
parent bd1f05e370
commit da31120b5a

View File

@ -203,15 +203,12 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
send_dir(lib)
# Copy the metadata file too...
ftp.chdir(posixpath.join(homedir, 'srclibs'))
if os.path.isfile(os.path.join('srclibs', name + '.yml')):
ftp.put(os.path.join('srclibs', name + '.yml'),
name + '.yml')
srclibsfile = os.path.join('srclibs', name + '.yml')
if os.path.isfile(srclibsfile):
ftp.put(srclibsfile, os.path.basename(srclibsfile))
else:
raise BuildException("can not find metadata file for "
"'{name}', please make sure it is "
"present in your 'srclibs' folder."
"(supported format: yml)"
.format(name=name))
raise BuildException(_('cannot find required srclibs: "{path}"')
.format(path=srclibsfile))
# Copy the main app source code
# (no need if it's a srclib)
if (not basesrclib) and os.path.exists(build_dir):