diff options
Diffstat (limited to 'scripts/Dpkg/Control/Fields.pm')
-rw-r--r-- | scripts/Dpkg/Control/Fields.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm index a58632098..7223a425c 100644 --- a/scripts/Dpkg/Control/Fields.pm +++ b/scripts/Dpkg/Control/Fields.pm @@ -24,6 +24,7 @@ use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Control::Types; use Dpkg::Checksums qw(@check_supported %check_supported); +use Dpkg::Vendor qw(run_vendor_hook); our @EXPORT = qw(field_capitalize field_is_official field_is_allowed_in field_transfer_single field_transfer_all @@ -313,6 +314,20 @@ $FIELD_ORDER{CTRL_APT_SRC()} = [ @{$FIELD_ORDER{CTRL_PKG_SRC()}} ]; @{$FIELD_ORDER{CTRL_PKG_SRC()}}; &field_insert_before(CTRL_APT_SRC, "Checksums-Md5", "Directory"); +# Register vendor specifics fields +foreach my $op (run_vendor_hook("register-custom-fields")) { + my $func = shift @$op; + if ($func eq "register") { + &field_register(@$op); + } elsif ($func eq "insert_before") { + &field_insert_before(@$op); + } elsif ($func eq "insert_after") { + &field_insert_after(@$op); + } else { + error("vendor hook register-custom-fields sent bad data: @$op"); + } +} + =head1 NAME Dpkg::Control::Fields - manage (list of official) control fields |