[PATCH] allow multiple debuginfo packages installed

Aristeu Rozanski aris at redhat.com
Fri Nov 19 17:06:44 UTC 2010


Currently it's not possible to install multiple debuginfo packages in
the same system. See:
	https://bugzilla.redhat.com/show_bug.cgi?id=435941
	(unfortunately only available for RH engineers)
This patch fixes the problem by simply changing the directory name where
the kernel is built. Because normally the directory used will be
linux-2.6.35.x86_64, linux-2.6.35-1 and linux-2.6.35-2 won't be allowed
to co-exist because of file conflict.

diff --git a/kernel.spec b/kernel.spec
index 49d40e7..8e0a723 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1135,13 +1135,13 @@ if [ -d linux-%{kversion}.%{_target_cpu} ]; then
   # Just in case we ctrl-c'd a prep already
   rm -rf deleteme.%{_target_cpu}
   # Move away the stale away, and delete in background.
-  mv linux-%{kversion}.%{_target_cpu} deleteme.%{_target_cpu}
+  mv linux-%{KVERREL} deleteme.%{_target_cpu}
   rm -rf deleteme.%{_target_cpu} &
 fi
 
-cp -rl vanilla-%{vanillaversion} linux-%{kversion}.%{_target_cpu}
+cp -rl vanilla-%{vanillaversion} linux-%{KVERREL}
 
-cd linux-%{kversion}.%{_target_cpu}
+cd linux-%{KVERREL}
 
 # released_kernel with possible stable updates
 %if 0%{?stable_base}
@@ -1712,7 +1712,7 @@ rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT/boot
 mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
 
-cd linux-%{kversion}.%{_target_cpu}
+cd linux-%{KVERREL}
 
 %if %{with_debug}
 BuildKernel %make_target %kernel_image debug
@@ -1777,7 +1777,7 @@ find Documentation -type d | xargs chmod u+w
 
 %install
 
-cd linux-%{kversion}.%{_target_cpu}
+cd linux-%{KVERREL}
 
 %if %{with_doc}
 docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{rpmversion}


More information about the kernel mailing list