Skip to content

Commit

Permalink
kernel-install: fix uki-copy deinstall
Browse files Browse the repository at this point in the history
For "kernel-install remove ..." only the kernel version is passed, not
the kernel image.  So auto-detecting KERNEL_INSTALL_IMAGE_TYPE and
setting KERNEL_INSTALL_LAYOUT does not work for uninstall.

The 90-uki-copy.install plugin must consider this and *not* exit early
for the "remove" command, otherwise $BOOT_ROOT will be filled with stale
kernel images.

Signed-off-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
kraxel authored and yuwata committed Mar 20, 2024
1 parent cd40efc commit 3037616
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kernel-install/90-uki-copy.install
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ KERNEL_VERSION="${2:?}"
ENTRY_DIR_ABS="$3"
KERNEL_IMAGE="$4"

[ "$KERNEL_INSTALL_LAYOUT" = "uki" ] || exit 0

ENTRY_TOKEN="$KERNEL_INSTALL_ENTRY_TOKEN"
BOOT_ROOT="$KERNEL_INSTALL_BOOT_ROOT"

Expand All @@ -48,6 +46,8 @@ case "$COMMAND" in
;;
esac

[ "$KERNEL_INSTALL_LAYOUT" = "uki" ] || exit 0

if ! [ -d "$UKI_DIR" ]; then
[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "creating $UKI_DIR"
mkdir -p "$UKI_DIR"
Expand Down

0 comments on commit 3037616

Please sign in to comment.