From 93b1c4a0f9d6afc1cd56af68b9e5c8eba3f69387 Mon Sep 17 00:00:00 2001 From: brian Date: Thu, 17 Sep 2009 18:28:21 +0000 Subject: [PATCH] b=20640 i=wangyb i=yangsheng 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 ac92f179..d5efaf3 100644 --- a/build/lbuild-rhel5 +++ b/build/lbuild-rhel5 @@ -77,10 +77,13 @@ Provides: kernel-debuginfo = %{KVERREL} 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 @@ @@ -95,6 +98,7 @@ Provides: kernel-debuginfo = %{KVERREL} cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include fi EOF + fi popd >/dev/null -- 1.8.3.1