diff --git a/src/pylorax/api/cmdline.py b/src/pylorax/api/cmdline.py index 00ef0393..c4f09a9f 100644 --- a/src/pylorax/api/cmdline.py +++ b/src/pylorax/api/cmdline.py @@ -55,6 +55,8 @@ def lorax_composer_parser(): help="Top level temporary directory") parser.add_argument("--proxy", default=None, metavar="PROXY", help="Set proxy for DNF, overrides configuration file setting.") + parser.add_argument("--no-system-repos", action="store_true", default=False, + help="Do not copy over system repos from /etc/yum.repos.d/ at startup") parser.add_argument("BLUEPRINTS", metavar="BLUEPRINTS", help="Path to the blueprints") diff --git a/src/sbin/lorax-composer b/src/sbin/lorax-composer index 8eeee8ee..e68a232b 100755 --- a/src/sbin/lorax-composer +++ b/src/sbin/lorax-composer @@ -203,6 +203,10 @@ if __name__ == '__main__': if opts.proxy: server.config["COMPOSER_CFG"].set("dnf", "proxy", opts.proxy) + # Override using system repos + if opts.no_system_repos: + server.config["COMPOSER_CFG"].set("repos", "use_system_repos", "0") + # Make sure the queue paths are setup correctly, exit on errors errors = make_queue_dirs(server.config["COMPOSER_CFG"], gid) if errors: