[dracut] - fixed empty output file argument handling: "dracut '' <kernel version>"

Harald Hoyer harald at fedoraproject.org
Tue Mar 29 08:57:40 UTC 2011


commit 27e50d6ce76636aadaf5e8a98d6cb54bf821a76d
Author: Harald Hoyer <harald at redhat.com>
Date:   Tue Mar 29 10:55:29 2011 +0200

    - fixed empty output file argument handling:
      "dracut '' <kernel version>"

 ...t-skip-zero-length-string-outfile-argumen.patch |   32 ++++++++++++++++++++
 dracut.spec                                        |    4 +-
 2 files changed, 34 insertions(+), 2 deletions(-)
---
diff --git a/0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch b/0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch
new file mode 100644
index 0000000..6fd8282
--- /dev/null
+++ b/0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch
@@ -0,0 +1,32 @@
+From dbf381f7fb369bd6336272847da882d8ef0e5a30 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe at aidecoe.name>
+Date: Tue, 29 Mar 2011 01:21:56 +0200
+Subject: [PATCH 3/3] dracut: don't skip zero-length string outfile argument
+
+When '' was passed as outfile, dracut generated name with following
+pattern:
+
+  /boot/initramfs-$kernel
+
+With commit 486a1b9324d6fc7bc534d8147d64b8b259692c46 dracut skips ''
+argument.
+---
+ dracut |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/dracut b/dracut
+index 6b67dc0..c16b222 100755
+--- a/dracut
++++ b/dracut
+@@ -237,7 +237,7 @@ while (($# > 0)); do
+                        ;;
+         -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;;
+         *) 
+-            if ! [[ $outfile ]]; then
++            if ! [[ ${outfile+x} ]]; then
+                 outfile=$1
+             elif [[ $kernel = "unset" ]]; then
+                 kernel=$1
+-- 
+1.7.3.4
+
diff --git a/dracut.spec b/dracut.spec
index ac56e1f..9bf1137 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -20,7 +20,7 @@ Group: System/Base
 License: GPLv2+ 
 URL: https://dracut.wiki.kernel.org/
 Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-009.tar.bz2
-Patch1: 0001-dracut-don-t-skip-zero-length-string-outfile-argumen.patch
+Patch3: 0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch
 
 BuildArch: noarch
 
@@ -154,7 +154,7 @@ This package contains tools to assemble the local initrd and host configuration.
 
 %prep
 %setup -q -n %{name}-%{version}%{?dashgittag}
-%patch1 -p1
+%patch3 -p1
 
 %build
 make WITH_SWITCH_ROOT=0%{?with_switch_root}


More information about the scm-commits mailing list