From 9f56caa9ac32251640b2a64b6a2ec2d0c8e99229 Mon Sep 17 00:00:00 2001 From: brian Date: Thu, 17 Sep 2009 17:47:36 +0000 Subject: [PATCH] Only apply the asm-x86_64 workaround (filed as RH bug 491775) to RHEL releases that actually need it. --- build/lbuild-rhel5 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build/lbuild-rhel5 b/build/lbuild-rhel5 index f2fd16f..5156a2e 100644 --- a/build/lbuild-rhel5 +++ b/build/lbuild-rhel5 @@ -89,10 +89,13 @@ Obsoletes: kernel-debuginfo SPECS/kernel-2.6.spec fi - # 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" || fatal 1 "Error while patching SPECS/kernel-2.6.spec" --- SPECS/kernel-2.6.spec.dist 2009-03-23 20:30:55.000000000 -0400 +++ SPECS/kernel-2.6.spec 2009-03-23 20:37:03.000000000 -0400 @@ -6961,6 +6961,10 @@ @@ -107,6 +110,7 @@ Obsoletes: kernel-debuginfo cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include fi EOF + fi popd >/dev/null -- 1.8.3.1