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