From 3809194b662f48733916e6248cd0c141f281313d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 29 Sep 2014 15:41:12 +0200 Subject: mark private methods as hidden We are the only possible users of private methods, so we are also the only users who can potentially export them via using them in inline methods. The point is: We don't need these symbols exported if we don't do this, so marking them as hidden removes some methods from the API without breaking anything as nobody could have used them. Git-Dch: Ignore --- apt-pkg/aptconfiguration.cc | 58 ++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'apt-pkg/aptconfiguration.cc') diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 94b6bc246..01b85a74e 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -32,6 +32,35 @@ #include /*}}}*/ namespace APT { +// setDefaultConfigurationForCompressors /*{{{*/ +static void setDefaultConfigurationForCompressors() { + // Set default application paths to check for optional compression types + _config->CndSet("Dir::Bin::bzip2", "/bin/bzip2"); + _config->CndSet("Dir::Bin::xz", "/usr/bin/xz"); + if (FileExists(_config->FindFile("Dir::Bin::xz")) == true) { + _config->Set("Dir::Bin::lzma", _config->FindFile("Dir::Bin::xz")); + _config->Set("APT::Compressor::lzma::Binary", "xz"); + if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) { + _config->Set("APT::Compressor::lzma::CompressArg::", "--format=lzma"); + _config->Set("APT::Compressor::lzma::CompressArg::", "-9"); + } + if (_config->Exists("APT::Compressor::lzma::UncompressArg") == false) { + _config->Set("APT::Compressor::lzma::UncompressArg::", "--format=lzma"); + _config->Set("APT::Compressor::lzma::UncompressArg::", "-d"); + } + } else { + _config->CndSet("Dir::Bin::lzma", "/usr/bin/lzma"); + if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) { + _config->Set("APT::Compressor::lzma::CompressArg::", "--suffix="); + _config->Set("APT::Compressor::lzma::CompressArg::", "-9"); + } + if (_config->Exists("APT::Compressor::lzma::UncompressArg") == false) { + _config->Set("APT::Compressor::lzma::UncompressArg::", "--suffix="); + _config->Set("APT::Compressor::lzma::UncompressArg::", "-d"); + } + } +} + /*}}}*/ // getCompressionTypes - Return Vector of usable compressiontypes /*{{{*/ // --------------------------------------------------------------------- /* return a vector of compression types in the preferred order. */ @@ -402,35 +431,6 @@ bool Configuration::checkArchitecture(std::string const &Arch) { return (std::find(archs.begin(), archs.end(), Arch) != archs.end()); } /*}}}*/ -// setDefaultConfigurationForCompressors /*{{{*/ -void Configuration::setDefaultConfigurationForCompressors() { - // Set default application paths to check for optional compression types - _config->CndSet("Dir::Bin::bzip2", "/bin/bzip2"); - _config->CndSet("Dir::Bin::xz", "/usr/bin/xz"); - if (FileExists(_config->FindFile("Dir::Bin::xz")) == true) { - _config->Set("Dir::Bin::lzma", _config->FindFile("Dir::Bin::xz")); - _config->Set("APT::Compressor::lzma::Binary", "xz"); - if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) { - _config->Set("APT::Compressor::lzma::CompressArg::", "--format=lzma"); - _config->Set("APT::Compressor::lzma::CompressArg::", "-9"); - } - if (_config->Exists("APT::Compressor::lzma::UncompressArg") == false) { - _config->Set("APT::Compressor::lzma::UncompressArg::", "--format=lzma"); - _config->Set("APT::Compressor::lzma::UncompressArg::", "-d"); - } - } else { - _config->CndSet("Dir::Bin::lzma", "/usr/bin/lzma"); - if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) { - _config->Set("APT::Compressor::lzma::CompressArg::", "--suffix="); - _config->Set("APT::Compressor::lzma::CompressArg::", "-9"); - } - if (_config->Exists("APT::Compressor::lzma::UncompressArg") == false) { - _config->Set("APT::Compressor::lzma::UncompressArg::", "--suffix="); - _config->Set("APT::Compressor::lzma::UncompressArg::", "-d"); - } - } -} - /*}}}*/ // getCompressors - Return Vector of usealbe compressors /*{{{*/ // --------------------------------------------------------------------- /* return a vector of compressors used by apt-ftparchive in the -- cgit v1.2.3