lorax: Pass the kernel version to dracut as --kver

dracut dies with a usage message here if the version is passed after the
image name.

This is probably not needed as it turns out but I can't test that without a
full clean build which I don't have time for right now.
This commit is contained in:
Jon Griffiths 2016-03-17 15:18:05 +13:00
parent 132b411e62
commit 7d42fca843
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -ur lorax-22.1/src/pylorax/treebuilder.py lorax-22.1-patch/src/pylorax/treebuilder.py
--- lorax-22.1/src/pylorax/treebuilder.py 2014-12-13 11:20:56.000000000 +1300
+++ lorax-22.1-patch/src/pylorax/treebuilder.py 2016-03-17 15:14:40.539871906 +1300
@@ -227,7 +227,7 @@
if backup:
initrd = joinpaths(self.vars.inroot, outfile)
os.rename(initrd, initrd + backup)
- cmd = dracut + [outfile, kernel.version]
+ cmd = dracut + ["--kver", kernel.version, outfile]
runcmd(cmd, root=self.vars.inroot)
# ppc64 cannot boot images > 32MiB, check size and warn

View File

@ -16,7 +16,7 @@ Group: Applications/System
License: GPLv2+
URL: http://git.fedorahosted.org/git/?p=lorax.git
Source0: https://fedorahosted.org/releases/l/o/%{name}/%{name}-%{version}.tar.gz
Patch0: 0001_pass_kernel_version_as_an_arg.patch
BuildRequires: python2-devel
Requires: GConf2
@ -85,6 +85,7 @@ Anaconda's image install feature.
%prep
%setup -q
%patch0 -p1
%build
%install