diff options
Diffstat (limited to 'scripts/Dpkg/Control')
-rw-r--r-- | scripts/Dpkg/Control/Fields.pm | 8 | ||||
-rw-r--r-- | scripts/Dpkg/Control/Hash.pm | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm index 8f14d9f19..f0a17c4b0 100644 --- a/scripts/Dpkg/Control/Fields.pm +++ b/scripts/Dpkg/Control/Fields.pm @@ -24,7 +24,7 @@ use base qw(Exporter); use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Control::Types; -use Dpkg::Checksums qw(@check_supported %check_supported); +use Dpkg::Checksums; use Dpkg::Vendor qw(run_vendor_hook); our @EXPORT = qw(field_capitalize field_is_official field_is_allowed_in @@ -266,9 +266,9 @@ our %FIELDS = ( }, ); -my @checksum_fields = map { field_capitalize("Checksums-$_") } @check_supported; +my @checksum_fields = map { field_capitalize("Checksums-$_") } checksums_get_list(); my @sum_fields = map { $_ eq "md5" ? "MD5sum" : field_capitalize($_) } - @check_supported; + checksums_get_list(); &field_register($_, CTRL_PKG_SRC | CTRL_FILE_CHANGES) foreach @checksum_fields; &field_register($_, CTRL_INDEX_PKG) foreach @sum_fields; @@ -353,7 +353,7 @@ sub field_capitalize($) { my $field = lc(shift); # Some special cases due to history return "MD5sum" if $field eq "md5sum"; - return uc($field) if exists $check_supported{$field}; + return uc($field) if checksums_is_supported($field); # Generic case return join '-', map { ucfirst } split /-/, $field; } diff --git a/scripts/Dpkg/Control/Hash.pm b/scripts/Dpkg/Control/Hash.pm index b613da40d..2633b4f97 100644 --- a/scripts/Dpkg/Control/Hash.pm +++ b/scripts/Dpkg/Control/Hash.pm @@ -375,7 +375,7 @@ package Dpkg::Control::Hash::Tie; # type Dpkg::Control. use Dpkg::ErrorHandling; -use Dpkg::Checksums qw(%check_supported); +use Dpkg::Checksums; use Tie::Hash; use base qw(Tie::ExtraHash); @@ -384,7 +384,7 @@ sub field_capitalize($) { my $field = lc(shift); # Some special cases due to history return "MD5sum" if $field eq "md5sum"; - return uc($field) if exists $check_supported{$field}; + return uc($field) if checksums_is_supported($field); # Generic case return join '-', map { ucfirst } split /-/, $field; } |