Skip to content

Commit

Permalink
override: Honor --install in container case too
Browse files Browse the repository at this point in the history
Closes: coreos#4192
  • Loading branch information
cgwalters committed Dec 8, 2022
1 parent 534d02f commit fb97c48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/test-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,15 @@ rpm-ostree override replace --experimental --from repo=fedora-coreos-pool \

rpm -q afterburn-5.2.0-4.fc36.x86_64 afterburn-dracut-5.2.0-4.fc36.x86_64

# test repo override by pkgname
rpm-ostree override replace --experimental \
# test repo override by pkgname, and also test --install
if rpm -q strace; then
echo "strace should not be installed"; exit 1
fi
rpm-ostree override replace --install strace --experimental \
--from repo=copr:copr.fedorainfracloud.org:group_CoreOS:continuous \
afterburn \
afterburn-dracut
rpm -q strace

# the continuous build's version has the git rev, prefixed with g
rpm -q afterburn | grep g
Expand Down
1 change: 1 addition & 0 deletions src/app/rpmostree-override-builtins.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ handle_override (RPMOSTreeSysroot *sysroot_proxy, RpmOstreeCommandInvocation *in
CXX_TRY_VAR (pkgs, rpmostreecxx::stage_container_rpm_raw_fds (fds), error);
treefile->add_packages_override_replace_local (pkgs);
}
treefile->add_packages (util::rust_stringvec_from_strv (install_pkgs), true);
treefile->add_packages_override_remove (util::rust_stringvec_from_strv (override_remove));
return rpmostree_container_rebuild (*treefile, cancellable, error);
}
Expand Down

0 comments on commit fb97c48

Please sign in to comment.