Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
fix: remove RPMs after installing RPMs, to guarantee cleanup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Arcitec authored and xynydev committed May 24, 2023
1 parent ac40e75 commit 3920ba9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 3920ba9

Please sign in to comment.