mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-07 13:58:03 +00:00
fix: remove RPMs after installing RPMs, to guarantee cleanup
This is necessary because the `rpm-ostree install` command lacks any way to exclude "recommended dependency" packages. It installs everything and the kitchen sink. Therefore, installing something will often pull in a bunch of unwanted dependencies. The best we can do with the current situation is to run the removal after the install, so that users can remove those unwanted components manually and can be sure that they're actually removed.
This commit is contained in:
@@ -51,15 +51,6 @@ run_scripts() {
|
||||
}
|
||||
run_scripts "pre"
|
||||
|
||||
# Remove RPMs.
|
||||
get_yaml_array remove_rpms '.rpm.remove[]'
|
||||
if [[ ${#remove_rpms[@]} -gt 0 ]]; then
|
||||
echo "-- Removing RPMs defined in recipe.yml --"
|
||||
echo "Removing: ${remove_rpms[@]}"
|
||||
rpm-ostree override remove "${remove_rpms[@]}"
|
||||
echo "---"
|
||||
fi
|
||||
|
||||
# Install RPMs.
|
||||
get_yaml_array install_rpms '.rpm.install[]'
|
||||
if [[ ${#install_rpms[@]} -gt 0 ]]; then
|
||||
@@ -69,6 +60,15 @@ if [[ ${#install_rpms[@]} -gt 0 ]]; then
|
||||
echo "---"
|
||||
fi
|
||||
|
||||
# Remove RPMs.
|
||||
get_yaml_array remove_rpms '.rpm.remove[]'
|
||||
if [[ ${#remove_rpms[@]} -gt 0 ]]; then
|
||||
echo "-- Removing RPMs defined in recipe.yml --"
|
||||
echo "Removing: ${remove_rpms[@]}"
|
||||
rpm-ostree override remove "${remove_rpms[@]}"
|
||||
echo "---"
|
||||
fi
|
||||
|
||||
# Toggle yafti, which provides the "first boot" experience, https://github.com/ublue-os/yafti.
|
||||
FIRSTBOOT_DATA="/usr/share/ublue-os/firstboot"
|
||||
FIRSTBOOT_LINK="/usr/etc/profile.d/ublue-firstboot.sh"
|
||||
|
||||
Reference in New Issue
Block a user