Bug 188889

Summary: kernel spec file 2.6.16 -1.2128 breaks, if deleteme exists
Product: [Fedora] Fedora Reporter: Thomas Steudten <tomri>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-18 21:48:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Steudten 2006-04-13 08:43:25 UTC
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:

Comment 1 Dave Jones 2006-04-18 21:48:13 UTC
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".


Comment 2 Thomas Steudten 2006-04-20 09:57:08 UTC
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.