summaryrefslogtreecommitdiff
path: root/apt-pkg/aptconfiguration.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-02-27 23:31:25 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-02-27 23:31:25 +0100
commitb0e1a43f95a3a6817dff6aed303a9823827ea0cf (patch)
tree551d38fc42ce07e29bb633c0b7d57f8222cec2ac /apt-pkg/aptconfiguration.cc
parent03bef78461c6f443187b60799402624326843396 (diff)
support every compression we have a compressor configured
Diffstat (limited to 'apt-pkg/aptconfiguration.cc')
-rw-r--r--apt-pkg/aptconfiguration.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index 2a441fce7..b23e12acb 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -388,6 +388,19 @@ const Configuration::getCompressors(bool const Cached) {
return compressors;
}
/*}}}*/
+// getCompressorExtensions - supported data.tar extensions /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+std::vector<std::string> const Configuration::getCompressorExtensions() {
+ std::vector<APT::Configuration::Compressor> const compressors = getCompressors();
+ std::vector<std::string> ext;
+ for (std::vector<APT::Configuration::Compressor>::const_iterator c = compressors.begin();
+ c != compressors.end(); ++c)
+ if (c->Extension.empty() == false && c->Extension != ".")
+ ext.push_back(c->Extension);
+ return ext;
+}
+ /*}}}*/
// Compressor constructor /*{{{*/
// ---------------------------------------------------------------------
/* */