diff --git a/multistrap b/multistrap index d7955cd..4b4db50 100755 --- a/multistrap +++ b/multistrap @@ -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");