osbuild: remove --sit
It's not really useful because it's at the wrong place, after a stage has torn down all mounts. It also makes the code more complex for too little benefit.
This commit is contained in:
parent
7ee6571640
commit
ce0b01e93d
3 changed files with 9 additions and 29 deletions
20
osbuild.py
20
osbuild.py
|
|
@ -71,7 +71,7 @@ class BuildRoot:
|
|||
*[f"--bind-ro={src}:{dest}" for src, dest in readonly_binds]
|
||||
] + argv, *args, **kwargs)
|
||||
|
||||
def run_stage(self, stage, options={}, input_dir=None, sit=False):
|
||||
def run_stage(self, stage, options={}, input_dir=None):
|
||||
options = {
|
||||
**options,
|
||||
"tree": "/tmp/tree",
|
||||
|
|
@ -86,18 +86,13 @@ class BuildRoot:
|
|||
if input_dir:
|
||||
options["input_dir"] = "/tmp/input"
|
||||
robinds.append((input_dir, "/tmp/input"))
|
||||
|
||||
argv = ["/tmp/run-stage"]
|
||||
if sit:
|
||||
argv.append("--sit")
|
||||
argv.append("/tmp/stage")
|
||||
|
||||
try:
|
||||
self.run(argv, readonly_binds=robinds, input=json.dumps(options), encoding="utf-8", check=True)
|
||||
self.run(["/tmp/run-stage", "/tmp/stage"], readonly_binds=robinds,
|
||||
input=json.dumps(options), encoding="utf-8", check=True)
|
||||
except subprocess.CalledProcessError as error:
|
||||
raise StageFailed(stage, error.returncode)
|
||||
|
||||
def run_assembler(self, name, options, output_dir=None, sit=False):
|
||||
def run_assembler(self, name, options, output_dir=None):
|
||||
if output_dir and not os.path.exists(output_dir):
|
||||
os.makedirs(output_dir)
|
||||
|
||||
|
|
@ -118,13 +113,8 @@ class BuildRoot:
|
|||
options["output_dir"] = "/tmp/output"
|
||||
binds.append((output_dir, "/tmp/output"))
|
||||
|
||||
argv = ["/tmp/run-stage"]
|
||||
if sit:
|
||||
argv.append("--sit")
|
||||
argv.append("/tmp/stage")
|
||||
|
||||
try:
|
||||
self.run(argv, binds=binds, readonly_binds=robinds, input=json.dumps(options), encoding="utf-8", check=True)
|
||||
self.run(["/tmp/run-stage", "/tmp/stage"], binds=binds, readonly_binds=robinds, input=json.dumps(options), encoding="utf-8", check=True)
|
||||
except subprocess.CalledProcessError as error:
|
||||
raise StageFailed(stage, error.returncode)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue