diff options
author | Frank Lichtenheld <djpig@debian.org> | 2007-12-04 22:49:42 +0100 |
---|---|---|
committer | Frank Lichtenheld <djpig@debian.org> | 2007-12-04 22:52:14 +0100 |
commit | 8b282a3e34710f5182b35d5ae5a591ca83d2df52 (patch) | |
tree | e3998dcad3547cc2ec24e8a9510a45c7b67da935 /scripts/Dpkg.pm | |
parent | 0e6f9ad18568b2216596670bdd24e1d04fc1d9f2 (diff) | |
download | dpkg-8b282a3e34710f5182b35d5ae5a591ca83d2df52.tar.gz |
Dpkg: Include information about supported compression formats
Currently this is only used by dpkg-source, but other scripts
like dpkg-genchanges will need to use this information, too.
Diffstat (limited to 'scripts/Dpkg.pm')
-rw-r--r-- | scripts/Dpkg.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm index 7886018dc..0dc07f653 100644 --- a/scripts/Dpkg.pm +++ b/scripts/Dpkg.pm @@ -5,6 +5,9 @@ use warnings; use base qw(Exporter); our @EXPORT = qw($version $progname $admindir $dpkglibdir $pkgdatadir); +our %EXPORT_TAGS = ( 'compression' => + [ qw(@comp_supported %comp_supported %comp_ext $comp_regex) ] ); +our @EXPORT_OK = @{$EXPORT_TAGS{compression}}; our ($progname) = $0 =~ m#(?:.*/)?([^/]*)#; @@ -14,4 +17,10 @@ our $admindir = "/var/lib/dpkg"; our $dpkglibdir = "."; our $pkgdatadir = ".."; +# Compression +our @comp_supported = qw(gzip bzip2 lzma); +our %comp_supported = map { $_ => 1 } @comp_supported; +our %comp_ext = ( gzip => 'gz', bzip2 => 'bz2', lzma => 'lzma' ); +our $comp_regex = '(?:gz|bz2|lzma)'; + 1; |