Ensure that foreign-arch multiarch multistraps work force_unpack was not considering architecture when de-duping the package list (This manifested when doing a foreign-arch multistrap which was also multiarch - i.e. two foreign arches relative to the build arch).
This commit is contained in:
parent
4e775ab148
commit
796a419bd1
1 changed files with 4 additions and 3 deletions
|
@ -572,16 +572,17 @@ sub force_unpack {
|
|||
my $escaped_path = shellescape("${dir}${cachedir}archives/$deb");
|
||||
my $version = `LC_ALL=C dpkg -f $escaped_path Version`;
|
||||
my $package = `LC_ALL=C dpkg -f $escaped_path Package`;
|
||||
my $arch = `LC_ALL=C dpkg -f $escaped_path Architecture`;
|
||||
chomp ($version);
|
||||
chomp ($package);
|
||||
if (exists $unpack{$package}) {
|
||||
my $test=system("dpkg --compare-versions ". shellescape($unpack{$package}) . " '<<' " . shellescape($version));
|
||||
my $test=system("dpkg --compare-versions ". shellescape($unpack{$package.$arch}) . " '<<' " . shellescape($version));
|
||||
$test >>= 8;
|
||||
# unlink version in $unpack if 0
|
||||
# unlink $deb (current one) if 1
|
||||
if ($test == 0) {
|
||||
my $old = $deb;
|
||||
$old =~ s/$version/$unpack{$package}/;
|
||||
$old =~ s/$version/$unpack{$package.$arch}/;
|
||||
printf (_g("I: Removing %s\n"), $old);
|
||||
unlink "${dir}${cachedir}archives/$old";
|
||||
next;
|
||||
|
@ -590,7 +591,7 @@ sub force_unpack {
|
|||
unlink "${dir}${cachedir}archives/$deb";
|
||||
}
|
||||
}
|
||||
$unpack{$package}=$version;
|
||||
$unpack{$package.$arch}=$version;
|
||||
}
|
||||
if (not @limits) {
|
||||
open (LOCK, ">${dir}${libdir}lists/lock");
|
||||
|
|
Loading…
Reference in a new issue