From 19c74c3e8d78f7a0beaf8b4ada0c97d1b97013a1 Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Wed, 6 May 2020 13:57:27 +0200 Subject: [PATCH] cli: drop --build-env argument Drop the --build-env command-line argument. It is not used by anything. Furthermore, our manifests now allow embedding build-environments, so there is little reason to continue supporting this. --- docs/osbuild.1.rst | 2 -- osbuild/main_cli.py | 7 ------- osbuild/pipeline.py | 7 ------- 3 files changed, 16 deletions(-) diff --git a/docs/osbuild.1.rst b/docs/osbuild.1.rst index d45630dc..249e2b1a 100644 --- a/docs/osbuild.1.rst +++ b/docs/osbuild.1.rst @@ -37,8 +37,6 @@ The following command-line options are supported. If an option is passed, which is not listed here, **osbuild** will deny startup and exit with an error. -h, --help print usage information and exit immediately ---build-env=PATH json file containing a description of the build - environment --store=DIR directory where intermediary file system trees are stored --sources=PATH json file containing a dictionary of source diff --git a/osbuild/main_cli.py b/osbuild/main_cli.py index 0d778cca..88cfdd84 100644 --- a/osbuild/main_cli.py +++ b/osbuild/main_cli.py @@ -73,8 +73,6 @@ def parse_arguments(sys_argv): parser.add_argument("manifest_path", metavar="MANIFEST", help="json file containing the manifest that should be built, or a '-' to read from stdin") - parser.add_argument("--build-env", metavar="FILE", type=os.path.abspath, - help="json file containing a description of the build environment") parser.add_argument("--store", metavar="DIRECTORY", type=os.path.abspath, default=".osbuild", help="directory where intermediary os trees are stored") @@ -121,11 +119,6 @@ def osbuild_cli(*, sys_argv=[]): pipeline = osbuild.load(pipeline, sources_options) - if args.build_env: - with open(args.build_env) as f: - build_pipeline, runner = osbuild.load_build(json.load(f), sources_options) - pipeline.prepend_build_env(build_pipeline, runner) - secrets = {} if args.secrets: with open(args.secrets) as f: diff --git a/osbuild/pipeline.py b/osbuild/pipeline.py index 94cc30c4..4473e231 100644 --- a/osbuild/pipeline.py +++ b/osbuild/pipeline.py @@ -185,13 +185,6 @@ class Pipeline: build = self.build.tree_id if self.build else None self.assembler = Assembler(name, build, self.tree_id, options or {}) - def prepend_build_env(self, build_pipeline, runner): - pipeline = self - while pipeline.build: - pipeline = pipeline.build - pipeline.build = build_pipeline - pipeline.runner = runner - def description(self, *, with_id=False): description = {} if self.build: