Skip to content

Commit

Permalink
refactor: better "uninstall cliwrap"
Browse files Browse the repository at this point in the history
  • Loading branch information
bsherman committed Nov 1, 2024
1 parent 5bc49da commit f68cc80
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@

set -ouex pipefail

export RPMOSTREE_CLIWRAP_SKIP=1
# there is no 'rpm-ostree cliwrap uninstall-from-root', but this is close enough. See:
# https://github.com/coreos/rpm-ostree/blob/6d2548ddb2bfa8f4e9bafe5c6e717cf9531d8001/rust/src/cliwrap.rs#L25-L32
if [ -d /usr/libexec/rpm-ostree/wrapped ]; then
# binaries which could be created if they did not exist thus may not be in wrapped dir
rm -f \
/usr/bin/yum \
/usr/bin/dnf \
/usr/bin/kernel-install
# binaries which were wrapped
mv -f /usr/libexec/rpm-ostree/* /usr/bin
rm -fr /usr/libexec/rpm-ostree
fi

rpm-ostree install dnf5

case "${IMAGE}" in
Expand Down

0 comments on commit f68cc80

Please sign in to comment.