Remove obsolete patch

The patch was already upstreamed.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2019-03-30 21:16:33 +01:00
parent 4c476827ec
commit 32d524791c
Signed by: davidlt
GPG Key ID: 7108702C938B13C1
1 changed files with 0 additions and 73 deletions

View File

@ -1,73 +0,0 @@
diff --git a/appcreate/appliance.py b/appcreate/appliance.py
index 9f22ea2..ba0e85d 100644
--- a/appcreate/appliance.py
+++ b/appcreate/appliance.py
@@ -165,22 +165,29 @@ class ApplianceImageCreator(ImageCreator):
packages = kickstart.get_packages(self.ks)
# make this the default
partition_layout = 'msdos'
- # check for extlinux in kickstart then grub2 and falling back to grub
- if hasattr(self.ks.handler.bootloader, "extlinux"):
- if 'syslinux-extlinux' in packages:
- self.bootloader = 'extlinux'
- elif 'extlinux-bootloader' in packages:
- self.bootloader = 'extlinux-bootloader'
+ if (not hasattr(self.ks.handler.bootloader, "disabled")) or \
+ (hasattr(self.ks.handler.bootloader, "disabled") and self.ks.handler.bootloader.disabled is False):
+ # check for extlinux in kickstart then grub2 and falling back to grub
+ if hasattr(self.ks.handler.bootloader, "extlinux"):
+ if 'syslinux-extlinux' in packages:
+ self.bootloader = 'extlinux'
+ elif 'extlinux-bootloader' in packages:
+ self.bootloader = 'extlinux-bootloader'
+ else:
+ logging.warning("WARNING! syslinux-extlinux package not found.")
else:
- logging.warning("WARNING! syslinux-extlinux package not found.")
+ if 'grub2' in packages:
+ self.bootloader = 'grub2'
+ partition_layout = 'gpt'
+ elif 'grub' in packages:
+ self.bootloader = 'grub'
+ else:
+ logging.warning("WARNING! grub package not found.")
else:
- if 'grub2' in packages:
- self.bootloader = 'grub2'
- partition_layout = 'gpt'
- elif 'grub' in packages:
- self.bootloader = 'grub'
- else:
- logging.warning("WARNING! grub package not found.")
+ # user explicitly disabled bootloader (i.e. not part of the image)
+ if hasattr(self.ks.handler.clearpart, "disklabel"):
+ logging.debug("Using user set default disk label: {}".format(self.ks.handler.clearpart.disklabel))
+ partition_layout = self.ks.handler.clearpart.disklabel
self.__instloop = PartitionedMount(self.__disks,
self._instroot,
@@ -507,9 +514,12 @@ class ApplianceImageCreator(ImageCreator):
def _create_bootconfig(self):
logging.debug("Writing kickstart file.")
self._write_kickstart()
- # For EC2 lets always make a grub Legacy config file
- logging.debug("Writing GRUB Legacy config.")
- self._create_grub_config()
+ # For EC2 lets make a grub Legacy config file
+ # (only if bootloader is enabled)
+ if (hasattr(self.ks.handler.bootloader, "disabled") and self.ks.handler.bootloader.disabled is False) and \
+ (hasattr(self.ks.handler.bootloader, "location") and self.ks.handler.bootloader.location != "none"):
+ logging.debug("Writing GRUB Legacy config.")
+ self._create_grub_config()
if self.bootloader == 'grub2':
# We have GRUB2 package installed
@@ -634,7 +644,7 @@ class ApplianceImageCreator(ImageCreator):
if self.__compress:
# Compress with xz using 16 MiB block size for seekability
- rc = subprocess.call(["xz", "-z", "--block-size=16777216", src])
+ rc = subprocess.call(["xz", "-z", "--block-size=16777216", "-T 0", src])
if rc == 0:
logging.debug("compression successful")
if rc != 0: