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

Bug#439979: dpkg-dev: Please support removal of dpkg-cross diversions



Package: dpkg
Version: 1.14.5
Severity: normal
Tags: patch

As outlined on the debian-dpkg lists, I've been testing the removal of
the dpkg-cross diversions of dpkg-buildpackage and dpkg-shlibdeps during
the rewrite of dpkg-cross and I now have two patches (slightly modified
from the last ones posted to the list) that I would like to see in
dpkg-dev as a beginning to a process to merge dpkg-cross back into dpkg.

The first part is to remove the diversions and requires PATH and
environment changes within 'dpkg-buildpackage -a' via a small set of
shell functions provided by dpkg-cross. Cross support for dpkg-shlibdeps
needs a few more PATH changes and a dependency on binutils-multiarch.

Once these patches are included, maybe the shell functions and the
existing cross-config.$arch files can also be merged into dpkg-dev,
leaving dpkg-cross with the original task of preparing foreign shared
objects as Architecture:all packages that can be installed into
/usr/$arch-triplet/lib etc. to make the libraries and headers accessible
to the cross-compiler.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.21-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dpkg depends on:
ii  coreutils                     5.97-5.4   The GNU core utilities
ii  libc6                         2.6.1-1    GNU C Library: Shared libraries

dpkg recommends no packages.

-- no debconf information
--- dpkg-1.14.5/scripts/dpkg-buildpackage.sh	2007-08-28 20:06:39.000000000 +0100
+++ dpkg.old/scripts/dpkg-buildpackage.sh	2007-08-27 23:23:28.000000000 +0100
@@ -84,18 +84,6 @@
 passopts=''
 admindir=''
 
-DPKGCROSSENABLE=0
-if [ -f /usr/share/dpkg-cross/buildcross ]; then
- . /usr/share/dpkg-cross/buildcross
- DPKGCROSSENABLE=1
-fi
-
-function enhance_cross {
-	if [ $DPKGCROSSENABLE -gt 0 ]; then
-		setup_cross
-	fi
-}
-
 while [ $# != 0 ]
 do
 	value="`echo x\"$1\" | sed -e 's/x--.*=//;s/^x-.//'`"
@@ -116,7 +104,7 @@
 	-us)	signsource=: ;;
 	-uc)	signchanges=: ;;
 	-ap)	usepause="true";;
-	-a*)    targetarch="$value"; checkbuilddep=false; enhance_cross ;;
+	-a*)    targetarch="$value"; checkbuilddep=false ;;
 	-si)	sourcestyle=-si ;;
 	-sa)	sourcestyle=-sa ;;
 	-sd)	sourcestyle=-sd ;;
--- dpkg-1.14.5/scripts/dpkg-shlibdeps.pl	2007-08-28 00:02:16.000000000 +0100
+++ dpkg.old/scripts/dpkg-shlibdeps.pl	2007-08-27 23:23:48.000000000 +0100
@@ -75,16 +75,6 @@
 "), $progname, join("/",@depfields);
 }
 
-# detect cross-compilation
-my $result = `dpkg-architecture -qDEB_HOST_ARCH`;
-chomp($result);
-my $host_arch = $result;
-$result = `dpkg-architecture -qDEB_BUILD_ARCH`;
-chomp($result);
-my $target_arch = $result;
-my $use_cross = 0;
-$use_cross = 1 if ($host_arch ne $target_arch);
-
 my ($stdout, @exec, @execfield);
 foreach (@ARGV) {
     if (m/^-T/) {
@@ -144,21 +134,8 @@
     }
 }
 
-my @librarypaths=();
-if ($use_cross)
-{
-    my $crossprefix = `dpkg-architecture -qDEB_HOST_GNU_TYPE`;
-    chomp($crossprefix);
-    @librarypaths = ( "${crossprefix}/lib", "/usr/${crossprefix}/lib",
-        "/${crossprefix}/lib32", "/usr/${crossprefix}/lib32",
-        "/${crossprefix}/lib64", "/usr/${crossprefix}/lib64",
-        "/emul/ia32-linux/lib", "/emul/ia32-linux/usr/lib" );
-}
-else
-{
-    @librarypaths = qw( /lib /usr/lib /lib32 /usr/lib32 /lib64 /usr/lib64
-                      /emul/ia32-linux/lib /emul/ia32-linux/usr/lib );
-}
+my @librarypaths = qw( /lib /usr/lib /lib32 /usr/lib32 /lib64 /usr/lib64
+		       /emul/ia32-linux/lib /emul/ia32-linux/usr/lib );
 my %librarypaths = map { $_ => 'default' } @librarypaths;
 
 if ($ENV{LD_LIBRARY_PATH}) {

Reply to: