diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-item.h | 4 | ||||
-rw-r--r-- | apt-pkg/algorithms.h | 18 | ||||
-rw-r--r-- | apt-pkg/aptconfiguration.cc | 58 | ||||
-rw-r--r-- | apt-pkg/aptconfiguration.h | 3 | ||||
-rw-r--r-- | apt-pkg/cacheset.h | 16 | ||||
-rw-r--r-- | apt-pkg/contrib/configuration.h | 6 | ||||
-rw-r--r-- | apt-pkg/contrib/strutl.h | 4 | ||||
-rw-r--r-- | apt-pkg/deb/debindexfile.cc | 6 | ||||
-rw-r--r-- | apt-pkg/deb/debindexfile.h | 25 | ||||
-rw-r--r-- | apt-pkg/deb/debmetaindex.h | 2 | ||||
-rw-r--r-- | apt-pkg/deb/debsystem.h | 2 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.h | 2 | ||||
-rw-r--r-- | apt-pkg/depcache.h | 10 | ||||
-rw-r--r-- | apt-pkg/indexcopy.h | 4 | ||||
-rw-r--r-- | apt-pkg/indexrecords.h | 2 | ||||
-rw-r--r-- | apt-pkg/install-progress.h | 2 | ||||
-rw-r--r-- | apt-pkg/pkgcache.h | 2 | ||||
-rw-r--r-- | apt-pkg/update.h | 3 |
18 files changed, 85 insertions, 84 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 74b5de675..513c516cd 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -576,7 +576,7 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex * \return \b true if an applicable diff was found, \b false * otherwise. */ - bool QueueNextDiff(); + APT_HIDDEN bool QueueNextDiff(); /** \brief Handle tasks that must be performed after the item * finishes downloading. @@ -589,7 +589,7 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex * \param allDone If \b true, the file was entirely reconstructed, * and its md5sum is verified. */ - void Finish(bool allDone=false); + APT_HIDDEN void Finish(bool allDone=false); protected: diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 4d3bfa81f..b6da1f2bf 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -82,9 +82,9 @@ class pkgSimulate : public pkgPackageManager /*{{{*/ virtual bool Remove(PkgIterator Pkg,bool Purge); private: - void ShortBreaks(); - void Describe(PkgIterator iPkg,std::ostream &out,bool Current,bool Candidate); - + APT_HIDDEN void ShortBreaks(); + APT_HIDDEN void Describe(PkgIterator iPkg,std::ostream &out,bool Current,bool Candidate); + public: pkgSimulate(pkgDepCache *Cache); @@ -114,7 +114,7 @@ class pkgProblemResolver /*{{{*/ // Sort stuff static pkgProblemResolver *This; - static int ScoreSort(const void *a,const void *b) APT_PURE; + APT_HIDDEN static int ScoreSort(const void *a,const void *b) APT_PURE; struct PackageKill { @@ -122,12 +122,12 @@ class pkgProblemResolver /*{{{*/ DepIterator Dep; }; - void MakeScores(); - bool DoUpgrade(pkgCache::PkgIterator Pkg); + APT_HIDDEN void MakeScores(); + APT_HIDDEN bool DoUpgrade(pkgCache::PkgIterator Pkg); + + APT_HIDDEN bool ResolveInternal(bool const BrokenFix = false); + APT_HIDDEN bool ResolveByKeepInternal(); - bool ResolveInternal(bool const BrokenFix = false); - bool ResolveByKeepInternal(); - protected: bool InstOrNewPolicyBroken(pkgCache::PkgIterator Pkg); 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 <apti18n.h> /*}}}*/ 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 diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h index dfed194ae..c7b8d2d73 100644 --- a/apt-pkg/aptconfiguration.h +++ b/apt-pkg/aptconfiguration.h @@ -123,9 +123,6 @@ public: /*{{{*/ /** \return Return a comma-separated list of enabled build profile specifications */ std::string static const getBuildProfilesString(); /*}}}*/ - private: /*{{{*/ - void static setDefaultConfigurationForCompressors(); - /*}}}*/ }; /*}}}*/ } diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index 892ad2dfc..f3f1d1fc6 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -574,21 +574,21 @@ template<> template<class Compare> inline bool PackageContainer<std::vector<pkgC The wrapping is read-only in practice modeled by making erase and co private methods. */ -class PackageUniverse : public PackageContainerInterface { +class APT_HIDDEN PackageUniverse : public PackageContainerInterface { pkgCache * const _cont; public: typedef pkgCache::PkgIterator iterator; typedef pkgCache::PkgIterator const_iterator; - bool empty() const { return false; } - size_t size() const { return _cont->Head().PackageCount; } + APT_PUBLIC bool empty() const { return false; } + APT_PUBLIC size_t size() const { return _cont->Head().PackageCount; } - const_iterator begin() const { return _cont->PkgBegin(); } - const_iterator end() const { return _cont->PkgEnd(); } - iterator begin() { return _cont->PkgBegin(); } - iterator end() { return _cont->PkgEnd(); } + APT_PUBLIC const_iterator begin() const { return _cont->PkgBegin(); } + APT_PUBLIC const_iterator end() const { return _cont->PkgEnd(); } + APT_PUBLIC iterator begin() { return _cont->PkgBegin(); } + APT_PUBLIC iterator end() { return _cont->PkgEnd(); } - PackageUniverse(pkgCache * const Owner) : _cont(Owner) { } + APT_PUBLIC PackageUniverse(pkgCache * const Owner) : _cont(Owner) { } private: bool insert(pkgCache::PkgIterator const &) { return true; } diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h index 03b37bf55..2ecea8bee 100644 --- a/apt-pkg/contrib/configuration.h +++ b/apt-pkg/contrib/configuration.h @@ -34,6 +34,8 @@ #include <vector> #include <iostream> +#include <apt-pkg/macros.h> + #ifndef APT_8_CLEANER_HEADERS using std::string; #endif @@ -59,7 +61,7 @@ class Configuration Item *Root; bool ToFree; - + Item *Lookup(Item *Head,const char *S,unsigned long const &Len,bool const &Create); Item *Lookup(const char *Name,const bool &Create); inline const Item *Lookup(const char *Name) const @@ -123,7 +125,7 @@ class Configuration class MatchAgainstConfig { std::vector<regex_t *> patterns; - void clearPatterns(); + APT_HIDDEN void clearPatterns(); public: MatchAgainstConfig(char const * Config); diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index da8bebdb5..e20ddca9c 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -153,9 +153,9 @@ inline const char *DeNull(const char *s) {return (s == 0?"(null)":s);} class URI { void CopyFrom(const std::string &From); - + public: - + std::string Access; std::string User; std::string Password; diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index f90731dd2..9897df53d 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -131,7 +131,7 @@ string debSourcesIndex::Info(const char *Type) const // SourcesIndex::Index* - Return the URI to the index files /*{{{*/ // --------------------------------------------------------------------- /* */ -inline string debSourcesIndex::IndexFile(const char *Type) const +string debSourcesIndex::IndexFile(const char *Type) const { string s = URItoFileName(IndexURI(Type)); @@ -265,7 +265,7 @@ string debPackagesIndex::Info(const char *Type) const // PackagesIndex::Index* - Return the URI to the index files /*{{{*/ // --------------------------------------------------------------------- /* */ -inline string debPackagesIndex::IndexFile(const char *Type) const +string debPackagesIndex::IndexFile(const char *Type) const { string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type)); @@ -421,7 +421,7 @@ debTranslationsIndex::debTranslationsIndex(string URI,string Dist,string Section // TranslationIndex::Trans* - Return the URI to the translation files /*{{{*/ // --------------------------------------------------------------------- /* */ -inline string debTranslationsIndex::IndexFile(const char *Type) const +string debTranslationsIndex::IndexFile(const char *Type) const { string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type)); diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index 18322dc1b..2e3ff5451 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -65,10 +65,10 @@ class debPackagesIndex : public pkgIndexFile std::string Section; std::string Architecture; - std::string Info(const char *Type) const; - std::string IndexFile(const char *Type) const; - std::string IndexURI(const char *Type) const; - + APT_HIDDEN std::string Info(const char *Type) const; + APT_HIDDEN std::string IndexFile(const char *Type) const; + APT_HIDDEN std::string IndexURI(const char *Type) const; + public: virtual const Type *GetType() const APT_CONST; @@ -102,11 +102,11 @@ class debTranslationsIndex : public pkgIndexFile std::string Section; const char * const Language; - std::string Info(const char *Type) const; - std::string IndexFile(const char *Type) const; - std::string IndexURI(const char *Type) const; + APT_HIDDEN std::string Info(const char *Type) const; + APT_HIDDEN std::string IndexFile(const char *Type) const; + APT_HIDDEN std::string IndexURI(const char *Type) const; - inline std::string TranslationFile() const {return std::string("Translation-").append(Language);}; + APT_HIDDEN std::string TranslationFile() const {return std::string("Translation-").append(Language);}; public: @@ -136,10 +136,10 @@ class debSourcesIndex : public pkgIndexFile std::string Dist; std::string Section; - std::string Info(const char *Type) const; - std::string IndexFile(const char *Type) const; - std::string IndexURI(const char *Type) const; - + APT_HIDDEN std::string Info(const char *Type) const; + APT_HIDDEN std::string IndexFile(const char *Type) const; + APT_HIDDEN std::string IndexURI(const char *Type) const; + public: virtual const Type *GetType() const APT_CONST; @@ -214,6 +214,7 @@ class debDscFileIndex : public pkgIndexFile class debDebianSourceDirIndex : public debDscFileIndex { + public: virtual const Type *GetType() const APT_CONST; }; diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 7091c198f..399543953 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -36,7 +36,7 @@ class debReleaseIndex : public metaIndex { /** \brief dpointer placeholder (for later in case we need it) */ void *d; std::map<std::string, std::vector<debSectionEntry const*> > ArchEntries; - enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; + enum APT_HIDDEN { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; public: diff --git a/apt-pkg/deb/debsystem.h b/apt-pkg/deb/debsystem.h index a945f68fb..226cd60bf 100644 --- a/apt-pkg/deb/debsystem.h +++ b/apt-pkg/deb/debsystem.h @@ -29,7 +29,7 @@ class debSystem : public pkgSystem { // private d-pointer debSystemPrivate *d; - bool CheckUpdates(); + APT_HIDDEN bool CheckUpdates(); public: diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index 6bd6ce0ee..2a6e7e004 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -52,7 +52,7 @@ class pkgDPkgPM : public pkgPackageManager needs to declare a Replaces on the disappeared package. \param pkgname Name of the package that disappeared */ - void handleDisappearAction(std::string const &pkgname); + APT_HIDDEN void handleDisappearAction(std::string const &pkgname); protected: int pkgFailures; diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index bec651279..f9a13dec5 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -91,7 +91,7 @@ class pkgDepCache : protected pkgCache::Namespace * \param follow_suggests If \b true, suggestions of the package * will be recursively marked. */ - void MarkPackage(const pkgCache::PkgIterator &pkg, + APT_HIDDEN void MarkPackage(const pkgCache::PkgIterator &pkg, const pkgCache::VerIterator &ver, bool const &follow_recommends, bool const &follow_suggests); @@ -109,7 +109,7 @@ class pkgDepCache : protected pkgCache::Namespace * * \return \b false if an error occurred. */ - bool MarkRequired(InRootSetFunc &rootFunc); + APT_HIDDEN bool MarkRequired(InRootSetFunc &rootFunc); /** \brief Set the StateCache::Garbage flag on all packages that * should be removed. @@ -120,7 +120,7 @@ class pkgDepCache : protected pkgCache::Namespace * * \return \b false if an error occurred. */ - bool Sweep(); + APT_HIDDEN bool Sweep(); public: @@ -169,7 +169,7 @@ class pkgDepCache : protected pkgCache::Namespace bool released; /** Action groups are noncopyable. */ - ActionGroup(const ActionGroup &other); + APT_HIDDEN ActionGroup(const ActionGroup &other); public: /** \brief Create a new ActionGroup. * @@ -514,7 +514,7 @@ class pkgDepCache : protected pkgCache::Namespace bool const rPurge, unsigned long const Depth, bool const FromUser); private: - bool IsModeChangeOk(ModeList const mode, PkgIterator const &Pkg, + APT_HIDDEN bool IsModeChangeOk(ModeList const mode, PkgIterator const &Pkg, unsigned long const Depth, bool const FromUser); }; diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index 43cdb3f0a..ca33a2cb8 100644 --- a/apt-pkg/indexcopy.h +++ b/apt-pkg/indexcopy.h @@ -93,8 +93,8 @@ class SigVerify /*{{{*/ /** \brief dpointer placeholder (for later in case we need it) */ void *d; - bool Verify(std::string prefix,std::string file, indexRecords *records); - bool CopyMetaIndex(std::string CDROM, std::string CDName, + APT_HIDDEN bool Verify(std::string prefix,std::string file, indexRecords *records); + APT_HIDDEN bool CopyMetaIndex(std::string CDROM, std::string CDName, std::string prefix, std::string file); public: diff --git a/apt-pkg/indexrecords.h b/apt-pkg/indexrecords.h index bb0fd5564..f2d2c775c 100644 --- a/apt-pkg/indexrecords.h +++ b/apt-pkg/indexrecords.h @@ -21,7 +21,7 @@ class indexRecords { - bool parseSumData(const char *&Start, const char *End, std::string &Name, + APT_HIDDEN bool parseSumData(const char *&Start, const char *End, std::string &Name, std::string &Hash, unsigned long long &Size); public: struct checkSum; diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h index 912700e8d..d8b4a5c82 100644 --- a/apt-pkg/install-progress.h +++ b/apt-pkg/install-progress.h @@ -119,7 +119,7 @@ namespace Progress { class PackageManagerFancy : public PackageManager { private: - static void staticSIGWINCH(int); + APT_HIDDEN static void staticSIGWINCH(int); static std::vector<PackageManagerFancy*> instances; APT_HIDDEN bool DrawStatusLine(); diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 6a89eabd7..4f8568205 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -228,7 +228,7 @@ class pkgCache /*{{{*/ private: bool MultiArchEnabled; - PkgIterator SingleArchFindPkg(const std::string &Name); + APT_HIDDEN PkgIterator SingleArchFindPkg(const std::string &Name); }; /*}}}*/ // Header structure /*{{{*/ diff --git a/apt-pkg/update.h b/apt-pkg/update.h index 3835644de..e35cd14f6 100644 --- a/apt-pkg/update.h +++ b/apt-pkg/update.h @@ -11,7 +11,8 @@ #define PKGLIB_UPDATE_H class pkgAcquireStatus; - +class pkgSourceList; +class pkgAcquire; bool ListUpdate(pkgAcquireStatus &progress, pkgSourceList &List, int PulseInterval=0); bool AcquireUpdate(pkgAcquire &Fetcher, int const PulseInterval = 0, |