Просмотр исходного кода

Dpkg::Shlibs::Symbol: Use new debarch_is_concerned() instead of Dpkg::Deps

Stop abusing the Dpkg::Deps object just to get the architecture
computation from it.
Guillem Jover лет назад: 11
Родитель
Сommit
2edb74f777
1 измененных файлов с 2 добавлено и 6 удалено
  1. 2 6
      scripts/Dpkg/Shlibs/Symbol.pm

+ 2 - 6
scripts/Dpkg/Shlibs/Symbol.pm

@@ -22,9 +22,9 @@ use warnings;
 our $VERSION = '0.01';
 
 use Dpkg::Gettext;
-use Dpkg::Deps;
 use Dpkg::ErrorHandling;
 use Dpkg::Util qw(:list);
+use Dpkg::Arch qw(debarch_is_concerned);
 use Dpkg::Version;
 use Storable ();
 use Dpkg::Shlibs::Cppfilt;
@@ -295,11 +295,7 @@ sub arch_is_concerned {
     my $arches = $self->{tags}{arch};
 
     if (defined $arch && defined $arches) {
-	my $dep = Dpkg::Deps::Simple->new();
-	my @arches = split(/[\s,]+/, $arches);
-	$dep->{package} = 'dummy';
-	$dep->{arches} = \@arches;
-	return $dep->arch_is_concerned($arch);
+        return debarch_is_concerned($arch, split /[\s,]+/, $arches);
     }
 
     return 1;