2022-06-10 23:05:44 +00:00
|
|
|
# This script can be called to do single syncs or full on syncs.
|
|
|
|
|
|
|
|
import argparse
|
2022-06-17 03:31:33 +00:00
|
|
|
from empanadas.common import *
|
|
|
|
from empanadas.util import Checks
|
|
|
|
from empanadas.util import SigRepoSync
|
2022-06-10 23:05:44 +00:00
|
|
|
|
|
|
|
#rlvars = rldict['9']
|
|
|
|
#r = Checks(rlvars, config['arch'])
|
2022-10-20 22:27:30 +00:00
|
|
|
#r.check_validity()
|
2022-06-10 23:05:44 +00:00
|
|
|
|
|
|
|
# Start up the parser baby
|
|
|
|
parser = argparse.ArgumentParser(description="Peridot Sync and Compose")
|
|
|
|
|
|
|
|
# All of our options
|
|
|
|
parser.add_argument('--release', type=str, help="Major Release Version", required=True)
|
|
|
|
parser.add_argument('--repo', type=str, help="Repository name")
|
2022-07-20 23:17:19 +00:00
|
|
|
parser.add_argument('--sig', type=str, help="SIG name", required=True)
|
2022-06-10 23:05:44 +00:00
|
|
|
parser.add_argument('--arch', type=str, help="Architecture")
|
|
|
|
parser.add_argument('--ignore-debug', action='store_true')
|
|
|
|
parser.add_argument('--ignore-source', action='store_true')
|
|
|
|
parser.add_argument('--repoclosure', action='store_true')
|
|
|
|
parser.add_argument('--skip-all', action='store_true')
|
|
|
|
parser.add_argument('--hashed', action='store_true')
|
|
|
|
parser.add_argument('--dry-run', action='store_true')
|
|
|
|
parser.add_argument('--full-run', action='store_true')
|
|
|
|
parser.add_argument('--no-fail', action='store_true')
|
2022-07-20 23:17:19 +00:00
|
|
|
parser.add_argument('--refresh-extra-files', action='store_true')
|
2022-06-10 23:05:44 +00:00
|
|
|
# I am aware this is confusing, I want podman to be the default option
|
|
|
|
parser.add_argument('--simple', action='store_false')
|
|
|
|
parser.add_argument('--logger', type=str)
|
2022-07-28 23:00:40 +00:00
|
|
|
parser.add_argument('--disable-gpg-check', action='store_false')
|
|
|
|
parser.add_argument('--disable-repo-gpg-check', action='store_false')
|
2022-08-04 06:07:47 +00:00
|
|
|
parser.add_argument('--clean-old-packages', action='store_true')
|
2022-06-10 23:05:44 +00:00
|
|
|
|
|
|
|
# Parse them
|
|
|
|
results = parser.parse_args()
|
|
|
|
|
|
|
|
rlvars = rldict[results.release]
|
|
|
|
sigvars = sigdict[results.sig][results.release]
|
|
|
|
r = Checks(rlvars, config['arch'])
|
2022-10-20 22:27:30 +00:00
|
|
|
r.check_validity()
|
2022-06-10 23:05:44 +00:00
|
|
|
|
|
|
|
# Send them and do whatever I guess
|
|
|
|
a = SigRepoSync(
|
|
|
|
rlvars,
|
|
|
|
config,
|
|
|
|
sigvars,
|
|
|
|
major=results.release,
|
|
|
|
repo=results.repo,
|
|
|
|
arch=results.arch,
|
|
|
|
ignore_source=results.ignore_source,
|
2022-07-20 23:17:19 +00:00
|
|
|
ignore_debug=results.ignore_debug,
|
2022-06-10 23:05:44 +00:00
|
|
|
repoclosure=results.repoclosure,
|
|
|
|
skip_all=results.skip_all,
|
|
|
|
hashed=results.hashed,
|
|
|
|
parallel=results.simple,
|
|
|
|
dryrun=results.dry_run,
|
|
|
|
fullrun=results.full_run,
|
|
|
|
nofail=results.no_fail,
|
2022-07-25 07:46:34 +00:00
|
|
|
refresh_extra_files=results.refresh_extra_files,
|
2022-07-28 23:00:40 +00:00
|
|
|
logger=results.logger,
|
|
|
|
gpg_check=results.disable_gpg_check,
|
|
|
|
repo_gpg_check=results.disable_repo_gpg_check,
|
2022-08-04 06:07:47 +00:00
|
|
|
reposync_clean_old=results.clean_old_packages,
|
2022-06-10 23:05:44 +00:00
|
|
|
)
|
|
|
|
|
2022-06-17 03:31:33 +00:00
|
|
|
|
|
|
|
def run():
|
|
|
|
a.run()
|