Commit d671ff80 authored by AlmAck's avatar AlmAck
Browse files

sync latest changes on the check function

parent 2c264530
......@@ -460,11 +460,16 @@ def do_check_upload(options, dbname, arch, args):
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:
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):
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:
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
return True
if passed:
return passed
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):
elif options.mode == 'repo-recreate':
do_recreate_db(options, options.dbname, options.arch)
......@@ -560,4 +568,4 @@ if __name__ == '__main__':
except (SystemExit,):
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