[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#164863: fail to get arch when wrong $CC



Package: debhelper
Version: 4.1.15
Severity: wishlist

"dpkg --print-architecture" depends "$CC --print-libgcc-file-name", and
if $CC is failed to execute, dpkg warns as:

  dpkg: warning, architecture `i386-none' not in remapping table

In some situation, for example, CC="ccache gcc-3.2" in debian/rules,
it will fail to get arch, because dpkg try to exec(2) not to system(3),
so debhelper that requires arch will not work well.

Maybe, it may be better to be fixed in dpkg.
Since build-essential depends on gcc, debhelper way assume gcc is
installed, so I think debhelper can ignore $CC that user defined
to get arch by using "dpkg --print-architecture".
How about this patch?

--- Dh_Lib.pm.orig	2002-09-23 00:26:21.000000000 +0900
+++ Dh_Lib.pm	2002-10-15 23:24:39.000000000 +0900
@@ -500,7 +500,7 @@
 	sub buildarch {
   		return $arch if defined $arch;
 
-		$arch=`dpkg --print-architecture` || error($!);
+		$arch=`unset CC; dpkg --print-architecture` || error($!);
 		chomp $arch;
 		return $arch;
 	}

Thanks,
Fumitoshi UKAI



Reply to: