[PATCH] Provide ways in kickstart to skip kernel and bootloader (#1074522).
Chris Lumens
clumens at redhat.com
Fri Mar 14 19:20:13 UTC 2014
This patch (along with those in pykickstart and blivet) allows for a kickstart
file to do the following:
(1) Prevent any kernel package from being installed by putting "-kernel" in the
%packages section.
(2) Prevent any bootloader package from being installed (and therefore, any
bootloader config from being written) by putting "bootloader --disabled" in
the command section.
---
anaconda.spec.in | 4 ++--
pyanaconda/install.py | 4 +++-
pyanaconda/packaging/__init__.py | 3 +++
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 61ae731..53e2339 100755
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -21,7 +21,7 @@ Source0: %{name}-%{version}.tar.bz2
# Also update in AM_GNU_GETTEXT_VERSION in configure.ac
%define gettextver 0.18.3
%define intltoolver 0.31.2-3
-%define pykickstartver 1.99.49
+%define pykickstartver 1.99.50
%define yumver 3.4.3-91
%define dnfver 0.4.15
%define partedver 1.8.1
@@ -91,7 +91,7 @@ The anaconda package is a metapackage for the Anaconda installer.
%package core
Summary: Core of the Anaconda installer
Requires: dnf >= %{dnfver}
-Requires: python-blivet >= 0.44
+Requires: python-blivet >= 0.45
Requires: python-meh >= %{mehver}
Requires: libreport-anaconda >= 2.0.21-1
Requires: libselinux-python
diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index 1c1ece1..ffaeab2 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -156,6 +156,8 @@ def doInstall(storage, payload, ksdata, instClass):
# system is bootable and configurable, and some other packages in order
# to finish setting up the system.
packages = storage.packages + ["authconfig", "firewalld"] + ksdata.realm.packages
+ if not ksdata.bootloader.disabled:
+ packages += storage.bootloader.packages
# don't try to install packages from the install class' ignored list
packages = [p for p in packages if p not in instClass.ignoredPackages]
@@ -169,7 +171,7 @@ def doInstall(storage, payload, ksdata, instClass):
payload.postInstall()
# Do bootloader.
- if not flags.flags.dirInstall:
+ if not flags.flags.dirInstall and not ksdata.bootloader.disabled:
with progress_report(_("Installing bootloader")):
writeBootLoader(storage, payload, instClass, ksdata)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index 99952d7..7790ccc 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -699,6 +699,9 @@ class PackagePayload(Payload):
@property
def kernelPackages(self):
+ if "kernel" in self.data.packages.excludedList:
+ return []
+
kernels = ["kernel"]
if isys.isPaeAvailable():
--
1.8.3.1
More information about the anaconda-patches
mailing list