- # finally, work around RH bug 491775
- # XXX - i wonder if we will need to do this enough to formalize a
- # patching system. let's assume not for the time being.
- patch -s -p0 <<"EOF"
+ # finally, work around RH bug 491775, if needed
+ if ! grep -q "cp -a asm-x86_64 \$RPM_BUILD_ROOT/lib/modules/\$KernelVer/build/include" \
+ SPECS/kernel-2.6.spec; then
+ # XXX - i wonder if we will need to do this ad-hoc patching enough to
+ # formalize a patching system. let's assume not for the time
+ # being.
+ patch -s -p0 <<"EOF" 2>&1 || \
+ fatal 1 "Error while patching SPECS/kernel-2.6.spec"