diff --git a/kernel.spec b/kernel.spec index cd5ac226a..8be8a4bab 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1664,6 +1664,9 @@ BuildKernel() { cp vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer %endif + # remove files that will be auto generated by depmod at rpm -i time + find $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.* -exec rm -f {} \; + find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames # mark modules executable so that strip-to-file can strip them @@ -1702,9 +1705,6 @@ BuildKernel() { cp signing_key.x509 signing_key.x509.sign${Flav} %endif - # remove files that will be auto generated by depmod at rpm -i time - find $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.* -exec rm -f {} \; - # Move the devel headers out of the root file system mkdir -p $RPM_BUILD_ROOT/usr/src/kernels mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir @@ -2215,7 +2215,7 @@ fi * Tue May 21 2013 Kyle McMartin - Rewrite the modinfo license check to generate significantly less noise in build logs. -- Ditto for the modules.* removal. +- Ditto for the modules.* removal (and move it earlier, as pointed out by jwb) * Tue May 21 2013 Peter Robinson - Enable OMAP5 on ARM multiplatform