From 78ef26571f36f1ad29030f19357862acbf538acf Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 27 Oct 2014 18:12:48 -0400 Subject: [PATCH] Treat kernel and kernel-core as identical in terms of --make-default Resolves: rhbz#1141414 Signed-off-by: Peter Jones --- ...-kernel-core-as-identical-in-terms-o.patch | 39 +++++++++++++++++++ grubby.spec | 7 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 0001-Treat-kernel-and-kernel-core-as-identical-in-terms-o.patch diff --git a/0001-Treat-kernel-and-kernel-core-as-identical-in-terms-o.patch b/0001-Treat-kernel-and-kernel-core-as-identical-in-terms-o.patch new file mode 100644 index 0000000..e959dd4 --- /dev/null +++ b/0001-Treat-kernel-and-kernel-core-as-identical-in-terms-o.patch @@ -0,0 +1,39 @@ +From 15d36a8f27c5b14b290da99c4be8880bc35dc41b Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 27 Oct 2014 18:10:00 -0400 +Subject: [PATCH] Treat kernel and kernel-core as identical in terms of + --make-default + +Depending on which kernel version, we'll either get kernel or +kernel-core as --package. Since we're unlikely to call something +kernel-core-core, just treat them the same. + +Resolves: rhbz#1141414 + +Signed-off-by: Peter Jones +--- + new-kernel-pkg | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/new-kernel-pkg b/new-kernel-pkg +index 70f6118..9f3b192 100755 +--- a/new-kernel-pkg ++++ b/new-kernel-pkg +@@ -797,9 +797,11 @@ if [ -n "$dracut" -o -n "$adddracutargs" ]; then + fi + + # set this as the default if we have the package and it matches +-if [ "$mode" == "--install" -a "$UPDATEDEFAULT" == "yes" -a -n "$package" -a -n "$DEFAULTKERNEL" -a "$package" == "$DEFAULTKERNEL" ]; then +- makedefault="--make-default" +- [ -n "$verbose" ] && echo "making it the default based on config" ++if [ "$mode" == "--install" -a "$UPDATEDEFAULT" == "yes" -a -n "$package" -a -n "$DEFAULTKERNEL" ]; then ++ if [ "$package" == "$DEFAULTKERNEL" -o "${package}-core" == "$DEFAULTKERNEL" ]; then ++ makedefault="--make-default" ++ [ -n "$verbose" ] && echo "making it the default based on config" ++ fi + fi + + if [ "$moddep" == "make" ]; then +-- +1.9.3 + diff --git a/grubby.spec b/grubby.spec index f95738a..0d84113 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.35 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Command line tool for updating bootloader configs Group: System Environment/Base License: GPLv2+ @@ -19,6 +19,7 @@ Patch0007: 0007-Always-error-check-getLineByType.patch Patch0008: 0008-Add-devtree-support-to-extlinux-1088933.patch Patch0009: 0009-add-support-for-devicetree-directories-for-use-on-ar.patch Patch0010: 0010-cleanup-dtb-handling-to-work-in-the-supported-usecas.patch +Patch0011: 0001-Treat-kernel-and-kernel-core-as-identical-in-terms-o.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pkgconfig glib2-devel popt-devel @@ -88,6 +89,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Oct 27 2014 Peter Jones - 8.35-8 +- Treat kernel and kernel-core as identical in terms of --make-default + Resolves: rhbz#1141414 + * Thu Oct 16 2014 Peter Jones - 8.35-7 - Revert "debug" image creation for now Resolves: rhbz#1153410