Harald Hoyer 02dec6
From 48c283a29638e2c1e24cf282e673ddf8525b4199 Mon Sep 17 00:00:00 2001
Harald Hoyer 02dec6
From: Lukas Nykryn <lnykryn@redhat.com>
Harald Hoyer 02dec6
Date: Thu, 25 Oct 2018 15:30:36 +0200
Harald Hoyer 02dec6
Subject: [PATCH] dracut.install: call dracut with --force
Harald Hoyer 02dec6
Harald Hoyer 02dec6
The kernel-install is called even if you run make install.
Harald Hoyer 02dec6
Since we don't call dracut with -f a second make install will fail
Harald Hoyer 02dec6
because initrd with same version is already there.
Harald Hoyer 02dec6
This makes kernel developers feel miserable.
Harald Hoyer 02dec6
Harald Hoyer 02dec6
https://bugzilla.redhat.com/show_bug.cgi?id=1642402
Harald Hoyer 02dec6
---
Harald Hoyer 02dec6
 50-dracut.install        | 2 +-
Harald Hoyer 02dec6
 51-dracut-rescue.install | 2 +-
Harald Hoyer 02dec6
 2 files changed, 2 insertions(+), 2 deletions(-)
Harald Hoyer 02dec6
Harald Hoyer 02dec6
diff --git a/50-dracut.install b/50-dracut.install
Harald Hoyer 02dec6
index 64e3549f..bbb73442 100755
Harald Hoyer 02dec6
--- a/50-dracut.install
Harald Hoyer 02dec6
+++ b/50-dracut.install
Harald Hoyer 02dec6
@@ -49,7 +49,7 @@ case "$COMMAND" in
Harald Hoyer 02dec6
                 break
Harald Hoyer 02dec6
             fi
Harald Hoyer 02dec6
         done
Harald Hoyer 02dec6
-	dracut ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
Harald Hoyer 02dec6
+	dracut -f ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
Harald Hoyer 02dec6
         ret=$?
Harald Hoyer 02dec6
 	;;
Harald Hoyer 02dec6
     remove)
Harald Hoyer 02dec6
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
Harald Hoyer 02dec6
index 6ddafdb6..ef8afac1 100755
Harald Hoyer 02dec6
--- a/51-dracut-rescue.install
Harald Hoyer 02dec6
+++ b/51-dracut-rescue.install
Harald Hoyer 02dec6
@@ -98,7 +98,7 @@ case "$COMMAND" in
Harald Hoyer 02dec6
         fi
Harald Hoyer 02dec6
 
Harald Hoyer 02dec6
         if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then
Harald Hoyer 02dec6
-            dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
Harald Hoyer 02dec6
+            dracut -f --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
Harald Hoyer 02dec6
             ((ret+=$?))
Harald Hoyer 02dec6
         fi
Harald Hoyer 02dec6
 
Harald Hoyer 02dec6