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