Types.pm 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 strict;
  15. use warnings;
  16. use base qw(Exporter);
  17. our @EXPORT = qw(CTRL_UNKNOWN CTRL_INFO_SRC CTRL_INFO_PKG CTRL_INDEX_SRC
  18. CTRL_INDEX_PKG CTRL_PKG_SRC CTRL_PKG_DEB CTRL_FILE_CHANGES
  19. CTRL_FILE_VENDOR CTRL_FILE_STATUS CTRL_CHANGELOG);
  20. =encoding utf8
  21. =head1 NAME
  22. Dpkg::Control::Types - export CTRL_* constants
  23. =head1 DESCRIPTION
  24. You should not use this module directly. Instead you more likely
  25. want to use Dpkg::Control which also re-exports the same constants.
  26. This module has been introduced solely to avoid a dependency loop
  27. between Dpkg::Control and Dpkg::Control::Fields.
  28. =cut
  29. use constant {
  30. CTRL_UNKNOWN => 0,
  31. CTRL_INFO_SRC => 1, # First control block in debian/control
  32. CTRL_INFO_PKG => 2, # Subsequent control blocks in debian/control
  33. CTRL_INDEX_SRC => 4, # Entry in repository's Packages files
  34. CTRL_INDEX_PKG => 8, # Entry in repository's Sources files
  35. CTRL_PKG_SRC => 16, # .dsc file of source package
  36. CTRL_PKG_DEB => 32, # DEBIAN/control in binary packages
  37. CTRL_FILE_CHANGES => 64, # .changes file
  38. CTRL_FILE_VENDOR => 128, # File in $Dpkg::CONFDIR/origins
  39. CTRL_FILE_STATUS => 256, # /var/lib/dpkg/status
  40. CTRL_CHANGELOG => 512, # Output of dpkg-parsechangelog
  41. };
  42. =head1 AUTHOR
  43. Raphaël Hertzog <hertzog@debian.org>.
  44. =cut
  45. 1;