Commit d671ff80 authored by Luca Giambonini's avatar Luca Giambonini

sync latest changes on the check function

parent 2c264530
......@@ -460,11 +460,16 @@ def do_check_upload(options, dbname, arch, args):
status_success()
return 0
# We always run all checks, no matter what each individual
# check returns, and store the final result here. This will
# be set to False if at least one check does not pass.
passed = True
pkgs = missingSignature(args)
if pkgs:
status_warning()
print('Missing signature for the following packages: %s' % str(pkgs))
return False
passed = False
if options.dbname != 'lib32':
lib32_packages = checkLib32Package(CHAKRA_REPO, arch, args)
......@@ -473,17 +478,19 @@ def do_check_upload(options, dbname, arch, args):
status_warning()
print('The following lib32 packages exist, so they should be updated as soon '
'as possible if not done already:', lib32_packages)
return False
passed = False
dups = checkDuplicates(CHAKRA_REPO, arch, options.dbname, args)
if dups:
status_warning()
print('The following packages already exist on the target repo: %s. Please verify '
'you have updated the pkgver or pkgrel correctly.' % dups)
return False
passed = False
status_success()
return True
if passed:
status_success()
return passed
#decorate(traceLog())
def do_recreate_db(options, dbname, arch):
......@@ -540,7 +547,8 @@ def main(ret):
do_unlock_db(options, options.dbname, options.arch)
elif options.mode == 'repo-check-upload':
do_check_upload(options, options.dbname, options.arch, args)
if not do_check_upload(options, options.dbname, options.arch, args):
sys.exit(1)
elif options.mode == 'repo-recreate':
do_recreate_db(options, options.dbname, options.arch)
......@@ -560,4 +568,4 @@ if __name__ == '__main__':
except (SystemExit,):
raise
except (Exception,) as exc:
exitStatus = 1
\ No newline at end of file
exitStatus = 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment