Types.pm 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 <https://www.gnu.org/licenses/>.
  13. package Dpkg::Control::Types;
  14. use strict;
  15. use warnings;
  16. our $VERSION = '0.01';
  17. our @EXPORT = qw(
  18. CTRL_UNKNOWN
  19. CTRL_INFO_SRC
  20. CTRL_INFO_PKG
  21. CTRL_REPO_RELEASE
  22. CTRL_INDEX_SRC
  23. CTRL_INDEX_PKG
  24. CTRL_PKG_SRC
  25. CTRL_PKG_DEB
  26. CTRL_FILE_CHANGES
  27. CTRL_FILE_VENDOR
  28. CTRL_FILE_STATUS
  29. CTRL_CHANGELOG
  30. );
  31. use Exporter qw(import);
  32. =encoding utf8
  33. =head1 NAME
  34. Dpkg::Control::Types - export CTRL_* constants
  35. =head1 DESCRIPTION
  36. You should not use this module directly. Instead you more likely
  37. want to use Dpkg::Control which also re-exports the same constants.
  38. This module has been introduced solely to avoid a dependency loop
  39. between Dpkg::Control and Dpkg::Control::Fields.
  40. =cut
  41. use constant {
  42. CTRL_UNKNOWN => 0,
  43. CTRL_INFO_SRC => 1, # First control block in debian/control
  44. CTRL_INFO_PKG => 2, # Subsequent control blocks in debian/control
  45. CTRL_INDEX_SRC => 4, # Entry in repository's Packages files
  46. CTRL_INDEX_PKG => 8, # Entry in repository's Sources files
  47. CTRL_PKG_SRC => 16, # .dsc file of source package
  48. CTRL_PKG_DEB => 32, # DEBIAN/control in binary packages
  49. CTRL_FILE_CHANGES => 64, # .changes file
  50. CTRL_FILE_VENDOR => 128, # File in $Dpkg::CONFDIR/origins
  51. CTRL_FILE_STATUS => 256, # $Dpkg::ADMINDIR/status
  52. CTRL_CHANGELOG => 512, # Output of dpkg-parsechangelog
  53. # Repository's (In)Release file.
  54. CTRL_REPO_RELEASE => 1024,
  55. };
  56. =head1 CHANGES
  57. =head2 Version 0.xx
  58. This is a private module.
  59. =head1 AUTHOR
  60. Raphaël Hertzog <hertzog@debian.org>.
  61. =cut
  62. 1;