From: Wichert Akkerman Date: Sun, 13 Feb 2000 00:12:39 +0000 (+0000) Subject: scripts/dpkg-buildpackage.sh: we know that dpkg-architecture is X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f60e5cd4452cd959bf4fd126f7fe57d1ff01e097;p=dpkg scripts/dpkg-buildpackage.sh: we know that dpkg-architecture is installed since we provide it, so don't test for its existance More updates from Marcus Brinkman: + archtable: Change first column format from CPU to CPU-OS. Add entry for i386-gnu. Update comment. + configure.in: Check Debian architecture revamped: More appropriate check title. Check for CPU-OS in arhctable (instead just CPU). Enclose result message in [...] (because of the comma character). After the test, $dpkg_archset can't be empty, so remove following test which is always true. + Remove internal use of --print-architecture: scripts/controllib.pl: Use always dpkg-architecture -qDEB_HOST_ARCH scripts/dpkg-buildpackage: Don't set $arch at command line parsing time, instead, always set it later with dpkg-architecture -qDEB_HOST_ARCH dpkg-name.pl: Fall back to dpkg --print-installation-architecture. --- diff --git a/ChangeLog b/ChangeLog index 36fd0425..3d26f463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +Sun Feb 13 01:06:46 CET 2000 Wichert Akkerman + + * scripts/dpkg-buildpackage.sh: we know that dpkg-architecture is + installed since we provide it, so don't test for its existance + * More updates from Marcus Brinkman: + + archtable: Change first column format from CPU to CPU-OS. + Add entry for i386-gnu. Update comment. + + configure.in: Check Debian architecture revamped: + More appropriate check title. Check for CPU-OS in arhctable (instead + just CPU). Enclose result message in [...] (because of the comma + character). After the test, $dpkg_archset can't be empty, so remove + following test which is always true. + + Remove internal use of --print-architecture: + scripts/controllib.pl: Use always dpkg-architecture -qDEB_HOST_ARCH + scripts/dpkg-buildpackage: Don't set $arch at command line parsing time, + instead, always set it later with dpkg-architecture -qDEB_HOST_ARCH + dpkg-name.pl: Fall back to dpkg --print-installation-architecture. + Sat Feb 12 17:11:33 CET 2000 Wichert Akkerman * configure.in: don't try to outguess what CFLAGS should be diff --git a/archtable b/archtable index 5e2e4279..addeb5c8 100644 --- a/archtable +++ b/archtable @@ -1,36 +1,31 @@ # This file contains a table of known architecture strings, with -# things to map them to. `configure' will take the output of gcc -# --print-libgcc-file-name, strip off leading directories up to and -# including gcc-lib, strip off trailing /libgcc.a and trailing version -# number directory, and then strip off everything after the first -# hyphen. The idea is that you're left with this bit: -# $ gcc --print-libgcc-file-name -# /usr/lib/gcc-lib/i486-linux/2.7.2/libgcc.a -# ^^^^ -# This is then looked up in the table below, to find out what to map -# it to. If it isn't found then configure will print a warning and -# continue. You can override configure's ideas using --with-arch. -# The third field is the GNU configure architecture to use with -# this build architecture. +# things to map them to. +# +# Column 1 contains the $target_cpu-$target_os string as determined +# by configure. +# Column 2 contains the Debian architecture string, which is +# returned by `dpkg --print-installation-architecture'. +# Column 3 is returned by `dpkg --print-architecture'. -i386 i386 i486 -i486 i386 i486 -i586 i386 i486 -i686 i386 i486 -pentium i386 i486 -sparc sparc sparc -sparc64 sparc64 sparc64 -alpha alpha alpha -alphaev4 alpha alpha -alphaev5 alpha alpha -alphaev56 alpha alpha -alphaev6 alpha alpha -alphapca56 alpha alpha -m68k m68k m68k -arm arm arm -armv4l arm arm -ppc powerpc powerpc -powerpc powerpc powerpc -mips mips mips -mipsel mipsel mipsel -mipseb mips mips +i386-linux-gnu i386 i486 +i486-linux-gnu i386 i486 +i586-linux-gnu i386 i486 +i686-linux-gnu i386 i486 +pentium-linux-gnu i386 i486 +sparc-linux-gnu sparc sparc +sparc64-linux-gnu sparc64 sparc64 +alpha-linux-gnu alpha alpha +alphaev4-linux-gnu alpha alpha +alphaev5-linux-gnu alpha alpha +alphaev56-linux-gnu alpha alpha +alphaev6-linux-gnu alpha alpha +alphapca56-linux-gnu alpha alpha +m68k-linux-gnu m68k m68k +arm-linux-gnu arm arm +armv4l-linux-gnu arm arm +ppc-linux-gnu powerpc powerpc +powerpc powerpc powerpc +mips-linux-gnu mips mips +mipsel-linux-gnu mipsel mipsel +mipseb-linux-gnu mips mips +i386-gnu hurd-i386 undefined diff --git a/configure.in b/configure.in index 25742827..5b133ccc 100644 --- a/configure.in +++ b/configure.in @@ -58,20 +58,16 @@ AC_MSG_RESULT($VERSION) AC_PREFIX_DEFAULT(/usr) dpkg_archset='' -AC_MSG_CHECKING(system architecture) -dpkg_archset="`awk '$1 == "'$target_cpu'" { print $2 }' $srcdir/archtable`" +AC_MSG_CHECKING(Debian architecture) +dpkg_archset="`awk '$1 == "'$target_cpu-$target_os'" { print $2 }' $srcdir/archtable`" # Finish off if test "x$dpkg_archset" = "x"; then - AC_MSG_RESULT($target_cpu, but not found in archtable) - dpkg_archset=$target_cpu -else + AC_MSG_RESULT([$target_cpu-$target_os, but not found in archtable]) + dpkg_archset=$target_cpu-$target_os + else AC_MSG_RESULT($dpkg_archset) fi - -if test "x$dpkg_archset" != x -then - AC_DEFINE_UNQUOTED(ARCHITECTURE, "${dpkg_archset}") -fi +AC_DEFINE_UNQUOTED(ARCHITECTURE, "${dpkg_archset}") dnl gettext diff --git a/scripts/controllib.pl b/scripts/controllib.pl index 5af70435..f7a308de 100755 --- a/scripts/controllib.pl +++ b/scripts/controllib.pl @@ -78,13 +78,9 @@ sub capit { } sub findarch { - if (exists $ENV{DEB_HOST_ARCH}) { - $arch=$ENV{DEB_HOST_ARCH}; - } else { - $arch=`dpkg --print-architecture`; - $? && &subprocerr("dpkg --print-architecture"); - chomp $arch; - } + $arch=`dpkg-architecture -qDEB_HOST_ARCH`; + $? && &subprocerr("dpkg-architecture -qDEB_HOST_ARCH"); + chomp $arch; $substvar{'Arch'}= $arch; } diff --git a/scripts/dpkg-buildpackage.sh b/scripts/dpkg-buildpackage.sh index 5fb7e79d..ef0fefaf 100755 --- a/scripts/dpkg-buildpackage.sh +++ b/scripts/dpkg-buildpackage.sh @@ -71,7 +71,7 @@ do -us) signsource=: ;; -uc) signchanges=: ;; -ap) usepause="true";; - -a*) opt_a=1; arch="$value" ;; + -a*) opt_a=1; targetarch="$value" ;; -si) sourcestyle=-si ;; -sa) sourcestyle=-sa ;; -sd) sourcestyle=-sd ;; @@ -116,11 +116,9 @@ mustsetvar package "`dpkg-parsechangelog | sed -n 's/^Source: //p'`" "source pac mustsetvar version "`dpkg-parsechangelog | sed -n 's/^Version: //p'`" "source version" if [ -n "$maint" ]; then maintainer="$maint"; else mustsetvar maintainer "`dpkg-parsechangelog | sed -n 's/^Maintainer: //p'`" "source maintainer"; fi -command -v dpkg-architecture > /dev/null 2>&1 && eval `dpkg-architecture -a${arch} -t${targetgnusystem} -s` -archlist=`dpkg-architecture -a${arch} -t${targetgnusystem} -f 2> /dev/null` -test "${opt_a}" \ - || arch=`dpkg-architecture -a${arch} -t${targetgnusystem} -qDEB_HOST_ARCH 2> /dev/null` && test "${arch}" \ - || mustsetvar arch "`dpkg --print-architecture`" "build architecture" +eval `dpkg-architecture -a${arch} -t${targetgnusystem} -s` +archlist=`dpkg-architecture -a${targetarch} -t${targetgnusystem} -f 2> /dev/null` +mustsetvar arch "`dpkg-architecture -a${targetarch} -t${targetgnusystem} -qDEB_HOST_ARCH`" "build architecture" sversion=`echo "$version" | perl -pe 's/^\d+://'` pv="${package}_${sversion}" diff --git a/scripts/dpkg-name.sh b/scripts/dpkg-name.sh index ac6aec8e..67c4894b 100755 --- a/scripts/dpkg-name.sh +++ b/scripts/dpkg-name.sh @@ -71,7 +71,7 @@ getname () { a=`echo $a|sed -e 's/ *//g'`; if [ -z "$a" -a -n "$noarchitecture" ]; # arch field empty, or ignored then - a=`dpkg --print-architecture`; + a=`dpkg --print-installation-architecture`; stderr "assuming architecture \`"$a"' for \`"$1"'"; fi if [ -z "$noarchitecture" ];