Description of problem: start building the kernel (rpmbuild -ba --target ... kernel-2.6.spec) the %pre stage moves the old build to deleteme and starts the remove in background. If you break this process, the folder deleteme and deleteme2 will still exists and the build process stops. There's no check, if the deleteme and deleteme2 folder exists. # We already have a vanilla dir. cd kernel-%{kversion} if [ -d linux-%{kversion}.%{_target_cpu} ]; then mv linux-%{kversion}.%{_target_cpu} deleteme rm -rf deleteme & fi if [ -d xen ]; then mv xen deleteme2 rm -rf deleteme2 & fi Version-Release number of selected component (if applicable): 2.6.16 -1.2128 How reproducible: Start build process, interrupt it, start again. Steps to Reproduce: 1. 2. 3. Actual results: Build process stops Expected results: Spec file should remove the deleteme folders and continue working. Additional info:
for the sake of keeping the specfile as clean as possible (this snippet of script is already pretty ugly), I'm going to close this as a "don't do that".
You can simply add "/bin/rm -rf deleteme; mv linux-xx deletme". This don't gives the error any more, if the deleteme folder still exists.