toolkit/iso/py/sync-from-peridot

60 lines
1.8 KiB
Text
Raw Normal View History

2022-05-22 06:20:15 +00:00
#!/usr/bin/env python3
2022-05-26 04:39:26 +00:00
# This script can be called to do single syncs or full on syncs.
2022-05-22 06:20:15 +00:00
import argparse
2022-05-26 04:39:26 +00:00
from common import *
2022-05-22 06:20:15 +00:00
from util import Checks
from util import RepoSync
2022-05-26 04:39:26 +00:00
#rlvars = rldict['9']
#r = Checks(rlvars, config['arch'])
#r.check_valid_arch()
# 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")
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')
2022-06-10 23:05:44 +00:00
parser.add_argument('--hashed', action='store_true')
2022-05-26 04:39:26 +00:00
parser.add_argument('--dry-run', action='store_true')
parser.add_argument('--full-run', action='store_true')
parser.add_argument('--no-fail', action='store_true')
# 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)
# Parse them
results = parser.parse_args()
rlvars = rldict[results.release]
2022-05-22 06:20:15 +00:00
r = Checks(rlvars, config['arch'])
r.check_valid_arch()
2022-05-26 04:39:26 +00:00
# Send them and do whatever I guess
a = RepoSync(
rlvars,
config,
major=results.release,
repo=results.repo,
arch=results.arch,
ignore_debug=results.ignore_debug,
ignore_source=results.ignore_source,
repoclosure=results.repoclosure,
skip_all=results.skip_all,
2022-06-10 23:05:44 +00:00
hashed=results.hashed,
2022-05-26 04:39:26 +00:00
parallel=results.simple,
dryrun=results.dry_run,
fullrun=results.full_run,
nofail=results.no_fail,
logger=results.logger
)
2022-05-22 06:20:15 +00:00
a.run()