Created attachment 593041 [details] Patch for the kernel.spec in the kernel src.rpm to prevent choke on empty req.list Description of problem: Compiling a highly customized kernel from the src.rpm fails at the rpm build stage because the req.list of additional module dependencies is empty. The sort chokes. Version-Release number of selected component (if applicable): 3.4.2-4 How reproducible: Every time for the custom compile. Steps to Reproduce: 1.Customize the src.rpm kernel configuration 2.rpmbuild 3. Actual results: sort -u rpm.list > rpm2.list in the kernel spec %build section fails with an empty file. Expected results: rpms are created. Additional info: I am including this as documentation of the problem in case anyone else encounters it. I doubt that this will ever affect the Fedora stock kernel. Putting the patch in place won't cause any problems for the stock kernel build though.
*** Bug 836121 has been marked as a duplicate of this bug. ***
Thank you for the patch. There are a couple of issues with it though. The same failure can happen with the dep.list sort if both of your conditions fail and mod-extra3.list winds up being an empty file. Also, if mod-extra.list doesn't exist the 'cp %{SOURCE16}' a few lines above would fail. It would also mean that essentially the modules-extra package is disabled and we really screwed up somewhere. I solved this instead by making sure the needed files exist via touch before they are used.
You would be more familiar than I am with what is needed. And so it proves. Your fix works fine in my custom compile of 3.5.0-2. Thank you.