The attached patch contains no functional changes. It simply introduces
a few helper functions and slims down main().
def setup_default_config_opts(config_opts):
move the setup of default config_opts to a helper function
def set_config_opts_per_cmdline(config_opts, options):
All of the logic that sets config_opts stuff based on cmdline options
is here.
def do_clean(config_opts, init=0):
Consolidate clean/init handling into one function
def do_run_cmd(config_opts, cmd, raw_chroot=0):
Consolidate chroot/shell handling into one function
def ensure_filetype_srpm(srpms):
Check all cmdline srpm args to ensure they exist and are srpms
def do_rebuild(config_opts, srpms):
rebuild logic.
Please apply.