Debian.pm 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright © 2009 Raphaël Hertzog <hertzog@debian.org>
  2. # This program is free software; you can redistribute it and/or modify
  3. # it under the terms of the GNU General Public License as published by
  4. # the Free Software Foundation; either version 2 of the License, or
  5. # (at your option) any later version.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. # GNU General Public License for more details.
  10. # You should have received a copy of the GNU General Public License along
  11. # with this program; if not, write to the Free Software Foundation, Inc.,
  12. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  13. package Dpkg::Vendor::Debian;
  14. use strict;
  15. use warnings;
  16. use base qw(Dpkg::Vendor::Default);
  17. use Dpkg::Control::Types;
  18. =head1 NAME
  19. Dpkg::Vendor::Debian - Debian vendor object
  20. =head1 DESCRIPTION
  21. This vendor object customize the behaviour of dpkg scripts
  22. for Debian specific actions.
  23. =cut
  24. sub run_hook {
  25. my ($self, $hook, @params) = @_;
  26. if ($hook eq "keyrings") {
  27. return ('/usr/share/keyrings/debian-keyring.gpg',
  28. '/usr/share/keyrings/debian-maintainers.gpg');
  29. } elsif ($hook eq "register-custom-fields") {
  30. return (
  31. [ "register", "Dm-Upload-Allowed",
  32. CTRL_INFO_SRC | CTRL_APT_SRC | CTRL_PKG_SRC ],
  33. [ "insert_after", CTRL_APT_SRC, "Uploaders", "Dm-Upload-Allowed" ],
  34. [ "insert_after", CTRL_PKG_SRC, "Uploaders", "Dm-Upload-Allowed" ],
  35. );
  36. } else {
  37. return $self->SUPER::run_hook($hook, @params);
  38. }
  39. }
  40. 1;