Skip to content

Commit

Permalink
Merge pull request ostreedev#503 from cgwalters/deploy-preserve-kargs
Browse files Browse the repository at this point in the history
deploy: Don't overwrite kargs by default
  • Loading branch information
cgwalters authored Aug 2, 2023
2 parents ea853c0 + 77f04e7 commit 0da57ef
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/src/container/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ pub async fn deploy(
let target_imgref = options.target_imgref.unwrap_or(imgref);
origin.set_string("origin", ORIGIN_CONTAINER, &target_imgref.to_string());

let opts = ostree::SysrootDeployTreeOpts {
override_kernel_argv: options.kargs,
..Default::default()
};

if sysroot.booted_deployment().is_some() {
let opts = ostree::SysrootDeployTreeOpts {
override_kernel_argv: options.kargs,
..Default::default()
};
sysroot.stage_tree_with_options(
Some(stateroot),
commit,
Expand All @@ -95,12 +96,12 @@ pub async fn deploy(
cancellable,
)?;
} else {
let deployment = &sysroot.deploy_tree(
let deployment = &sysroot.deploy_tree_with_options(
Some(stateroot),
commit,
Some(&origin),
merge_deployment.as_ref(),
options.kargs.unwrap_or_default(),
Some(&opts),
cancellable,
)?;
let flags = ostree::SysrootSimpleWriteDeploymentFlags::NONE;
Expand Down

0 comments on commit 0da57ef

Please sign in to comment.