Types.pm 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # This program is free software; you can redistribute it and/or modify
  2. # it under the terms of the GNU General Public License as published by
  3. # the Free Software Foundation; either version 2 of the License, or
  4. # (at your option) any later version.
  5. #
  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. #
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. package Dpkg::Control::Types;
  14. use base qw(Exporter);
  15. our @EXPORT = qw(CTRL_UNKNOWN CTRL_INFO_SRC CTRL_INFO_PKG CTRL_INDEX_SRC
  16. CTRL_INDEX_PKG CTRL_PKG_SRC CTRL_PKG_DEB CTRL_FILE_CHANGES
  17. CTRL_FILE_VENDOR CTRL_FILE_STATUS CTRL_CHANGELOG);
  18. =head1 NAME
  19. Dpkg::Control::Types - export CTRL_* constants
  20. =head1 DESCRIPTION
  21. You should not use this module directly. Instead you more likely
  22. want to use Dpkg::Control which also re-exports the same constants.
  23. This module has been introduced solely to avoid a dependency loop
  24. between Dpkg::Control and Dpkg::Control::Fields.
  25. =cut
  26. use constant {
  27. CTRL_UNKNOWN => 0,
  28. CTRL_INFO_SRC => 1, # First control block in debian/control
  29. CTRL_INFO_PKG => 2, # Subsequent control blocks in debian/control
  30. CTRL_INDEX_SRC => 4, # Entry in APT's Packages files
  31. CTRL_INDEX_PKG => 8, # Entry in APT's Sources files
  32. CTRL_PKG_SRC => 16, # .dsc file of source package
  33. CTRL_PKG_DEB => 32, # DEBIAN/control in binary packages
  34. CTRL_FILE_CHANGES => 64, # .changes file
  35. CTRL_FILE_VENDOR => 128, # File in /etc/dpkg/origins
  36. CTRL_FILE_STATUS => 256, # /var/lib/dpkg/status
  37. CTRL_CHANGELOG => 512, # Output of dpkg-parsechangelog
  38. };
  39. =head1 AUTHOR
  40. Raphaël Hertzog <hertzog@debian.org>.
  41. =cut
  42. 1;