From d61ae8c1e6902b894961145d028dc48f6dfd4012 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Wed, 6 Jul 2011 17:12:42 -0400 Subject: [PATCH] fixup - correctly detect F15 builds Yeah, for F16 you need to do "version > 15", not ">= 15". Oops. Also, check product.version before using anaconda_dracut_hack(). --- share/runtime-cleanup.tmpl | 2 +- share/runtime-postinstall.tmpl | 2 +- src/pylorax/treebuilder.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl index 56e75233..f3d4a9bc 100644 --- a/share/runtime-cleanup.tmpl +++ b/share/runtime-cleanup.tmpl @@ -78,7 +78,7 @@ arch/x86/kvm %endfor remove /modules/*/{build,source,*.map} -%if int(product.version) >= 15: +%if int(product.version) > 15: ## Clean up systemd removefrom ConsoleKit /lib/systemd/* removefrom avahi /lib/systemd/* diff --git a/share/runtime-postinstall.tmpl b/share/runtime-postinstall.tmpl index 35a03ed3..8559ebfb 100644 --- a/share/runtime-postinstall.tmpl +++ b/share/runtime-postinstall.tmpl @@ -29,7 +29,7 @@ move ${PYTHONDIR}/site-packages/pyanaconda/sitecustomize.py ${PYTHONDIR}/site-pa move etc/yum.repos.d etc/anaconda.repos.d ## misc_tree_modifications() -%if int(product.version) >= 15: +%if int(product.version) > 15: ## Configure systemd to start anaconda symlink /sbin/init init remove etc/systemd/system/default.target diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py index b3837d32..a6ab517d 100644 --- a/src/pylorax/treebuilder.py +++ b/src/pylorax/treebuilder.py @@ -147,7 +147,8 @@ class TreeBuilder(object): # Hush some dracut warnings. TODO: bind-mount proc in place? open(joinpaths(self.vars.inroot,"/proc/modules"),"w") # Add some extra bits to the dracut initramfs - dracut += self.anaconda_dracut_hack() + if int(self.vars.product.version) <= 15: + dracut += self.anaconda_dracut_hack() # XXX FIXME: add anaconda dracut module! for kernel in self.kernels: logger.info("rebuilding %s", kernel.initrd.path)