Package: dpkg-cross Version: 1.32 Severity: wishlist Tags: patch Hello,
the attached patch adds handling for /usr/host-triplet/ paths in the input package. The --cross2cross option decides how files and links in these directories are treated. If the option is unset, the files are not considered for conversion; if the option is set, the files are taken over with their path unchanged (symlink destinations are converted if they point outside of the "cross" prefix). Simon -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-4-amd64 Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8) Versions of packages dpkg-cross depends on: ii binutils 2.17-3 The GNU assembler, linker and bina ii dpkg-dev 1.13.25 package building tools for Debian ii file 4.17-5etch1 Determines file type using "magic" dpkg-cross recommends no packages. -- no debconf information
--- /usr/bin/dpkg-cross 2006-10-15 13:18:11.000000000 +0200 +++ dpkg-cross 2007-05-08 16:01:45.000000000 +0200 @@ -68,6 +68,7 @@ $mode = ""; $verbose = 1; $anyway = 0; +$cross2cross = 0; while( @ARGV ) { $_= shift( @ARGV ); last if m/^--$/; @@ -126,6 +127,9 @@ elsif (/^(-A|--convert-anyway)$/) { $anyway = 1; } + elsif (/^(--cross2cross)$/) { + $cross2cross = 1; + } else { die "$progname: Unknown option $_.\n"; } @@ -529,6 +533,13 @@ } else { link_file("$src$_", "$dst$crosslib/$3") or goto fail; } + } elsif (/^\/usr\/\w+-\w+(-\w+(-\w+)?)?\/(lib|include)\//) { + # regular file under /usr/<host>/lib or include + if ($cross2cross) { + link_file("$src$_", "$dst$_"); + } else { + next; + } } elsif (/^(\/usr(\/X11R6)?)?\/lib64\/([^\/]+\.so[^\/]*)$/) { # regilar .so* file under /lib64, /usr/lib64 or /usr/X11R6/lib64 if (is_ldscript("$src$_")) { @@ -589,6 +600,7 @@ s/^$src//; # Ignore any symlinks not under /usr or /lib or /lib64 /^\/(usr|lib|lib64)/ or next; + next if (/^\/usr\/\w+-\w+(-\w+(-\w+)?)?\// && !$cross2cross); # Find out (absolute) symlink destination my $lv = readlink("$src$_"); if ($lv =~ /^[^\/]/) {
--- /usr/share/perl5/dpkg-cross.pl 2006-10-15 13:18:11.000000000 +0200 +++ dpkg-cross.pl 2007-05-08 15:58:25.000000000 +0200 @@ -609,6 +609,8 @@ $path = "$crosslib/$'"; } elsif ($path =~ /^(\/usr(\/X11R6)?)?\/lib64\//) { $path = "$crosslib64/$'"; + } elsif ($path =~ /^\/usr\/\w+-\w+(-\w+(-\w+)?)?\//) { + # leave alone } else { $path =~ s/^\/usr/$crossdir/; }