diff options
281 files changed, 5170 insertions, 5306 deletions
@@ -9,8 +9,8 @@ endif .PHONY: default default: startup all -.PHONY: headers library clean veryclean all binary program doc -all headers library clean veryclean binary program doc dirs: +.PHONY: headers library clean veryclean all binary program doc test +all headers library clean veryclean binary program doc dirs test: $(MAKE) -C apt-pkg $@ $(MAKE) -C apt-inst $@ $(MAKE) -C methods $@ @@ -19,6 +19,7 @@ all headers library clean veryclean binary program doc dirs: $(MAKE) -C dselect $@ $(MAKE) -C doc $@ $(MAKE) -C po $@ + $(MAKE) -C test $@ # Some very common aliases .PHONY: maintainer-clean dist-clean distclean pristine sanity diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc index 8018f4d30..2dee1a40d 100644 --- a/apt-inst/contrib/arfile.cc +++ b/apt-inst/contrib/arfile.cc @@ -14,13 +14,17 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/arfile.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> #include <apt-pkg/error.h> #include <stdlib.h> - /*}}}*/ + #include <apti18n.h> + /*}}}*/ struct ARArchive::MemberHeader { @@ -112,7 +116,7 @@ bool ARArchive::LoadHeaders() { unsigned int I = sizeof(Head.Name) - 1; for (; Head.Name[I] == ' ' || Head.Name[I] == '/'; I--); - Memb->Name = string(Head.Name,I+1); + Memb->Name = std::string(Head.Name,I+1); } // Account for the AR header alignment diff --git a/apt-inst/contrib/arfile.h b/apt-inst/contrib/arfile.h index 7f6c68302..2be1323d1 100644 --- a/apt-inst/contrib/arfile.h +++ b/apt-inst/contrib/arfile.h @@ -17,7 +17,8 @@ #include <string> -#include <apt-pkg/fileutl.h> + +class FileFd; class ARArchive { @@ -49,12 +50,12 @@ class ARArchive struct ARArchive::Member { // Fields from the header - string Name; + std::string Name; unsigned long MTime; unsigned long UID; unsigned long GID; unsigned long Mode; - unsigned long Size; + unsigned long long Size; // Location of the data. unsigned long Start; diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 01b6b3836..12919a7cd 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -16,8 +16,10 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include <apt-pkg/extracttar.h> +#include<config.h> +#include <apt-pkg/dirstream.h> +#include <apt-pkg/extracttar.h> #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> #include <apt-pkg/configuration.h> @@ -28,6 +30,7 @@ #include <signal.h> #include <fcntl.h> #include <iostream> + #include <apti18n.h> /*}}}*/ diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h index 42f8ef534..8754e8dcc 100644 --- a/apt-inst/contrib/extracttar.h +++ b/apt-inst/contrib/extracttar.h @@ -15,11 +15,10 @@ #define PKGLIB_EXTRACTTAR_H #include <apt-pkg/fileutl.h> -#include <apt-pkg/dirstream.h> -#include <algorithm> +#include <string> -using std::min; +class pkgDirStream; class ExtractTar { @@ -38,7 +37,7 @@ class ExtractTar int GZPid; FileFd InFd; bool Eof; - string DecompressProg; + std::string DecompressProg; // Fork and reap gzip bool StartGzip(); @@ -48,7 +47,7 @@ class ExtractTar bool Go(pkgDirStream &Stream); - ExtractTar(FileFd &Fd,unsigned long Max,string DecompressionProgram); + ExtractTar(FileFd &Fd,unsigned long Max,std::string DecompressionProgram); virtual ~ExtractTar(); }; diff --git a/apt-inst/database.cc b/apt-inst/database.cc index a5020f3d7..da7613491 100644 --- a/apt-inst/database.cc +++ b/apt-inst/database.cc @@ -8,14 +8,18 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/database.h> +#include <apt-pkg/filelist.h> +#include <apt-pkg/pkgcachegen.h> /*}}}*/ // DataBase::GetMetaTmp - Get the temp dir /*{{{*/ // --------------------------------------------------------------------- /* This re-initializes the meta temporary directory if it hasn't yet been inited for this cycle. The flag is the emptyness of MetaDir */ -bool pkgDataBase::GetMetaTmp(string &Dir) +bool pkgDataBase::GetMetaTmp(std::string &Dir) { if (MetaDir.empty() == true) if (InitMetaTmp(MetaDir) == false) @@ -24,3 +28,8 @@ bool pkgDataBase::GetMetaTmp(string &Dir) return true; } /*}}}*/ +pkgDataBase::~pkgDataBase() +{ + delete Cache; + delete FList; +} diff --git a/apt-inst/database.h b/apt-inst/database.h index ef45bc2d6..ccfee3797 100644 --- a/apt-inst/database.h +++ b/apt-inst/database.h @@ -21,17 +21,21 @@ #ifndef PKGLIB_DATABASE_H #define PKGLIB_DATABASE_H -#include <apt-pkg/filelist.h> #include <apt-pkg/pkgcachegen.h> +#include <string> + +class pkgFLCache; +class OpProgress; + class pkgDataBase { protected: pkgCacheGenerator *Cache; pkgFLCache *FList; - string MetaDir; - virtual bool InitMetaTmp(string &Dir) = 0; + std::string MetaDir; + virtual bool InitMetaTmp(std::string &Dir) = 0; public: @@ -40,13 +44,13 @@ class pkgDataBase inline pkgFLCache &GetFLCache() {return *FList;}; inline pkgCacheGenerator &GetGenerator() {return *Cache;}; - bool GetMetaTmp(string &Dir); + bool GetMetaTmp(std::string &Dir); virtual bool ReadyFileList(OpProgress &Progress) = 0; virtual bool ReadyPkgCache(OpProgress &Progress) = 0; virtual bool LoadChanges() = 0; pkgDataBase() : Cache(0), FList(0) {}; - virtual ~pkgDataBase() {delete Cache; delete FList;}; + virtual ~pkgDataBase(); }; #endif diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index a40cd1ae8..4bd065cf8 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -16,6 +16,9 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + +#include <apt-pkg/database.h> #include <apt-pkg/debfile.h> #include <apt-pkg/extracttar.h> #include <apt-pkg/error.h> @@ -105,8 +108,8 @@ bool debDebFile::ExtractControl(pkgDataBase &DB) return false; // Get into the temporary directory - string Cwd = SafeGetCWD(); - string Tmp; + std::string Cwd = SafeGetCWD(); + std::string Tmp; if (DB.GetMetaTmp(Tmp) == false) return false; if (chdir(Tmp.c_str()) != 0) @@ -172,7 +175,7 @@ bool debDebFile::ExtractArchive(pkgDirStream &Stream) pkgCache::VerIterator debDebFile::MergeControl(pkgDataBase &DB) { // Open the control file - string Tmp; + std::string Tmp; if (DB.GetMetaTmp(Tmp) == false) return pkgCache::VerIterator(DB.GetCache()); FileFd Fd(Tmp + "control",FileFd::ReadOnly); diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h index 6b9f8ffc8..2c4734f9e 100644 --- a/apt-inst/deb/debfile.h +++ b/apt-inst/deb/debfile.h @@ -25,9 +25,12 @@ #include <apt-pkg/arfile.h> -#include <apt-pkg/database.h> #include <apt-pkg/dirstream.h> #include <apt-pkg/tagfile.h> +#include <apt-pkg/pkgcache.h> + +class FileFd; +class pkgDataBase; class debDebFile { @@ -68,7 +71,7 @@ class debDebFile::MemControlExtract : public pkgDirStream char *Control; pkgTagSection Section; unsigned long Length; - string Member; + std::string Member; // Members from DirStream virtual bool DoItem(Item &Itm,int &Fd); @@ -81,7 +84,7 @@ class debDebFile::MemControlExtract : public pkgDirStream bool TakeControl(const void *Data,unsigned long Size); MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {}; - MemControlExtract(string Member) : IsControl(false), Control(0), Length(0), Member(Member) {}; + MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {}; ~MemControlExtract() {delete [] Control;}; }; /*}}}*/ diff --git a/apt-inst/deb/dpkgdb.cc b/apt-inst/deb/dpkgdb.cc index a75cf59ca..819c123f6 100644 --- a/apt-inst/deb/dpkgdb.cc +++ b/apt-inst/deb/dpkgdb.cc @@ -13,12 +13,16 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/dpkgdb.h> #include <apt-pkg/configuration.h> #include <apt-pkg/error.h> #include <apt-pkg/progress.h> #include <apt-pkg/tagfile.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> +#include <apt-pkg/filelist.h> #include <stdio.h> #include <errno.h> diff --git a/apt-inst/deb/dpkgdb.h b/apt-inst/deb/dpkgdb.h index 125845f96..f28563a93 100644 --- a/apt-inst/deb/dpkgdb.h +++ b/apt-inst/deb/dpkgdb.h @@ -22,17 +22,22 @@ #include <apt-pkg/database.h> +#include <string> + +class DynamicMMap; +class OpProgress; + class debDpkgDB : public pkgDataBase { protected: - - string AdminDir; + + std::string AdminDir; DynamicMMap *CacheMap; DynamicMMap *FileMap; unsigned long DiverInode; signed long DiverTime; - - virtual bool InitMetaTmp(string &Dir); + + virtual bool InitMetaTmp(std::string &Dir); bool ReadFList(OpProgress &Progress); bool ReadDiversions(); bool ReadConfFiles(); diff --git a/apt-inst/dirstream.cc b/apt-inst/dirstream.cc index 9b6a56848..bb0bf96c1 100644 --- a/apt-inst/dirstream.cc +++ b/apt-inst/dirstream.cc @@ -11,6 +11,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/dirstream.h> #include <apt-pkg/error.h> diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc index cd8edb27a..29e163028 100644 --- a/apt-inst/extract.cc +++ b/apt-inst/extract.cc @@ -44,9 +44,12 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/extract.h> #include <apt-pkg/error.h> #include <apt-pkg/debversion.h> +#include <apt-pkg/fileutl.h> #include <sys/stat.h> #include <stdio.h> diff --git a/apt-inst/extract.h b/apt-inst/extract.h index 71222983c..7143fa409 100644 --- a/apt-inst/extract.h +++ b/apt-inst/extract.h @@ -33,7 +33,7 @@ class pkgExtract : public pkgDirStream bool HandleOverwrites(pkgFLCache::NodeIterator Nde, bool DiverCheck = false); - bool CheckDirReplace(string Dir,unsigned int Depth = 0); + bool CheckDirReplace(std::string Dir,unsigned int Depth = 0); public: diff --git a/apt-inst/filelist.cc b/apt-inst/filelist.cc index 060aa53d7..879c07855 100644 --- a/apt-inst/filelist.cc +++ b/apt-inst/filelist.cc @@ -32,6 +32,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/filelist.h> #include <apt-pkg/mmap.h> #include <apt-pkg/error.h> diff --git a/apt-inst/filelist.h b/apt-inst/filelist.h index c74a310e4..0405d61df 100644 --- a/apt-inst/filelist.h +++ b/apt-inst/filelist.h @@ -28,9 +28,10 @@ #ifndef PKGLIB_FILELIST_H #define PKGLIB_FILELIST_H +#include <apt-pkg/mmap.h> #include <cstring> -#include <apt-pkg/mmap.h> +#include <string> class pkgFLCache { @@ -48,7 +49,7 @@ class pkgFLCache class DiverIterator; protected: - string CacheFile; + std::string CacheFile; DynamicMMap ⤅ map_ptrloc LastTreeLookup; unsigned long LastLookupSize; diff --git a/apt-inst/makefile b/apt-inst/makefile index 32d231240..1b9cc2676 100644 --- a/apt-inst/makefile +++ b/apt-inst/makefile @@ -14,7 +14,7 @@ include ../buildlib/libversion.mak # The library name LIBRARY=apt-inst -MAJOR=1.3 +MAJOR=1.4 MINOR=0 SLIBS=$(PTHREADLIB) -lapt-pkg APT_DOMAIN:=libapt-inst$(MAJOR) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 3112c568d..453fce109 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -13,6 +13,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/acquire-item.h> #include <apt-pkg/configuration.h> #include <apt-pkg/aptconfiguration.h> @@ -23,9 +25,9 @@ #include <apt-pkg/md5.h> #include <apt-pkg/sha1.h> #include <apt-pkg/tagfile.h> +#include <apt-pkg/indexrecords.h> +#include <apt-pkg/metaindex.h> -#include <apti18n.h> - #include <sys/stat.h> #include <unistd.h> #include <errno.h> @@ -33,6 +35,8 @@ #include <sstream> #include <stdio.h> #include <ctime> + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -681,17 +685,17 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/ // remove all patches until the next matching patch is found // this requires the Index file to be ordered for(vector<DiffInfo>::iterator I=available_patches.begin(); - available_patches.size() > 0 && + available_patches.empty() == false && I != available_patches.end() && - (*I).sha1 != local_sha1; - I++) + I->sha1 != local_sha1; + ++I) { available_patches.erase(I); } // error checking and falling back if no patch was found - if(available_patches.size() == 0) - { + if(available_patches.empty() == true) + { Failed("", NULL); return false; } @@ -756,7 +760,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long long Size,string Md5Has chmod(FinalFile.c_str(),0644); // see if there is more to download - if(available_patches.size() > 0) { + if(available_patches.empty() == false) { new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc, ExpectedHash, ServerSha1, available_patches); return Finish(); @@ -1266,9 +1270,9 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long long Size,string Hash, / if (SigFile == "") { // There was no signature file, so we are finished. Download - // the indexes and do only hashsum verification + // the indexes and do only hashsum verification if possible MetaIndexParser->Load(DestFile); - QueueIndexes(true); + QueueIndexes(false); } else { @@ -1383,36 +1387,33 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ #endif for (vector <struct IndexTarget*>::const_iterator Target = IndexTargets->begin(); Target != IndexTargets->end(); - Target++) + ++Target) { HashString ExpectedIndexHash; - if (verify) + const indexRecords::checkSum *Record = MetaIndexParser->Lookup((*Target)->MetaKey); + if (Record == NULL) { - const indexRecords::checkSum *Record = MetaIndexParser->Lookup((*Target)->MetaKey); - if (Record == NULL) + if (verify == true && (*Target)->IsOptional() == false) { - if ((*Target)->IsOptional() == false) - { - Status = StatAuthError; - strprintf(ErrorText, _("Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)"), (*Target)->MetaKey.c_str()); - return; - } + Status = StatAuthError; + strprintf(ErrorText, _("Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)"), (*Target)->MetaKey.c_str()); + return; } - else + } + else + { + ExpectedIndexHash = Record->Hash; + if (_config->FindB("Debug::pkgAcquire::Auth", false)) { - ExpectedIndexHash = Record->Hash; - if (_config->FindB("Debug::pkgAcquire::Auth", false)) - { - std::cerr << "Queueing: " << (*Target)->URI << std::endl; - std::cerr << "Expected Hash: " << ExpectedIndexHash.toStr() << std::endl; - std::cerr << "For: " << Record->MetaKeyFilename << std::endl; - } - if (ExpectedIndexHash.empty() == true && (*Target)->IsOptional() == false) - { - Status = StatAuthError; - strprintf(ErrorText, _("Unable to find hash sum for '%s' in Release file"), (*Target)->MetaKey.c_str()); - return; - } + std::cerr << "Queueing: " << (*Target)->URI << std::endl; + std::cerr << "Expected Hash: " << ExpectedIndexHash.toStr() << std::endl; + std::cerr << "For: " << Record->MetaKeyFilename << std::endl; + } + if (verify == true && ExpectedIndexHash.empty() == true && (*Target)->IsOptional() == false) + { + Status = StatAuthError; + strprintf(ErrorText, _("Unable to find hash sum for '%s' in Release file"), (*Target)->MetaKey.c_str()); + return; } } @@ -1681,7 +1682,7 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, // check if we have one trusted source for the package. if so, switch // to "TrustedOnly" mode - for (pkgCache::VerFileIterator i = Version.FileList(); i.end() == false; i++) + for (pkgCache::VerFileIterator i = Version.FileList(); i.end() == false; ++i) { pkgIndexFile *Index; if (Sources->FindIndex(i.File(),Index) == false) @@ -1718,7 +1719,7 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, bool pkgAcqArchive::QueueNext() { string const ForceHash = _config->Find("Acquire::ForceHash"); - for (; Vf.end() == false; Vf++) + for (; Vf.end() == false; ++Vf) { // Ignore not source sources if ((Vf.File()->Flags & pkgCache::Flag::NotSource) != 0) @@ -1833,7 +1834,7 @@ bool pkgAcqArchive::QueueNext() Desc.ShortDesc = Version.ParentPkg().Name(); QueueURI(Desc); - Vf++; + ++Vf; return true; } return false; @@ -1907,7 +1908,7 @@ void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf) StringToBool(LookupTag(Message,"Transient-Failure"),false) == true) { // Vf = Version.FileList(); - while (Vf.end() == false) Vf++; + while (Vf.end() == false) ++Vf; StoreFilename = string(); Item::Failed(Message,Cnf); return; diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 6c8341b62..27b8e887b 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -21,13 +21,9 @@ #define PKGLIB_ACQUIRE_ITEM_H #include <apt-pkg/acquire.h> -#include <apt-pkg/indexfile.h> -#include <apt-pkg/vendor.h> -#include <apt-pkg/sourcelist.h> -#include <apt-pkg/pkgrecords.h> -#include <apt-pkg/indexrecords.h> #include <apt-pkg/hashes.h> #include <apt-pkg/weakptr.h> +#include <apt-pkg/pkgcache.h> /** \addtogroup acquire * @{ @@ -35,6 +31,10 @@ * \file acquire-item.h */ +class indexRecords; +class pkgRecords; +class pkgSourceList; + /** \brief Represents the process by which a pkgAcquire object should {{{ * retrieve a file or a collection of files. * @@ -74,7 +74,7 @@ class pkgAcquire::Item : public WeakPointable * \param To The new name of #From. If #To exists it will be * overwritten. */ - void Rename(string From,string To); + void Rename(std::string From,std::string To); public: @@ -109,7 +109,7 @@ class pkgAcquire::Item : public WeakPointable /** \brief Contains a textual description of the error encountered * if #Status is #StatError or #StatAuthError. */ - string ErrorText; + std::string ErrorText; /** \brief The size of the object to fetch. */ unsigned long long FileSize; @@ -143,7 +143,7 @@ class pkgAcquire::Item : public WeakPointable * download progress indicator's overall statistics. */ bool Local; - string UsedMirror; + std::string UsedMirror; /** \brief The number of fetch queues into which this item has been * inserted. @@ -158,7 +158,7 @@ class pkgAcquire::Item : public WeakPointable /** \brief The name of the file into which the retrieved object * will be written. */ - string DestFile; + std::string DestFile; /** \brief Invoked by the acquire worker when the object couldn't * be fetched. @@ -173,7 +173,7 @@ class pkgAcquire::Item : public WeakPointable * * \sa pkgAcqMethod */ - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); /** \brief Invoked by the acquire worker when the object was * fetched successfully. @@ -194,7 +194,7 @@ class pkgAcquire::Item : public WeakPointable * * \sa pkgAcqMethod */ - virtual void Done(string Message,unsigned long long Size,string Hash, + virtual void Done(std::string Message,unsigned long long Size,std::string Hash, pkgAcquire::MethodConfig *Cnf); /** \brief Invoked when the worker starts to fetch this object. @@ -206,7 +206,7 @@ class pkgAcquire::Item : public WeakPointable * * \sa pkgAcqMethod */ - virtual void Start(string Message,unsigned long long Size); + virtual void Start(std::string Message,unsigned long long Size); /** \brief Custom headers to be sent to the fetch process. * @@ -216,18 +216,18 @@ class pkgAcquire::Item : public WeakPointable * line, so they should (if nonempty) have a leading newline and * no trailing newline. */ - virtual string Custom600Headers() {return string();}; + virtual std::string Custom600Headers() {return std::string();}; /** \brief A "descriptive" URI-like string. * * \return a URI that should be used to describe what is being fetched. */ - virtual string DescURI() = 0; + virtual std::string DescURI() = 0; /** \brief Short item description. * * \return a brief description of the object being fetched. */ - virtual string ShortDesc() {return DescURI();} + virtual std::string ShortDesc() {return DescURI();} /** \brief Invoked by the worker when the download is completely done. */ virtual void Finished() {}; @@ -237,7 +237,7 @@ class pkgAcquire::Item : public WeakPointable * \return the HashSum of this object, if applicable; otherwise, an * empty string. */ - virtual string HashSum() {return string();}; + virtual std::string HashSum() {return std::string();}; /** \return the acquire process with which this item is associated. */ pkgAcquire *GetOwner() {return Owner;}; @@ -253,7 +253,7 @@ class pkgAcquire::Item : public WeakPointable * * \param FailCode A short failure string that is send */ - void ReportMirrorFailure(string FailCode); + void ReportMirrorFailure(std::string FailCode); /** \brief Initialize an item. @@ -278,10 +278,10 @@ class pkgAcquire::Item : public WeakPointable /** \brief Information about an index patch (aka diff). */ /*{{{*/ struct DiffInfo { /** The filename of the diff. */ - string file; + std::string file; /** The sha1 hash of the diff. */ - string sha1; + std::string sha1; /** The size of the diff. */ unsigned long size; @@ -308,12 +308,12 @@ class pkgAcqSubIndex : public pkgAcquire::Item public: // Specialized action members - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long long Size,string Md5Hash, + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); + virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash, pkgAcquire::MethodConfig *Cnf); - virtual string DescURI() {return Desc.URI;}; - virtual string Custom600Headers(); - virtual bool ParseIndex(string const &IndexFile); + virtual std::string DescURI() {return Desc.URI;}; + virtual std::string Custom600Headers(); + virtual bool ParseIndex(std::string const &IndexFile); /** \brief Create a new pkgAcqSubIndex. * @@ -327,8 +327,8 @@ class pkgAcqSubIndex : public pkgAcquire::Item * * \param ExpectedHash The list file's MD5 signature. */ - pkgAcqSubIndex(pkgAcquire *Owner, string const &URI,string const &URIDesc, - string const &ShortDesc, HashString const &ExpectedHash); + pkgAcqSubIndex(pkgAcquire *Owner, std::string const &URI,std::string const &URIDesc, + std::string const &ShortDesc, HashString const &ExpectedHash); }; /*}}}*/ /** \brief An item that is responsible for fetching an index file of {{{ @@ -352,7 +352,7 @@ class pkgAcqDiffIndex : public pkgAcquire::Item /** \brief The URI of the index file to recreate at our end (either * by downloading it or by applying partial patches). */ - string RealURI; + std::string RealURI; /** \brief The Hash that the real index file should have after * all patches have been applied. @@ -362,20 +362,20 @@ class pkgAcqDiffIndex : public pkgAcquire::Item /** \brief The index file which will be patched to generate the new * file. */ - string CurrentPackagesFile; + std::string CurrentPackagesFile; /** \brief A description of the Packages file (stored in * pkgAcquire::ItemDesc::Description). */ - string Description; + std::string Description; public: // Specialized action members - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long long Size,string Md5Hash, + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); + virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash, pkgAcquire::MethodConfig *Cnf); - virtual string DescURI() {return RealURI + "Index";}; - virtual string Custom600Headers(); + virtual std::string DescURI() {return RealURI + "Index";}; + virtual std::string Custom600Headers(); /** \brief Parse the Index file for a set of Packages diffs. * @@ -387,7 +387,7 @@ class pkgAcqDiffIndex : public pkgAcquire::Item * \return \b true if the Index file was successfully parsed, \b * false otherwise. */ - bool ParseDiffIndex(string IndexDiffFile); + bool ParseDiffIndex(std::string IndexDiffFile); /** \brief Create a new pkgAcqDiffIndex. @@ -402,8 +402,8 @@ class pkgAcqDiffIndex : public pkgAcquire::Item * * \param ExpectedHash The list file's MD5 signature. */ - pkgAcqDiffIndex(pkgAcquire *Owner,string URI,string URIDesc, - string ShortDesc, HashString ExpectedHash); + pkgAcqDiffIndex(pkgAcquire *Owner,std::string URI,std::string URIDesc, + std::string ShortDesc, HashString ExpectedHash); }; /*}}}*/ /** \brief An item that is responsible for fetching all the patches {{{ @@ -460,7 +460,7 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item /** \brief The URI of the package index file that is being * reconstructed. */ - string RealURI; + std::string RealURI; /** \brief The HashSum of the package index file that is being * reconstructed. @@ -468,7 +468,7 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item HashString ExpectedHash; /** A description of the file being downloaded. */ - string Description; + std::string Description; /** The patches that remain to be downloaded, including the patch * being downloaded right now. This list should be ordered so @@ -478,10 +478,10 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item * dictionary instead of relying on ordering and stripping them * off the front? */ - vector<DiffInfo> available_patches; + std::vector<DiffInfo> available_patches; /** Stop applying patches when reaching that sha1 */ - string ServerSha1; + std::string ServerSha1; /** The current status of this patch. */ enum DiffState @@ -506,11 +506,11 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item * This method will fall back to downloading the whole index file * outright; its arguments are ignored. */ - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long long Size,string Md5Hash, + virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash, pkgAcquire::MethodConfig *Cnf); - virtual string DescURI() {return RealURI + "Index";}; + virtual std::string DescURI() {return RealURI + "Index";}; /** \brief Create an index diff item. * @@ -534,10 +534,10 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item * should be ordered so that each diff appears before any diff * that depends on it. */ - pkgAcqIndexDiffs(pkgAcquire *Owner,string URI,string URIDesc, - string ShortDesc, HashString ExpectedHash, - string ServerSha1, - vector<DiffInfo> diffs=vector<DiffInfo>()); + pkgAcqIndexDiffs(pkgAcquire *Owner,std::string URI,std::string URIDesc, + std::string ShortDesc, HashString ExpectedHash, + std::string ServerSha1, + std::vector<DiffInfo> diffs=std::vector<DiffInfo>()); }; /*}}}*/ /** \brief An acquire item that is responsible for fetching an index {{{ @@ -577,7 +577,7 @@ class pkgAcqIndex : public pkgAcquire::Item /** \brief The object that is actually being fetched (minus any * compression-related extensions). */ - string RealURI; + std::string RealURI; /** \brief The expected hashsum of the decompressed index file. */ HashString ExpectedHash; @@ -585,17 +585,17 @@ class pkgAcqIndex : public pkgAcquire::Item /** \brief The compression-related file extensions that are being * added to the downloaded file one by one if first fails (e.g., "gz bz2"). */ - string CompressionExtension; + std::string CompressionExtension; public: // Specialized action members - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long long Size,string Md5Hash, + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); + virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash, pkgAcquire::MethodConfig *Cnf); - virtual string Custom600Headers(); - virtual string DescURI() {return Desc.URI;}; - virtual string HashSum() {return ExpectedHash.toStr(); }; + virtual std::string Custom600Headers(); + virtual std::string DescURI() {return Desc.URI;}; + virtual std::string HashSum() {return ExpectedHash.toStr(); }; /** \brief Create a pkgAcqIndex. * @@ -616,12 +616,12 @@ class pkgAcqIndex : public pkgAcquire::Item * default is ".lzma" or ".bz2" (if the needed binaries are present) * fallback is ".gz" or none. */ - pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc, - string ShortDesc, HashString ExpectedHash, - string compressExt=""); + pkgAcqIndex(pkgAcquire *Owner,std::string URI,std::string URIDesc, + std::string ShortDesc, HashString ExpectedHash, + std::string compressExt=""); pkgAcqIndex(pkgAcquire *Owner, struct IndexTarget const * const Target, HashString const &ExpectedHash, indexRecords const *MetaIndexParser); - void Init(string const &URI, string const &URIDesc, string const &ShortDesc); + void Init(std::string const &URI, std::string const &URIDesc, std::string const &ShortDesc); }; /*}}}*/ /** \brief An acquire item that is responsible for fetching a {{{ @@ -635,8 +635,8 @@ class pkgAcqIndexTrans : public pkgAcqIndex { public: - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual string Custom600Headers(); + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); + virtual std::string Custom600Headers(); /** \brief Create a pkgAcqIndexTrans. * @@ -649,8 +649,8 @@ class pkgAcqIndexTrans : public pkgAcqIndex * * \param ShortDesc A brief description of this index file. */ - pkgAcqIndexTrans(pkgAcquire *Owner,string URI,string URIDesc, - string ShortDesc); + pkgAcqIndexTrans(pkgAcquire *Owner,std::string URI,std::string URIDesc, + std::string ShortDesc); pkgAcqIndexTrans(pkgAcquire *Owner, struct IndexTarget const * const Target, HashString const &ExpectedHash, indexRecords const *MetaIndexParser); }; @@ -660,18 +660,18 @@ class IndexTarget { public: /** \brief A URI from which the index file can be downloaded. */ - string URI; + std::string URI; /** \brief A description of the index file. */ - string Description; + std::string Description; /** \brief A shorter description of the index file. */ - string ShortDesc; + std::string ShortDesc; /** \brief The key by which this index file should be * looked up within the meta signature file. */ - string MetaKey; + std::string MetaKey; virtual bool IsOptional() const { return false; @@ -718,7 +718,7 @@ class pkgAcqMetaSig : public pkgAcquire::Item { protected: /** \brief The last good signature file */ - string LastGoodSig; + std::string LastGoodSig; /** \brief The fetch request that is currently being processed. */ pkgAcquire::ItemDesc Desc; @@ -727,20 +727,20 @@ class pkgAcqMetaSig : public pkgAcquire::Item * never modified; it is used to determine the file that is being * downloaded. */ - string RealURI; + std::string RealURI; /** \brief The URI of the meta-index file to be fetched after the signature. */ - string MetaIndexURI; + std::string MetaIndexURI; /** \brief A "URI-style" description of the meta-index file to be * fetched after the signature. */ - string MetaIndexURIDesc; + std::string MetaIndexURIDesc; /** \brief A brief description of the meta-index file to be fetched * after the signature. */ - string MetaIndexShortDesc; + std::string MetaIndexShortDesc; /** \brief A package-system-specific parser for the meta-index file. */ indexRecords* MetaIndexParser; @@ -750,21 +750,21 @@ class pkgAcqMetaSig : public pkgAcquire::Item * * \todo Why a list of pointers instead of a list of structs? */ - const vector<struct IndexTarget*>* IndexTargets; + const std::vector<struct IndexTarget*>* IndexTargets; public: // Specialized action members - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long long Size,string Md5Hash, + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); + virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash, pkgAcquire::MethodConfig *Cnf); - virtual string Custom600Headers(); - virtual string DescURI() {return RealURI; }; + virtual std::string Custom600Headers(); + virtual std::string DescURI() {return RealURI; }; /** \brief Create a new pkgAcqMetaSig. */ - pkgAcqMetaSig(pkgAcquire *Owner,string URI,string URIDesc, string ShortDesc, - string MetaIndexURI, string MetaIndexURIDesc, string MetaIndexShortDesc, - const vector<struct IndexTarget*>* IndexTargets, + pkgAcqMetaSig(pkgAcquire *Owner,std::string URI,std::string URIDesc, std::string ShortDesc, + std::string MetaIndexURI, std::string MetaIndexURIDesc, std::string MetaIndexShortDesc, + const std::vector<struct IndexTarget*>* IndexTargets, indexRecords* MetaIndexParser); }; /*}}}*/ @@ -787,17 +787,17 @@ class pkgAcqMetaIndex : public pkgAcquire::Item /** \brief The URI that is actually being downloaded; never * modified by pkgAcqMetaIndex. */ - string RealURI; + std::string RealURI; /** \brief The file in which the signature for this index was stored. * * If empty, the signature and the md5sums of the individual * indices will not be checked. */ - string SigFile; + std::string SigFile; /** \brief The index files to download. */ - const vector<struct IndexTarget*>* IndexTargets; + const std::vector<struct IndexTarget*>* IndexTargets; /** \brief The parser for the meta-index file. */ indexRecords* MetaIndexParser; @@ -813,7 +813,7 @@ class pkgAcqMetaIndex : public pkgAcquire::Item * * \return \b true if no fatal errors were encountered. */ - bool VerifyVendor(string Message); + bool VerifyVendor(std::string Message); /** \brief Called when a file is finished being retrieved. * @@ -824,7 +824,7 @@ class pkgAcqMetaIndex : public pkgAcquire::Item * \param Message The message block received from the fetch * subprocess. */ - void RetrievalDone(string Message); + void RetrievalDone(std::string Message); /** \brief Called when authentication succeeded. * @@ -835,7 +835,7 @@ class pkgAcqMetaIndex : public pkgAcquire::Item * \param Message The message block received from the fetch * subprocess. */ - void AuthDone(string Message); + void AuthDone(std::string Message); /** \brief Starts downloading the individual index files. * @@ -850,17 +850,17 @@ class pkgAcqMetaIndex : public pkgAcquire::Item public: // Specialized action members - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long long Size, string Hash, + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); + virtual void Done(std::string Message,unsigned long long Size, std::string Hash, pkgAcquire::MethodConfig *Cnf); - virtual string Custom600Headers(); - virtual string DescURI() {return RealURI; }; + virtual std::string Custom600Headers(); + virtual std::string DescURI() {return RealURI; }; /** \brief Create a new pkgAcqMetaIndex. */ pkgAcqMetaIndex(pkgAcquire *Owner, - string URI,string URIDesc, string ShortDesc, - string SigFile, - const vector<struct IndexTarget*>* IndexTargets, + std::string URI,std::string URIDesc, std::string ShortDesc, + std::string SigFile, + const std::vector<struct IndexTarget*>* IndexTargets, indexRecords* MetaIndexParser); }; /*}}}*/ @@ -868,33 +868,33 @@ class pkgAcqMetaIndex : public pkgAcquire::Item class pkgAcqMetaClearSig : public pkgAcqMetaIndex { /** \brief The URI of the meta-index file for the detached signature */ - string MetaIndexURI; + std::string MetaIndexURI; /** \brief A "URI-style" description of the meta-index file */ - string MetaIndexURIDesc; + std::string MetaIndexURIDesc; /** \brief A brief description of the meta-index file */ - string MetaIndexShortDesc; + std::string MetaIndexShortDesc; /** \brief The URI of the detached meta-signature file if the clearsigned one failed. */ - string MetaSigURI; + std::string MetaSigURI; /** \brief A "URI-style" description of the meta-signature file */ - string MetaSigURIDesc; + std::string MetaSigURIDesc; /** \brief A brief description of the meta-signature file */ - string MetaSigShortDesc; + std::string MetaSigShortDesc; public: - void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual string Custom600Headers(); + void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); + virtual std::string Custom600Headers(); /** \brief Create a new pkgAcqMetaClearSig. */ pkgAcqMetaClearSig(pkgAcquire *Owner, - string const &URI, string const &URIDesc, string const &ShortDesc, - string const &MetaIndexURI, string const &MetaIndexURIDesc, string const &MetaIndexShortDesc, - string const &MetaSigURI, string const &MetaSigURIDesc, string const &MetaSigShortDesc, - const vector<struct IndexTarget*>* IndexTargets, + std::string const &URI, std::string const &URIDesc, std::string const &ShortDesc, + std::string const &MetaIndexURI, std::string const &MetaIndexURIDesc, std::string const &MetaIndexShortDesc, + std::string const &MetaSigURI, std::string const &MetaSigURIDesc, std::string const &MetaSigShortDesc, + const std::vector<struct IndexTarget*>* IndexTargets, indexRecords* MetaIndexParser); }; /*}}}*/ @@ -928,7 +928,7 @@ class pkgAcqArchive : public pkgAcquire::Item /** \brief A location in which the actual filename of the package * should be stored. */ - string &StoreFilename; + std::string &StoreFilename; /** \brief The next file for this version to try to download. */ pkgCache::VerFileIterator Vf; @@ -950,13 +950,13 @@ class pkgAcqArchive : public pkgAcquire::Item public: - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long long Size,string Hash, + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); + virtual void Done(std::string Message,unsigned long long Size,std::string Hash, pkgAcquire::MethodConfig *Cnf); - virtual string DescURI() {return Desc.URI;}; - virtual string ShortDesc() {return Desc.ShortDesc;}; + virtual std::string DescURI() {return Desc.URI;}; + virtual std::string ShortDesc() {return Desc.ShortDesc;}; virtual void Finished(); - virtual string HashSum() {return ExpectedHash.toStr(); }; + virtual std::string HashSum() {return ExpectedHash.toStr(); }; virtual bool IsTrusted(); /** \brief Create a new pkgAcqArchive. @@ -979,7 +979,7 @@ class pkgAcqArchive : public pkgAcquire::Item */ pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, pkgRecords *Recs,pkgCache::VerIterator const &Version, - string &StoreFilename); + std::string &StoreFilename); }; /*}}}*/ /** \brief Retrieve an arbitrary file to the current directory. {{{ @@ -1007,12 +1007,12 @@ class pkgAcqFile : public pkgAcquire::Item public: // Specialized action members - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long long Size,string CalcHash, + virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); + virtual void Done(std::string Message,unsigned long long Size,std::string CalcHash, pkgAcquire::MethodConfig *Cnf); - virtual string DescURI() {return Desc.URI;}; - virtual string HashSum() {return ExpectedHash.toStr(); }; - virtual string Custom600Headers(); + virtual std::string DescURI() {return Desc.URI;}; + virtual std::string HashSum() {return ExpectedHash.toStr(); }; + virtual std::string Custom600Headers(); /** \brief Create a new pkgAcqFile object. * @@ -1045,9 +1045,9 @@ class pkgAcqFile : public pkgAcquire::Item * is the absolute name to which the file should be downloaded. */ - pkgAcqFile(pkgAcquire *Owner, string URI, string Hash, unsigned long long Size, - string Desc, string ShortDesc, - const string &DestDir="", const string &DestFilename="", + pkgAcqFile(pkgAcquire *Owner, std::string URI, std::string Hash, unsigned long long Size, + std::string Desc, std::string ShortDesc, + const std::string &DestDir="", const std::string &DestFilename="", bool IsIndexFile=false); }; /*}}}*/ diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index 8c353beb2..2041fd9e9 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -15,6 +15,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/acquire-method.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> @@ -81,7 +83,7 @@ void pkgAcqMethod::Fail(bool Transient) void pkgAcqMethod::Fail(string Err,bool Transient) { // Strip out junk from the error messages - for (string::iterator I = Err.begin(); I != Err.end(); I++) + for (string::iterator I = Err.begin(); I != Err.end(); ++I) { if (*I == '\r') *I = ' '; @@ -289,12 +291,12 @@ bool pkgAcqMethod::Configuration(string Message) I += Length + 1; for (; I < MsgEnd && *I == ' '; I++); - const char *Equals = I; - for (; Equals < MsgEnd && *Equals != '='; Equals++); - const char *End = Equals; - for (; End < MsgEnd && *End != '\n'; End++); - if (End == Equals) + const char *Equals = (const char*) memchr(I, '=', MsgEnd - I); + if (Equals == NULL) return false; + const char *End = (const char*) memchr(Equals, '\n', MsgEnd - Equals); + if (End == NULL) + End = MsgEnd; Cnf.Set(DeQuoteString(string(I,Equals-I)), DeQuoteString(string(Equals+1,End-Equals-1))); @@ -425,12 +427,8 @@ void pkgAcqMethod::Status(const char *Format,...) to keep the pipeline synchronized. */ void pkgAcqMethod::Redirect(const string &NewURI) { - std::cout << "103 Redirect\nURI: "; - if (Queue != 0) - std::cout << Queue->Uri << "\n"; - else - std::cout << "<UNKNOWN>\n"; - std::cout << "New-URI: " << NewURI << "\n" + std::cout << "103 Redirect\nURI: " << Queue->Uri << "\n" + << "New-URI: " << NewURI << "\n" << "\n" << std::flush; // Change the URI for the request. diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index 6551170c4..c3f042ee0 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -20,11 +20,11 @@ #ifndef PKGLIB_ACQUIRE_METHOD_H #define PKGLIB_ACQUIRE_METHOD_H -#include <apt-pkg/configuration.h> -#include <apt-pkg/strutl.h> - #include <stdarg.h> +#include <string> +#include <vector> + class Hashes; class pkgAcqMethod { @@ -34,8 +34,8 @@ class pkgAcqMethod { FetchItem *Next; - string Uri; - string DestFile; + std::string Uri; + std::string DestFile; time_t LastModified; bool IndexFile; bool FailIgnore; @@ -43,14 +43,14 @@ class pkgAcqMethod struct FetchResult { - string MD5Sum; - string SHA1Sum; - string SHA256Sum; - string SHA512Sum; - vector<string> GPGVOutput; + std::string MD5Sum; + std::string SHA1Sum; + std::string SHA256Sum; + std::string SHA512Sum; + std::vector<std::string> GPGVOutput; time_t LastModified; bool IMSHit; - string Filename; + std::string Filename; unsigned long long Size; unsigned long long ResumePoint; @@ -59,25 +59,25 @@ class pkgAcqMethod }; // State - vector<string> Messages; + std::vector<std::string> Messages; FetchItem *Queue; FetchItem *QueueBack; - string FailReason; - string UsedMirror; - string IP; + std::string FailReason; + std::string UsedMirror; + std::string IP; // Handlers for messages - virtual bool Configuration(string Message); + virtual bool Configuration(std::string Message); virtual bool Fetch(FetchItem * /*Item*/) {return true;}; // Outgoing messages void Fail(bool Transient = false); - inline void Fail(const char *Why, bool Transient = false) {Fail(string(Why),Transient);}; - virtual void Fail(string Why, bool Transient = false); + inline void Fail(const char *Why, bool Transient = false) {Fail(std::string(Why),Transient);}; + virtual void Fail(std::string Why, bool Transient = false); virtual void URIStart(FetchResult &Res); virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0); - bool MediaFail(string Required,string Drive); + bool MediaFail(std::string Required,std::string Drive); virtual void Exit() {}; void PrintStatus(char const * const header, const char* Format, va_list &args) const; @@ -91,11 +91,11 @@ class pkgAcqMethod void Log(const char *Format,...); void Status(const char *Format,...); - void Redirect(const string &NewURI); + void Redirect(const std::string &NewURI); int Run(bool Single = false); - inline void SetFailReason(string Msg) {FailReason = Msg;}; - inline void SetIP(string aIP) {IP = aIP;}; + inline void SetFailReason(std::string Msg) {FailReason = Msg;}; + inline void SetIP(std::string aIP) {IP = aIP;}; pkgAcqMethod(const char *Ver,unsigned long Flags = 0); virtual ~pkgAcqMethod() {}; diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index 3e1fd98db..3bb977e14 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -12,6 +12,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/acquire-worker.h> #include <apt-pkg/acquire-item.h> #include <apt-pkg/configuration.h> @@ -19,18 +21,18 @@ #include <apt-pkg/fileutl.h> #include <apt-pkg/strutl.h> -#include <apti18n.h> - #include <iostream> #include <sstream> #include <fstream> - + #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <signal.h> #include <stdio.h> #include <errno.h> + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -256,9 +258,9 @@ bool pkgAcquire::Worker::RunMessages() CurrentItem = Itm; CurrentSize = 0; - TotalSize = atoi(LookupTag(Message,"Size","0").c_str()); - ResumePoint = atoi(LookupTag(Message,"Resume-Point","0").c_str()); - Itm->Owner->Start(Message,atoi(LookupTag(Message,"Size","0").c_str())); + TotalSize = strtoull(LookupTag(Message,"Size","0").c_str(), NULL, 10); + ResumePoint = strtoull(LookupTag(Message,"Resume-Point","0").c_str(), NULL, 10); + Itm->Owner->Start(Message,strtoull(LookupTag(Message,"Size","0").c_str(), NULL, 10)); // Display update before completion if (Log != 0 && Log->MorePulses == true) @@ -287,7 +289,7 @@ bool pkgAcquire::Worker::RunMessages() Log->Pulse(Owner->GetOwner()); OwnerQ->ItemDone(Itm); - unsigned long long const ServerSize = atoll(LookupTag(Message,"Size","0").c_str()); + unsigned long long const ServerSize = strtoull(LookupTag(Message,"Size","0").c_str(), NULL, 10); if (TotalSize != 0 && ServerSize != TotalSize) _error->Warning("Size of file %s is not what the server reported %s %llu", Owner->DestFile.c_str(), LookupTag(Message,"Size","0").c_str(),TotalSize); diff --git a/apt-pkg/acquire-worker.h b/apt-pkg/acquire-worker.h index ce19091e4..848a6bad7 100644 --- a/apt-pkg/acquire-worker.h +++ b/apt-pkg/acquire-worker.h @@ -79,7 +79,7 @@ class pkgAcquire::Worker : public WeakPointable * * \todo Doesn't this duplicate Config->Access? */ - string Access; + std::string Access; /** \brief The PID of the subprocess. */ pid_t Process; @@ -118,13 +118,13 @@ class pkgAcquire::Worker : public WeakPointable /** \brief The raw text values of messages received from the * worker, in sequence. */ - vector<string> MessageQueue; + std::vector<std::string> MessageQueue; /** \brief Buffers pending writes to the subprocess. * * \todo Wouldn't a std::dequeue be more appropriate? */ - string OutQueue; + std::string OutQueue; /** \brief Common code for the constructor. * @@ -183,7 +183,7 @@ class pkgAcquire::Worker : public WeakPointable * * \return \b true. */ - bool Capabilities(string Message); + bool Capabilities(std::string Message); /** \brief Send a 601 Configuration message (containing the APT * configuration) to the subprocess. @@ -214,7 +214,7 @@ class pkgAcquire::Worker : public WeakPointable * 603 Media Changed, with the Failed field set to \b true if the * user cancelled the media change). */ - bool MediaChange(string Message); + bool MediaChange(std::string Message); /** \brief Invoked when the worked process dies unexpectedly. * @@ -242,7 +242,7 @@ class pkgAcquire::Worker : public WeakPointable /** \brief The most recent status string received from the * subprocess. */ - string Status; + std::string Status; /** \brief How many bytes of the file have been downloaded. Zero * if the current progress of the file cannot be determined. diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 06b0f11f8..cdc3fba4b 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -13,6 +13,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/acquire.h> #include <apt-pkg/acquire-item.h> #include <apt-pkg/acquire-worker.h> @@ -21,8 +23,6 @@ #include <apt-pkg/strutl.h> #include <apt-pkg/fileutl.h> -#include <apti18n.h> - #include <iostream> #include <sstream> #include <stdio.h> @@ -30,6 +30,8 @@ #include <dirent.h> #include <sys/time.h> #include <errno.h> + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -116,7 +118,7 @@ pkgAcquire::~pkgAcquire() /* */ void pkgAcquire::Shutdown() { - while (Items.size() != 0) + while (Items.empty() == false) { if (Items[0]->Status == Item::StatFetching) Items[0]->Status = Item::StatError; @@ -155,7 +157,7 @@ void pkgAcquire::Remove(Item *Itm) I = Items.begin(); } else - I++; + ++I; } } /*}}}*/ @@ -411,7 +413,7 @@ pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall) I->Shutdown(false); // Shut down the items - for (ItemIterator I = Items.begin(); I != Items.end(); I++) + for (ItemIterator I = Items.begin(); I != Items.end(); ++I) (*I)->Finished(); if (_error->PendingError()) @@ -445,6 +447,10 @@ pkgAcquire::Worker *pkgAcquire::WorkerStep(Worker *I) if it is part of the download set. */ bool pkgAcquire::Clean(string Dir) { + // non-existing directories are by definition clean… + if (DirectoryExists(Dir) == false) + return true; + DIR *D = opendir(Dir.c_str()); if (D == 0) return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); @@ -467,7 +473,7 @@ bool pkgAcquire::Clean(string Dir) // Look in the get list ItemCIterator I = Items.begin(); - for (; I != Items.end(); I++) + for (; I != Items.end(); ++I) if (flNotDir((*I)->DestFile) == Dir->d_name) break; @@ -488,7 +494,7 @@ bool pkgAcquire::Clean(string Dir) unsigned long long pkgAcquire::TotalNeeded() { unsigned long long Total = 0; - for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); I++) + for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); ++I) Total += (*I)->FileSize; return Total; } @@ -499,7 +505,7 @@ unsigned long long pkgAcquire::TotalNeeded() unsigned long long pkgAcquire::FetchNeeded() { unsigned long long Total = 0; - for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); I++) + for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); ++I) if ((*I)->Local == false) Total += (*I)->FileSize; return Total; @@ -511,7 +517,7 @@ unsigned long long pkgAcquire::FetchNeeded() unsigned long long pkgAcquire::PartialPresent() { unsigned long long Total = 0; - for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); I++) + for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); ++I) if ((*I)->Local == false) Total += (*I)->PartialSize; return Total; @@ -781,11 +787,11 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) unsigned int Unknown = 0; unsigned int Count = 0; for (pkgAcquire::ItemCIterator I = Owner->ItemsBegin(); I != Owner->ItemsEnd(); - I++, Count++) + ++I, ++Count) { TotalItems++; if ((*I)->Status == pkgAcquire::Item::StatDone) - CurrentItems++; + ++CurrentItems; // Totally ignore local items if ((*I)->Local == true) @@ -795,7 +801,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) if ((*I)->Complete == true) CurrentBytes += (*I)->FileSize; if ((*I)->FileSize == 0 && (*I)->Complete == false) - Unknown++; + ++Unknown; } // Compute the current completion diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index ae555df22..93772403d 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -72,10 +72,6 @@ #include <vector> #include <string> -using std::vector; -using std::string; - - #include <sys/time.h> #include <unistd.h> @@ -107,8 +103,8 @@ class pkgAcquire friend class Item; friend class Queue; - typedef vector<Item *>::iterator ItemIterator; - typedef vector<Item *>::const_iterator ItemCIterator; + typedef std::vector<Item *>::iterator ItemIterator; + typedef std::vector<Item *>::const_iterator ItemCIterator; protected: @@ -117,7 +113,7 @@ class pkgAcquire * This is built monotonically as items are created and only * emptied when the download shuts down. */ - vector<Item *> Items; + std::vector<Item *> Items; /** \brief The head of the list of active queues. * @@ -202,7 +198,7 @@ class pkgAcquire * \return the string-name of the queue in which a fetch request * for the given URI should be placed. */ - string QueueName(string URI,MethodConfig const *&Config); + std::string QueueName(std::string URI,MethodConfig const *&Config); /** \brief Build up the set of file descriptors upon which select() should * block. @@ -248,7 +244,7 @@ class pkgAcquire * * \return the method whose name is Access, or \b NULL if no such method exists. */ - MethodConfig *GetConfig(string Access); + MethodConfig *GetConfig(std::string Access); /** \brief Provides information on how a download terminated. */ enum RunResult { @@ -319,7 +315,7 @@ class pkgAcquire * * \return \b true if the directory exists and is readable. */ - bool Clean(string Dir); + bool Clean(std::string Dir); /** \return the total size in bytes of all the items included in * this download. @@ -347,7 +343,7 @@ class pkgAcquire * only one Acquire class is in action at the time or an empty string * if no lock file should be used. */ - bool Setup(pkgAcquireStatus *Progress = NULL, string const &Lock = ""); + bool Setup(pkgAcquireStatus *Progress = NULL, std::string const &Lock = ""); void SetLog(pkgAcquireStatus *Progress) { Log = Progress; } @@ -372,11 +368,11 @@ class pkgAcquire struct pkgAcquire::ItemDesc : public WeakPointable { /** \brief The URI from which to download this item. */ - string URI; + std::string URI; /** brief A description of this item. */ - string Description; + std::string Description; /** brief A shorter description of this item. */ - string ShortDesc; + std::string ShortDesc; /** brief The underlying item which is to be downloaded. */ Item *Owner; }; @@ -420,7 +416,7 @@ class pkgAcquire::Queue }; /** \brief The name of this queue. */ - string Name; + std::string Name; /** \brief The head of the list of items contained in this queue. * @@ -475,7 +471,7 @@ class pkgAcquire::Queue * \return the first item in the queue whose URI is #URI and that * is being downloaded by #Owner. */ - QItem *FindItem(string URI,pkgAcquire::Worker *Owner); + QItem *FindItem(std::string URI,pkgAcquire::Worker *Owner); /** Presumably this should start downloading an item? * @@ -538,7 +534,7 @@ class pkgAcquire::Queue * \param Name The name of the new queue. * \param Owner The download process that owns the new queue. */ - Queue(string Name,pkgAcquire *Owner); + Queue(std::string Name,pkgAcquire *Owner); /** Shut down all the worker processes associated with this queue * and empty the queue. @@ -603,10 +599,10 @@ struct pkgAcquire::MethodConfig MethodConfig *Next; /** \brief The name of this acquire method (e.g., http). */ - string Access; + std::string Access; /** \brief The implementation version of this acquire method. */ - string Version; + std::string Version; /** \brief If \b true, only one download queue should be created for this * method. @@ -748,7 +744,7 @@ class pkgAcquireStatus * \todo This is a horrible blocking monster; it should be CPSed * with prejudice. */ - virtual bool MediaChange(string Media,string Drive) = 0; + virtual bool MediaChange(std::string Media,std::string Drive) = 0; /** \brief Invoked when an item is confirmed to be up-to-date. diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 8737c5334..f7a333606 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -14,6 +14,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/algorithms.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> @@ -21,14 +23,17 @@ #include <apt-pkg/sptr.h> #include <apt-pkg/acquire-item.h> #include <apt-pkg/edsp.h> +#include <apt-pkg/sourcelist.h> +#include <apt-pkg/fileutl.h> +#include <apt-pkg/progress.h> -#include <apti18n.h> #include <sys/types.h> #include <cstdlib> #include <algorithm> #include <iostream> - #include <stdio.h> + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -94,7 +99,7 @@ bool pkgSimulate::Install(PkgIterator iPkg,string /*File*/) Sim.MarkInstall(Pkg,false); // Look for broken conflicts+predepends. - for (PkgIterator I = Sim.PkgBegin(); I.end() == false; I++) + for (PkgIterator I = Sim.PkgBegin(); I.end() == false; ++I) { if (Sim[I].InstallVer == 0) continue; @@ -143,7 +148,7 @@ bool pkgSimulate::Configure(PkgIterator iPkg) Sim.Update(); // Print out each package and the failed dependencies - for (pkgCache::DepIterator D = Sim[Pkg].InstVerIter(Sim).DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = Sim[Pkg].InstVerIter(Sim).DependsList(); D.end() == false; ++D) { if (Sim.IsImportantDep(D) == false || (Sim[D] & pkgDepCache::DepInstall) != 0) @@ -207,7 +212,7 @@ bool pkgSimulate::Remove(PkgIterator iPkg,bool Purge) void pkgSimulate::ShortBreaks() { cout << " ["; - for (PkgIterator I = Sim.PkgBegin(); I.end() == false; I++) + for (PkgIterator I = Sim.PkgBegin(); I.end() == false; ++I) { if (Sim[I].InstBroken() == true) { @@ -229,7 +234,7 @@ bool pkgApplyStatus(pkgDepCache &Cache) { pkgDepCache::ActionGroup group(Cache); - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if (I->VersionList == 0) continue; @@ -298,13 +303,13 @@ bool pkgFixBroken(pkgDepCache &Cache) pkgDepCache::ActionGroup group(Cache); // Auto upgrade all broken packages - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) if (Cache[I].NowBroken() == true) Cache.MarkInstall(I, true, 0, false); /* Fix packages that are in a NeedArchive state but don't have a downloadable install version */ - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if (I.State() != pkgCache::PkgIterator::NeedsUnpack || Cache[I].Delete() == true) @@ -347,19 +352,19 @@ bool pkgDistUpgrade(pkgDepCache &Cache) /* Auto upgrade all installed packages, this provides the basis for the installation */ - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) if (I->CurrentVer != 0) Cache.MarkInstall(I, true, 0, false); /* Now, auto upgrade all essential packages - this ensures that the essential packages are present and working */ - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) if ((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential) Cache.MarkInstall(I, true, 0, false); /* We do it again over all previously installed packages to force conflict resolution on them all. */ - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) if (I->CurrentVer != 0) Cache.MarkInstall(I, false, 0, false); @@ -368,7 +373,7 @@ bool pkgDistUpgrade(pkgDepCache &Cache) // Hold back held packages. if (_config->FindB("APT::Ignore-Hold",false) == false) { - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if (I->SelectedState == pkgCache::State::Hold) { @@ -402,7 +407,7 @@ bool pkgAllUpgrade(pkgDepCache &Cache) return false; // Upgrade all installed packages - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if (Cache[I].Install() == true) Fix.Protect(I); @@ -436,7 +441,7 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache) do { Change = false; - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { // Not interesting if (Cache[I].Upgrade() == false || Cache[I].NewInstall() == true) @@ -453,7 +458,7 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache) Change = true; } } - Count++; + ++Count; } while (Change == true && Count < 10); @@ -540,7 +545,7 @@ void pkgProblemResolver::MakeScores() << " AddEssential => " << AddEssential << endl; // Generate the base scores for a package based on its properties - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if (Cache[I].InstallVer == 0) continue; @@ -567,12 +572,12 @@ void pkgProblemResolver::MakeScores() } // Now that we have the base scores we go and propogate dependencies - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if (Cache[I].InstallVer == 0) continue; - for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false; ++D) { if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) @@ -589,12 +594,12 @@ void pkgProblemResolver::MakeScores() /* Now we cause 1 level of dependency inheritance, that is we add the score of the packages that depend on the target Package. This fortifies high scoring packages */ - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if (Cache[I].InstallVer == 0) continue; - for (pkgCache::DepIterator D = I.RevDependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = I.RevDependsList(); D.end() == false; ++D) { // Only do it for the install version if ((pkgCache::Version *)D.ParentVer() != Cache[D.ParentPkg()].InstallVer || @@ -609,9 +614,9 @@ void pkgProblemResolver::MakeScores() /* Now we propogate along provides. This makes the packages that provide important packages extremely important */ - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { - for (pkgCache::PrvIterator P = I.ProvidesList(); P.end() == false; P++) + for (pkgCache::PrvIterator P = I.ProvidesList(); P.end() == false; ++P) { // Only do it once per package if ((pkgCache::Version *)P.OwnerVer() != Cache[P.OwnerPkg()].InstallVer) @@ -622,7 +627,7 @@ void pkgProblemResolver::MakeScores() /* Protected things are pushed really high up. This number should put them ahead of everything */ - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if ((Flags[I->ID] & Protected) != 0) Scores[I->ID] += AddProtected; @@ -719,7 +724,7 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) if (Start == End) break; - Start++; + ++Start; } if (Fail == true) break; @@ -776,7 +781,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) do { Again = false; - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if (Cache[I].Install() == true) Flags[I->ID] |= PreInstalled; @@ -809,7 +814,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) would cause the removal of even lower score packages. */ SPtrArray<pkgCache::Package *> PList = new pkgCache::Package *[Size]; pkgCache::Package **PEnd = PList; - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) *PEnd++ = I; This = this; qsort(PList,PEnd - PList,sizeof(*PList),&ScoreSort); @@ -929,7 +934,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) } else { - Start++; + ++Start; // We only worry about critical deps. if (Start.IsCritical() != true) continue; @@ -1030,7 +1035,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) if (BrokenFix == false || DoUpgrade(I) == false) { // Consider other options - if (InOr == false) + if (InOr == false || Cache[I].Garbage == true) { if (Debug == true) clog << " Removing " << I.FullName(false) << " rather than change " << Start.TargetPkg().FullName(false) << endl; @@ -1178,7 +1183,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) { // See if this is the result of a hold pkgCache::PkgIterator I = Cache.PkgBegin(); - for (;I.end() != true; I++) + for (;I.end() != true; ++I) { if (Cache[I].InstBroken() == false) continue; @@ -1190,7 +1195,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) // set the auto-flags (mvo: I'm not sure if we _really_ need this) pkgCache::PkgIterator I = Cache.PkgBegin(); - for (;I.end() != true; I++) { + for (;I.end() != true; ++I) { if (Cache[I].NewInstall() && !(Flags[I->ID] & PreInstalled)) { if(_config->FindI("Debug::pkgAutoRemove",false)) { std::clog << "Resolve installed new pkg: " << I.FullName(false) @@ -1204,7 +1209,6 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) return true; } /*}}}*/ - // ProblemResolver::BreaksInstOrPolicy - Check if the given pkg is broken/*{{{*/ // --------------------------------------------------------------------- /* This checks if the given package is broken either by a hard dependency @@ -1216,19 +1220,26 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix) */ bool pkgProblemResolver::InstOrNewPolicyBroken(pkgCache::PkgIterator I) { - // a broken install is always a problem if (Cache[I].InstBroken() == true) + { + if (Debug == true) + std::clog << " Dependencies are not satisfied for " << I << std::endl; return true; + } // a newly broken policy (recommends/suggests) is a problem if (Cache[I].NowPolicyBroken() == false && Cache[I].InstPolicyBroken() == true) + { + if (Debug == true) + std::clog << " Policy breaks with upgrade of " << I << std::endl; return true; - + } + return false; } - + /*}}}*/ // ProblemResolver::ResolveByKeep - Resolve problems using keep /*{{{*/ // --------------------------------------------------------------------- /* This is the work horse of the soft upgrade routine. It is very gental @@ -1263,7 +1274,7 @@ bool pkgProblemResolver::ResolveByKeepInternal() would cause the removal of even lower score packages. */ pkgCache::Package **PList = new pkgCache::Package *[Size]; pkgCache::Package **PEnd = PList; - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) *PEnd++ = I; This = this; qsort(PList,PEnd - PList,sizeof(*PList),&ScoreSort); @@ -1360,7 +1371,7 @@ bool pkgProblemResolver::ResolveByKeepInternal() if (Start == End) break; - Start++; + ++Start; } if (InstOrNewPolicyBroken(I) == false) @@ -1387,7 +1398,7 @@ void pkgProblemResolver::InstallProtect() { pkgDepCache::ActionGroup group(Cache); - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if ((Flags[I->ID] & Protected) == Protected) { @@ -1434,7 +1445,7 @@ void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List) qsort(List,Count,sizeof(*List),PrioComp); } /*}}}*/ -// CacheFile::ListUpdate - update the cache files /*{{{*/ +// ListUpdate - update the cache files /*{{{*/ // --------------------------------------------------------------------- /* This is a simple wrapper to update the cache. it will fetch stuff * from the network (or any other sources defined in sources.list) @@ -1467,7 +1478,7 @@ bool ListUpdate(pkgAcquireStatus &Stat, bool Failed = false; bool TransientNetworkFailure = false; for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); - I != Fetcher.ItemsEnd(); I++) + I != Fetcher.ItemsEnd(); ++I) { if ((*I)->Status == pkgAcquire::Item::StatDone) continue; diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 86d5fbd53..948fe1103 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -33,11 +33,10 @@ #include <apt-pkg/packagemanager.h> #include <apt-pkg/depcache.h> -#include <apt-pkg/acquire.h> #include <iostream> -using std::ostream; +class pkgAcquireStatus; class pkgSimulate : public pkgPackageManager /*{{{*/ { @@ -63,13 +62,13 @@ class pkgSimulate : public pkgPackageManager /*{{{*/ pkgDepCache::ActionGroup group; // The Actuall installation implementation - virtual bool Install(PkgIterator Pkg,string File); + virtual bool Install(PkgIterator Pkg,std::string File); virtual bool Configure(PkgIterator Pkg); virtual bool Remove(PkgIterator Pkg,bool Purge); private: void ShortBreaks(); - void Describe(PkgIterator iPkg,ostream &out,bool Current,bool Candidate); + void Describe(PkgIterator iPkg,std::ostream &out,bool Current,bool Candidate); public: diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 9ccbeecf1..7441b452c 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -8,6 +8,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/aptconfiguration.h> #include <apt-pkg/configuration.h> #include <apt-pkg/error.h> @@ -53,14 +55,14 @@ const Configuration::getCompressionTypes(bool const &Cached) { // load the order setting into our vector std::vector<std::string> const order = _config->FindVector("Acquire::CompressionTypes::Order"); for (std::vector<std::string>::const_iterator o = order.begin(); - o != order.end(); o++) { + o != order.end(); ++o) { if ((*o).empty() == true) continue; // ignore types we have no method ready to use - if (_config->Exists(string("Acquire::CompressionTypes::").append(*o)) == false) + if (_config->Exists(std::string("Acquire::CompressionTypes::").append(*o)) == false) continue; // ignore types we have no app ready to use - string const appsetting = string("Dir::Bin::").append(*o); + std::string const appsetting = std::string("Dir::Bin::").append(*o); if (_config->Exists(appsetting) == true) { std::string const app = _config->FindFile(appsetting.c_str(), ""); if (app.empty() == false && FileExists(app) == false) @@ -81,7 +83,7 @@ const Configuration::getCompressionTypes(bool const &Cached) { if (std::find(types.begin(),types.end(),Types->Tag) != types.end()) continue; // ignore types we have no app ready to use - string const appsetting = string("Dir::Bin::").append(Types->Value); + std::string const appsetting = std::string("Dir::Bin::").append(Types->Value); if (appsetting.empty() == false && _config->Exists(appsetting) == true) { std::string const app = _config->FindFile(appsetting.c_str(), ""); if (app.empty() == false && FileExists(app) == false) @@ -93,7 +95,7 @@ const Configuration::getCompressionTypes(bool const &Cached) { // add the special "uncompressed" type if (std::find(types.begin(), types.end(), "uncompressed") == types.end()) { - string const uncompr = _config->FindFile("Dir::Bin::uncompressed", ""); + std::string const uncompr = _config->FindFile("Dir::Bin::uncompressed", ""); if (uncompr.empty() == true || FileExists(uncompr) == true) types.push_back("uncompressed"); } @@ -140,7 +142,7 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All, for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) { string const name = Ent->d_name; size_t const foundDash = name.rfind("-"); - size_t const foundUnderscore = name.rfind("_"); + size_t const foundUnderscore = name.rfind("_", foundDash); if (foundDash == string::npos || foundUnderscore == string::npos || foundDash <= foundUnderscore || name.substr(foundUnderscore+1, foundDash-(foundUnderscore+1)) != "Translation") @@ -151,7 +153,7 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All, // Skip unusual files, like backups or that alike string::const_iterator s = c.begin(); for (;s != c.end(); ++s) { - if (isalpha(*s) == 0) + if (isalpha(*s) == 0 && *s != '_') break; } if (s != c.end()) @@ -232,6 +234,8 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All, codes = environment; } else if (forceLang != "none") codes.push_back(forceLang); + else //if (forceLang == "none") + builtin.clear(); allCodes = codes; for (std::vector<string>::const_iterator b = builtin.begin(); b != builtin.end(); ++b) @@ -274,7 +278,7 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All, // then needed and ensure the codes are not listed twice. bool noneSeen = false; for (std::vector<string>::const_iterator l = lang.begin(); - l != lang.end(); l++) { + l != lang.end(); ++l) { if (*l == "environment") { for (std::vector<string>::const_iterator e = environment.begin(); e != environment.end(); ++e) { @@ -439,7 +443,7 @@ Configuration::Compressor::Compressor(char const *name, char const *extension, char const *binary, char const *compressArg, char const *uncompressArg, unsigned short const cost) { - std::string const config = string("APT:Compressor::").append(name).append("::"); + std::string const config = std::string("APT:Compressor::").append(name).append("::"); Name = _config->Find(std::string(config).append("Name"), name); Extension = _config->Find(std::string(config).append("Extension"), extension); Binary = _config->Find(std::string(config).append("Binary"), binary); diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h index 1f0399dd2..e098d0fd6 100644 --- a/apt-pkg/aptconfiguration.h +++ b/apt-pkg/aptconfiguration.h @@ -13,6 +13,7 @@ // Include Files /*{{{*/ #include <string> #include <vector> +#include <limits> /*}}}*/ namespace APT { class Configuration { /*{{{*/ @@ -94,7 +95,7 @@ public: /*{{{*/ Compressor(char const *name, char const *extension, char const *binary, char const *compressArg, char const *uncompressArg, unsigned short const cost); - Compressor() {}; + Compressor() : Cost(std::numeric_limits<unsigned short>::max()) {}; }; /** \brief Return a vector of Compressors supported for data.tar's diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 964c5bd8b..1b8d91a44 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -12,6 +12,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/cachefile.h> #include <apt-pkg/error.h> #include <apt-pkg/sourcelist.h> @@ -21,7 +23,8 @@ #include <apt-pkg/pkgsystem.h> #include <apt-pkg/acquire-item.h> #include <apt-pkg/fileutl.h> - +#include <apt-pkg/progress.h> + #include <apti18n.h> /*}}}*/ // CacheFile::CacheFile - Constructor /*{{{*/ @@ -163,6 +166,20 @@ bool pkgCacheFile::Open(OpProgress *Progress, bool WithLock) return true; } /*}}}*/ +// CacheFile::RemoveCaches - remove all cache files from disk /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void pkgCacheFile::RemoveCaches() +{ + std::string const pkgcache = _config->FindFile("Dir::cache::pkgcache"); + std::string const srcpkgcache = _config->FindFile("Dir::cache::srcpkgcache"); + + if (pkgcache.empty() == false && RealFileExists(pkgcache) == true) + unlink(pkgcache.c_str()); + if (srcpkgcache.empty() == false && RealFileExists(srcpkgcache) == true) + unlink(srcpkgcache.c_str()); +} + /*}}}*/ // CacheFile::Close - close the cache files /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h index d07337d38..b56e42855 100644 --- a/apt-pkg/cachefile.h +++ b/apt-pkg/cachefile.h @@ -17,11 +17,12 @@ #ifndef PKGLIB_CACHEFILE_H #define PKGLIB_CACHEFILE_H - #include <apt-pkg/depcache.h> -#include <apt-pkg/acquire.h> -#include <apt-pkg/policy.h> -#include <apt-pkg/sourcelist.h> +#include <apt-pkg/macros.h> + +class pkgPolicy; +class pkgSourceList; +class OpProgress; class pkgCacheFile { @@ -60,6 +61,7 @@ class pkgCacheFile bool Open(OpProgress *Progress = NULL, bool WithLock = true); inline bool ReadOnlyOpen(OpProgress *Progress = NULL) { return Open(Progress, false); }; __deprecated bool Open(OpProgress &Progress,bool const &WithLock = true) { return Open(&Progress, WithLock); }; + static void RemoveCaches(); void Close(); inline pkgCache* GetPkgCache() { BuildCaches(NULL, false); return Cache; }; diff --git a/apt-pkg/cachefilter.cc b/apt-pkg/cachefilter.cc index 8f0725ea3..210a9a9ab 100644 --- a/apt-pkg/cachefilter.cc +++ b/apt-pkg/cachefilter.cc @@ -4,6 +4,8 @@ Collection of functor classes */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/cachefilter.h> #include <apt-pkg/error.h> #include <apt-pkg/pkgcache.h> diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index b97a1a589..5382f3838 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -32,6 +32,7 @@ #include<iterator> #include<string.h> + // abstract Iterator template /*{{{*/ /* This template provides the very basic iterator methods we need to have for doing some walk-over-the-cache magic */ @@ -111,7 +112,7 @@ class pkgCache::GrpIterator: public Iterator<Group, GrpIterator> { inline const char *Name() const {return S->Name == 0?0:Owner->StrP + S->Name;}; inline PkgIterator PackageList() const; - PkgIterator FindPkg(string Arch = "any") const; + PkgIterator FindPkg(std::string Arch = "any") const; /** \brief find the package with the "best" architecture The best architecture is either the "native" or the first @@ -219,7 +220,7 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> { inline VerFileIterator FileList() const; bool Downloadable() const; inline const char *PriorityType() const {return Owner->Priority(S->Priority);}; - string RelStr() const; + std::string RelStr() const; bool Automatic() const; VerFileIterator NewestFile() const; @@ -365,7 +366,7 @@ class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator> inline const char *IndexType() const {return S->IndexType == 0?0:Owner->StrP + S->IndexType;}; bool IsOk(); - string RelStr(); + std::string RelStr(); // Constructors inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {}; diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index a1de613e2..6b95eab70 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -9,18 +9,23 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/aptconfiguration.h> +#include <apt-pkg/cachefile.h> #include <apt-pkg/cachefilter.h> #include <apt-pkg/cacheset.h> #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> #include <apt-pkg/versionmatch.h> - -#include <apti18n.h> +#include <apt-pkg/pkgrecords.h> +#include <apt-pkg/policy.h> #include <vector> #include <regex.h> + +#include <apti18n.h> /*}}}*/ namespace APT { // FromTask - Return all packages in the cache from a specific task /*{{{*/ @@ -296,7 +301,7 @@ APT::VersionSet VersionSet::FromString(pkgCacheFile &Cache, std::string pkg, std::string ver; bool verIsRel = false; size_t const vertag = pkg.find_last_of("/="); - if (vertag != string::npos) { + if (vertag != std::string::npos) { ver = pkg.substr(vertag+1); verIsRel = (pkg[vertag] == '/'); pkg.erase(vertag); @@ -314,7 +319,7 @@ APT::VersionSet VersionSet::FromString(pkgCacheFile &Cache, std::string pkg, errors = helper.showErrors(false); for (PackageSet::const_iterator P = pkgset.begin(); P != pkgset.end(); ++P) { - if (vertag == string::npos) { + if (vertag == std::string::npos) { verset.insert(VersionSet::FromPackage(Cache, P, fallback, helper)); continue; } diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index 061d0a2f4..3b1118bdc 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -16,9 +16,12 @@ #include <set> #include <string> -#include <apt-pkg/cachefile.h> +#include <apt-pkg/error.h> #include <apt-pkg/pkgcache.h> /*}}}*/ + +class pkgCacheFile; + namespace APT { class PackageSet; class VersionSet; @@ -37,10 +40,10 @@ public: /*{{{*/ ShowError(ShowError), ErrorType(ErrorType) {}; virtual ~CacheSetHelper() {}; - virtual void showTaskSelection(PackageSet const &pkgset, string const &pattern) {}; - virtual void showRegExSelection(PackageSet const &pkgset, string const &pattern) {}; + virtual void showTaskSelection(PackageSet const &pkgset, std::string const &pattern) {}; + virtual void showRegExSelection(PackageSet const &pkgset, std::string const &pattern) {}; virtual void showSelectedVersion(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const Ver, - string const &ver, bool const &verIsRel) {}; + std::string const &ver, bool const &verIsRel) {}; virtual pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str); virtual PackageSet canNotFindTask(pkgCacheFile &Cache, std::string pattern); @@ -265,7 +268,7 @@ public: /*{{{*/ inline pkgCache::VerFileIterator FileList() const { return (**this).FileList(); }; inline bool Downloadable() const { return (**this).Downloadable(); }; inline const char *PriorityType() const { return (**this).PriorityType(); }; - inline string RelStr() const { return (**this).RelStr(); }; + inline std::string RelStr() const { return (**this).RelStr(); }; inline bool Automatic() const { return (**this).Automatic(); }; inline pkgCache::VerFileIterator NewestFile() const { return (**this).NewestFile(); }; }; diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 0ad1c69e5..a9c63fd21 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -1,5 +1,6 @@ /* */ +#include<config.h> #include<apt-pkg/init.h> #include<apt-pkg/error.h> @@ -7,11 +8,11 @@ #include<apt-pkg/strutl.h> #include<apt-pkg/cdrom.h> #include<apt-pkg/aptconfiguration.h> +#include<apt-pkg/configuration.h> +#include<apt-pkg/fileutl.h> #include<sstream> #include<fstream> -#include<config.h> -#include<apti18n.h> #include <sys/stat.h> #include <fcntl.h> #include <dirent.h> @@ -22,6 +23,8 @@ #include "indexcopy.h" +#include<apti18n.h> + using namespace std; // FindPackages - Find the package files on the CDROM /*{{{*/ @@ -310,7 +313,7 @@ void pkgCdrom::ReduceSourcelist(string CD,vector<string> &List) sort(List.begin(),List.end()); // Collect similar entries - for (vector<string>::iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) { // Find a space.. string::size_type Space = (*I).find(' '); @@ -322,7 +325,7 @@ void pkgCdrom::ReduceSourcelist(string CD,vector<string> &List) string Word1 = string(*I,Space,SSpace-Space); string Prefix = string(*I,0,Space); - for (vector<string>::iterator J = List.begin(); J != I; J++) + for (vector<string>::iterator J = List.begin(); J != I; ++J) { // Find a space.. string::size_type Space2 = (*J).find(' '); @@ -405,7 +408,7 @@ bool pkgCdrom::WriteDatabase(Configuration &Cnf) that were the same. */ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source) { - if (List.size() == 0) + if (List.empty() == true) return true; string File = _config->FindFile("Dir::Etc::sourcelist"); @@ -455,7 +458,7 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source) if (First == true) { - for (vector<string>::iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) { string::size_type Space = (*I).find(' '); if (Space == string::npos) @@ -489,7 +492,7 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source) // Just in case the file was empty if (First == true) { - for (vector<string>::iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) { string::size_type Space = (*I).find(' '); if (Space == string::npos) @@ -661,13 +664,13 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ if (_config->FindB("Debug::aptcdrom",false) == true) { cout << "I found (binary):" << endl; - for (vector<string>::iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) cout << *I << endl; cout << "I found (source):" << endl; - for (vector<string>::iterator I = SourceList.begin(); I != SourceList.end(); I++) + for (vector<string>::iterator I = SourceList.begin(); I != SourceList.end(); ++I) cout << *I << endl; cout << "I found (Signatures):" << endl; - for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); I++) + for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); ++I) cout << *I << endl; } @@ -688,7 +691,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ log->Update(msg.str(), STEP_SCAN); } - if (List.size() == 0 && SourceList.size() == 0) + if (List.empty() == true && SourceList.empty() == true) { if (_config->FindB("APT::CDROM::NoMount",false) == false) UnmountCdrom(CDROM); @@ -712,7 +715,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ { // Escape special characters string::iterator J = Name.begin(); - for (; J != Name.end(); J++) + for (; J != Name.end(); ++J) if (*J == '"' || *J == ']' || *J == '[') *J = '_'; @@ -757,7 +760,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ // Escape special characters string::iterator J = Name.begin(); - for (; J != Name.end(); J++) + for (; J != Name.end(); ++J) if (*J == '"' || *J == ']' || *J == '[') *J = '_'; @@ -804,7 +807,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ if(log != NULL) log->Update(_("Source list entries for this disc are:\n")); - for (vector<string>::iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) { string::size_type Space = (*I).find(' '); if (Space == string::npos) @@ -823,7 +826,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ } } - for (vector<string>::iterator I = SourceList.begin(); I != SourceList.end(); I++) + for (vector<string>::iterator I = SourceList.begin(); I != SourceList.end(); ++I) { string::size_type Space = (*I).find(' '); if (Space == string::npos) diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h index 614062cbb..319254fd0 100644 --- a/apt-pkg/cdrom.h +++ b/apt-pkg/cdrom.h @@ -1,12 +1,11 @@ #ifndef PKGLIB_CDROM_H #define PKGLIB_CDROM_H -#include<apt-pkg/init.h> #include<string> #include<vector> - -using namespace std; +class Configuration; +class OpProgress; class pkgCdromStatus /*{{{*/ { @@ -20,12 +19,12 @@ class pkgCdromStatus /*{{{*/ // total steps virtual void SetTotal(int total) { totalSteps = total; }; // update steps, will be called regularly as a "pulse" - virtual void Update(string text="", int current=0) = 0; + virtual void Update(std::string text="", int current=0) = 0; // ask for cdrom insert virtual bool ChangeCdrom() = 0; // ask for cdrom name - virtual bool AskCdromName(string &Name) = 0; + virtual bool AskCdromName(std::string &Name) = 0; // Progress indicator for the Index rewriter virtual OpProgress* GetOpProgress() {return NULL; }; }; @@ -47,22 +46,22 @@ class pkgCdrom /*{{{*/ }; - bool FindPackages(string CD, - vector<string> &List, - vector<string> &SList, - vector<string> &SigList, - vector<string> &TransList, - string &InfoDir, pkgCdromStatus *log, + bool FindPackages(std::string CD, + std::vector<std::string> &List, + std::vector<std::string> &SList, + std::vector<std::string> &SigList, + std::vector<std::string> &TransList, + std::string &InfoDir, pkgCdromStatus *log, unsigned int Depth = 0); - bool DropBinaryArch(vector<string> &List); - bool DropRepeats(vector<string> &List,const char *Name); - void ReduceSourcelist(string CD,vector<string> &List); + bool DropBinaryArch(std::vector<std::string> &List); + bool DropRepeats(std::vector<std::string> &List,const char *Name); + void ReduceSourcelist(std::string CD,std::vector<std::string> &List); bool WriteDatabase(Configuration &Cnf); - bool WriteSourceList(string Name,vector<string> &List,bool Source); - int Score(string Path); + bool WriteSourceList(std::string Name,std::vector<std::string> &List,bool Source); + int Score(std::string Path); public: - bool Ident(string &ident, pkgCdromStatus *log); + bool Ident(std::string &ident, pkgCdromStatus *log); bool Add(pkgCdromStatus *log); }; /*}}}*/ @@ -71,9 +70,9 @@ class pkgCdrom /*{{{*/ // class that uses libudev to find cdrom/removable devices dynamically struct CdromDevice /*{{{*/ { - string DeviceName; + std::string DeviceName; bool Mounted; - string MountPath; + std::string MountPath; }; /*}}}*/ class pkgUdevCdromDevices /*{{{*/ @@ -104,9 +103,9 @@ class pkgUdevCdromDevices /*{{{*/ // convenience interface, this will just call ScanForRemovable // with "APT::cdrom::CdromOnly" - vector<CdromDevice> Scan(); + std::vector<CdromDevice> Scan(); - vector<CdromDevice> ScanForRemovable(bool CdromOnly); + std::vector<CdromDevice> ScanForRemovable(bool CdromOnly); }; /*}}}*/ diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 629afd7cf..ed8fa1aa9 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -8,23 +8,26 @@ ##################################################################### */ /*}}}*/ // Includes /*{{{*/ +#include<config.h> + #include <apt-pkg/clean.h> #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> #include <apt-pkg/aptconfiguration.h> - -#include <apti18n.h> +#include <apt-pkg/fileutl.h> #include <dirent.h> #include <sys/stat.h> #include <unistd.h> + +#include <apti18n.h> /*}}}*/ // ArchiveCleaner::Go - Perform smart cleanup of the archive /*{{{*/ // --------------------------------------------------------------------- /* Scan the directory for files to erase, we check the version information against our database to see if it is interesting */ -bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) +bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache) { bool CleanInstalled = _config->FindB("APT::Clean-Installed",true); @@ -32,7 +35,7 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) if (D == 0) return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); - string StartDir = SafeGetCWD(); + std::string StartDir = SafeGetCWD(); if (chdir(Dir.c_str()) != 0) { closedir(D); @@ -61,21 +64,21 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) for (; *I != 0 && *I != '_';I++); if (*I != '_') continue; - string Pkg = DeQuoteString(string(Dir->d_name,I-Dir->d_name)); + std::string Pkg = DeQuoteString(std::string(Dir->d_name,I-Dir->d_name)); // Grab the version const char *Start = I + 1; for (I = Start; *I != 0 && *I != '_';I++); if (*I != '_') continue; - string Ver = DeQuoteString(string(Start,I-Start)); + std::string Ver = DeQuoteString(std::string(Start,I-Start)); // Grab the arch Start = I + 1; for (I = Start; *I != 0 && *I != '.' ;I++); if (*I != '.') continue; - string const Arch = DeQuoteString(string(Start,I-Start)); + std::string const Arch = DeQuoteString(std::string(Start,I-Start)); if (APT::Configuration::checkArchitecture(Arch) == false) continue; @@ -85,12 +88,12 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) if (P.end() != true) { pkgCache::VerIterator V = P.VersionList(); - for (; V.end() == false; V++) + for (; V.end() == false; ++V) { // See if we can fetch this version at all bool IsFetchable = false; for (pkgCache::VerFileIterator J = V.FileList(); - J.end() == false; J++) + J.end() == false; ++J) { if (CleanInstalled == true && (J.File()->Flags & pkgCache::Flag::NotSource) != 0) diff --git a/apt-pkg/clean.h b/apt-pkg/clean.h index 1ebf68dc9..ad4049e83 100644 --- a/apt-pkg/clean.h +++ b/apt-pkg/clean.h @@ -20,11 +20,11 @@ class pkgArchiveCleaner protected: - virtual void Erase(const char * /*File*/,string /*Pkg*/,string /*Ver*/,struct stat & /*St*/) {}; + virtual void Erase(const char * /*File*/,std::string /*Pkg*/,std::string /*Ver*/,struct stat & /*St*/) {}; public: - bool Go(string Dir,pkgCache &Cache); + bool Go(std::string Dir,pkgCache &Cache); virtual ~pkgArchiveCleaner() {}; }; diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index e25caf1a5..187f6bd59 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -10,6 +10,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/cdromutl.h> #include <apt-pkg/error.h> #include <apt-pkg/md5.h> @@ -17,8 +19,6 @@ #include <apt-pkg/configuration.h> #include <apt-pkg/strutl.h> -#include <apti18n.h> - #include <sys/wait.h> #include <sys/statvfs.h> #include <dirent.h> @@ -26,8 +26,12 @@ #include <sys/stat.h> #include <unistd.h> #include <stdio.h> + +#include <apti18n.h> /*}}}*/ +using std::string; + // IsMounted - Returns true if the mount point is mounted /*{{{*/ // --------------------------------------------------------------------- /* This is a simple algorithm that should always work, we stat the mount point diff --git a/apt-pkg/contrib/cdromutl.h b/apt-pkg/contrib/cdromutl.h index 38ed2996e..2c6afac0f 100644 --- a/apt-pkg/contrib/cdromutl.h +++ b/apt-pkg/contrib/cdromutl.h @@ -12,13 +12,11 @@ #include <string> -using std::string; - // mount cdrom, DeviceName (e.g. /dev/sr0) is optional -bool MountCdrom(string Path, string DeviceName=""); -bool UnmountCdrom(string Path); -bool IdentCdrom(string CD,string &Res,unsigned int Version = 2); -bool IsMounted(string &Path); -string FindMountPointForDevice(const char *device); +bool MountCdrom(std::string Path, std::string DeviceName=""); +bool UnmountCdrom(std::string Path); +bool IdentCdrom(std::string CD,std::string &Res,unsigned int Version = 2); +bool IsMounted(std::string &Path); +std::string FindMountPointForDevice(const char *device); #endif diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc index 5a9944096..159f330a1 100644 --- a/apt-pkg/contrib/cmndline.cc +++ b/apt-pkg/contrib/cmndline.cc @@ -11,11 +11,14 @@ ##################################################################### */ /*}}}*/ // Include files /*{{{*/ +#include<config.h> + +#include <apt-pkg/configuration.h> #include <apt-pkg/cmndline.h> #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> -#include <apti18n.h> +#include <apti18n.h> /*}}}*/ using namespace std; @@ -87,9 +90,8 @@ bool CommandLine::Parse(int argc,const char **argv) Opt++; // Match up to a = against the list - const char *OptEnd = Opt; Args *A; - for (; *OptEnd != 0 && *OptEnd != '='; OptEnd++); + const char *OptEnd = strchrnul(Opt, '='); for (A = ArgList; A->end() == false && stringcasecmp(Opt,OptEnd,A->LongOpt) != 0; A++); @@ -97,9 +99,8 @@ bool CommandLine::Parse(int argc,const char **argv) bool PreceedMatch = false; if (A->end() == true) { - for (; Opt != OptEnd && *Opt != '-'; Opt++); - - if (Opt == OptEnd) + Opt = (const char*) memchr(Opt, '-', OptEnd - Opt); + if (Opt == NULL) return _error->Error(_("Command line option %s is not understood"),argv[I]); Opt++; @@ -194,9 +195,8 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[], // Arbitrary item specification if ((A->Flags & ArbItem) == ArbItem) { - const char *J; - for (J = Argument; *J != 0 && *J != '='; J++); - if (*J == 0) + const char *J = strchr(Argument, '='); + if (J == NULL) return _error->Error(_("Option %s: Configuration item specification must have an =<val>."),argv[I]); // = is trailing @@ -212,8 +212,7 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[], return true; } - const char *I = A->ConfName; - for (; *I != 0 && *I != ' '; I++); + const char *I = strchrnul(A->ConfName, ' '); if (*I == ' ') Conf->Set(string(A->ConfName,0,I-A->ConfName),string(I+1) + Argument); else @@ -269,10 +268,9 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[], // Skip the leading dash const char *J = argv[I]; for (; *J != 0 && *J == '-'; J++); - - const char *JEnd = J; - for (; *JEnd != 0 && *JEnd != '-'; JEnd++); - if (*JEnd != 0) + + const char *JEnd = strchr(J, '-'); + if (JEnd != NULL) { strncpy(Buffer,J,JEnd - J); Buffer[JEnd - J] = 0; @@ -373,9 +371,8 @@ void CommandLine::SaveInConfig(unsigned int const &argc, char const * const * co { // That is possibly an option: Quote it if it includes spaces, // the benefit is that this will eliminate also most false positives - const char* c = &argv[i][j+1]; - for (; *c != '\0' && *c != ' '; ++c); - if (*c == '\0') continue; + const char* c = strchr(&argv[i][j+1], ' '); + if (c == NULL) continue; cmdline[++length] = '"'; closeQuote = true; } diff --git a/apt-pkg/contrib/cmndline.h b/apt-pkg/contrib/cmndline.h index 7c0c71aa7..b201d9855 100644 --- a/apt-pkg/contrib/cmndline.h +++ b/apt-pkg/contrib/cmndline.h @@ -44,9 +44,7 @@ #ifndef PKGLIB_CMNDLINE_H #define PKGLIB_CMNDLINE_H - - -#include <apt-pkg/configuration.h> +class Configuration; class CommandLine { diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 2d1dee22d..0949ec223 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -15,16 +15,19 @@ ##################################################################### */ /*}}}*/ // Include files /*{{{*/ +#include <config.h> + #include <apt-pkg/configuration.h> #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> #include <apt-pkg/fileutl.h> -#include <apti18n.h> #include <vector> #include <fstream> #include <iostream> +#include <apti18n.h> + using namespace std; /*}}}*/ @@ -672,9 +675,9 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool const &AsSectio // Put the last fragment into the buffer std::string::const_iterator NonWhitespaceStart = Start; std::string::const_iterator NonWhitespaceStop = I; - for (; NonWhitespaceStart != I && isspace(*NonWhitespaceStart) != 0; NonWhitespaceStart++) + for (; NonWhitespaceStart != I && isspace(*NonWhitespaceStart) != 0; ++NonWhitespaceStart) ; - for (; NonWhitespaceStop != NonWhitespaceStart && isspace(NonWhitespaceStop[-1]) != 0; NonWhitespaceStop--) + for (; NonWhitespaceStop != NonWhitespaceStart && isspace(NonWhitespaceStop[-1]) != 0; --NonWhitespaceStop) ; if (LineBuffer.empty() == false && NonWhitespaceStop - NonWhitespaceStart != 0) LineBuffer += ' '; @@ -850,7 +853,7 @@ bool ReadConfigDir(Configuration &Conf,const string &Dir, vector<string> const List = GetListOfFilesInDir(Dir, "conf", true, true); // Read the files - for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::const_iterator I = List.begin(); I != List.end(); ++I) if (ReadConfigFile(Conf,*I,AsSectional,Depth) == false) return false; return true; diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h index 2844ec097..f6f2a3c1d 100644 --- a/apt-pkg/contrib/configuration.h +++ b/apt-pkg/contrib/configuration.h @@ -34,21 +34,19 @@ #include <vector> #include <iostream> -using std::string; - class Configuration { public: struct Item { - string Value; - string Tag; + std::string Value; + std::string Tag; Item *Parent; Item *Child; Item *Next; - string FullTag(const Item *Stop = 0) const; + std::string FullTag(const Item *Stop = 0) const; Item() : Parent(0), Child(0), Next(0) {}; }; @@ -67,35 +65,35 @@ class Configuration public: - string Find(const char *Name,const char *Default = 0) const; - string Find(string const &Name,const char *Default = 0) const {return Find(Name.c_str(),Default);}; - string Find(string const &Name, string const &Default) const {return Find(Name.c_str(),Default.c_str());}; - string FindFile(const char *Name,const char *Default = 0) const; - string FindDir(const char *Name,const char *Default = 0) const; - std::vector<string> FindVector(const char *Name) const; - std::vector<string> FindVector(string const &Name) const { return FindVector(Name.c_str()); }; + std::string Find(const char *Name,const char *Default = 0) const; + std::string Find(std::string const &Name,const char *Default = 0) const {return Find(Name.c_str(),Default);}; + std::string Find(std::string const &Name, std::string const &Default) const {return Find(Name.c_str(),Default.c_str());}; + std::string FindFile(const char *Name,const char *Default = 0) const; + std::string FindDir(const char *Name,const char *Default = 0) const; + std::vector<std::string> FindVector(const char *Name) const; + std::vector<std::string> FindVector(std::string const &Name) const { return FindVector(Name.c_str()); }; int FindI(const char *Name,int const &Default = 0) const; - int FindI(string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);}; + int FindI(std::string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);}; bool FindB(const char *Name,bool const &Default = false) const; - bool FindB(string const &Name,bool const &Default = false) const {return FindB(Name.c_str(),Default);}; - string FindAny(const char *Name,const char *Default = 0) const; + bool FindB(std::string const &Name,bool const &Default = false) const {return FindB(Name.c_str(),Default);}; + std::string FindAny(const char *Name,const char *Default = 0) const; - inline void Set(const string &Name,const string &Value) {Set(Name.c_str(),Value);}; - void CndSet(const char *Name,const string &Value); + inline void Set(const std::string &Name,const std::string &Value) {Set(Name.c_str(),Value);}; + void CndSet(const char *Name,const std::string &Value); void CndSet(const char *Name,const int Value); - void Set(const char *Name,const string &Value); + void Set(const char *Name,const std::string &Value); void Set(const char *Name,const int &Value); - inline bool Exists(const string &Name) const {return Exists(Name.c_str());}; + inline bool Exists(const std::string &Name) const {return Exists(Name.c_str());}; bool Exists(const char *Name) const; bool ExistsAny(const char *Name) const; // clear a whole tree - void Clear(const string &Name); + void Clear(const std::string &Name); // remove a certain value from a list (e.g. the list of "APT::Keep-Fds") - void Clear(string const &List, string const &Value); - void Clear(string const &List, int const &Value); + void Clear(std::string const &List, std::string const &Value); + void Clear(std::string const &List, int const &Value); inline const Item *Tree(const char *Name) const {return Lookup(Name);}; @@ -127,11 +125,11 @@ class Configuration extern Configuration *_config; -bool ReadConfigFile(Configuration &Conf,const string &FName, +bool ReadConfigFile(Configuration &Conf,const std::string &FName, bool const &AsSectional = false, unsigned const &Depth = 0); -bool ReadConfigDir(Configuration &Conf,const string &Dir, +bool ReadConfigDir(Configuration &Conf,const std::string &Dir, bool const &AsSectional = false, unsigned const &Depth = 0); diff --git a/apt-pkg/contrib/crc-16.cc b/apt-pkg/contrib/crc-16.cc index b300ed67e..4058821f9 100644 --- a/apt-pkg/contrib/crc-16.cc +++ b/apt-pkg/contrib/crc-16.cc @@ -15,6 +15,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/crc-16.h> /*}}}*/ @@ -63,7 +65,7 @@ static unsigned short const crc16_table[256] = /* Recompute the FCS with one more character appended. */ #define CalcFCS(fcs, c) (((fcs) >> 8) ^ crc16_table[((fcs) ^ (c)) & 0xff]) unsigned short AddCRC16(unsigned short fcs, void const *Buf, - unsigned long len) + unsigned long long len) { unsigned char const *buf = (unsigned char const *)Buf; while (len--) diff --git a/apt-pkg/contrib/crc-16.h b/apt-pkg/contrib/crc-16.h index f30678bac..702de40b2 100644 --- a/apt-pkg/contrib/crc-16.h +++ b/apt-pkg/contrib/crc-16.h @@ -12,6 +12,6 @@ #define INIT_FCS 0xffff unsigned short AddCRC16(unsigned short fcs, void const *buf, - unsigned long len); + unsigned long long len); #endif diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc index 18810d2a4..122e2c809 100644 --- a/apt-pkg/contrib/error.cc +++ b/apt-pkg/contrib/error.cc @@ -13,6 +13,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/error.h> #include <iostream> @@ -24,8 +26,7 @@ #include <string> #include <cstring> -#include "config.h" - /*}}}*/ + /*}}}*/ // Global Error Object /*{{{*/ /* If the implementation supports posix threads then the accessor function @@ -193,7 +194,7 @@ bool GlobalError::PopMessage(std::string &Text) { // check if another error message is pending for (std::list<Item>::const_iterator m = Messages.begin(); - m != Messages.end(); m++) + m != Messages.end(); ++m) if (m->Type == ERROR || m->Type == FATAL) return Ret; @@ -210,7 +211,7 @@ void GlobalError::DumpErrors(std::ostream &out, MsgType const &threshold, Messages.insert(Messages.begin(), s->Messages.begin(), s->Messages.end()); for (std::list<Item>::const_iterator m = Messages.begin(); - m != Messages.end(); m++) + m != Messages.end(); ++m) if (m->Type >= threshold) out << (*m) << std::endl; Discard(); @@ -231,7 +232,7 @@ bool GlobalError::empty(MsgType const &trashhold) const { return true; for (std::list<Item>::const_iterator m = Messages.begin(); - m != Messages.end(); m++) + m != Messages.end(); ++m) if (m->Type >= trashhold) return false; diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 85dc6f600..95058cbde 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -18,14 +18,14 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/fileutl.h> #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> #include <apt-pkg/sptr.h> #include <apt-pkg/configuration.h> -#include <apti18n.h> - #include <cstdlib> #include <cstring> #include <cstdio> @@ -43,10 +43,11 @@ #include <set> #include <algorithm> -#include <config.h> #ifdef WORDS_BIGENDIAN #include <inttypes.h> #endif + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -132,10 +133,10 @@ bool CopyFile(FileFd &From,FileFd &To) // Buffered copy between fds SPtrArray<unsigned char> Buf = new unsigned char[64000]; - unsigned long Size = From.Size(); + unsigned long long Size = From.Size(); while (Size != 0) { - unsigned long ToRead = Size; + unsigned long long ToRead = Size; if (Size > 64000) ToRead = 64000; @@ -810,7 +811,7 @@ FileFd::~FileFd() // --------------------------------------------------------------------- /* We are carefull to handle interruption by a signal while reading gracefully. */ -bool FileFd::Read(void *To,unsigned long Size,unsigned long *Actual) +bool FileFd::Read(void *To,unsigned long long Size,unsigned long long *Actual) { int Res; errno = 0; @@ -849,13 +850,13 @@ bool FileFd::Read(void *To,unsigned long Size,unsigned long *Actual) } Flags |= Fail; - return _error->Error(_("read, still have %lu to read but none left"),Size); + return _error->Error(_("read, still have %llu to read but none left"), Size); } /*}}}*/ // FileFd::Write - Write to the file /*{{{*/ // --------------------------------------------------------------------- /* */ -bool FileFd::Write(const void *From,unsigned long Size) +bool FileFd::Write(const void *From,unsigned long long Size) { int Res; errno = 0; @@ -882,13 +883,13 @@ bool FileFd::Write(const void *From,unsigned long Size) return true; Flags |= Fail; - return _error->Error(_("write, still have %lu to write but couldn't"),Size); + return _error->Error(_("write, still have %llu to write but couldn't"), Size); } /*}}}*/ // FileFd::Seek - Seek in the file /*{{{*/ // --------------------------------------------------------------------- /* */ -bool FileFd::Seek(unsigned long To) +bool FileFd::Seek(unsigned long long To) { int res; if (gz) @@ -898,7 +899,7 @@ bool FileFd::Seek(unsigned long To) if (res != (signed)To) { Flags |= Fail; - return _error->Error("Unable to seek to %lu",To); + return _error->Error("Unable to seek to %llu", To); } return true; @@ -907,7 +908,7 @@ bool FileFd::Seek(unsigned long To) // FileFd::Skip - Seek in the file /*{{{*/ // --------------------------------------------------------------------- /* */ -bool FileFd::Skip(unsigned long Over) +bool FileFd::Skip(unsigned long long Over) { int res; if (gz) @@ -917,7 +918,7 @@ bool FileFd::Skip(unsigned long Over) if (res < 0) { Flags |= Fail; - return _error->Error("Unable to seek ahead %lu",Over); + return _error->Error("Unable to seek ahead %llu",Over); } return true; @@ -926,7 +927,7 @@ bool FileFd::Skip(unsigned long Over) // FileFd::Truncate - Truncate the file /*{{{*/ // --------------------------------------------------------------------- /* */ -bool FileFd::Truncate(unsigned long To) +bool FileFd::Truncate(unsigned long long To) { if (gz) { @@ -936,7 +937,7 @@ bool FileFd::Truncate(unsigned long To) if (ftruncate(iFd,To) != 0) { Flags |= Fail; - return _error->Error("Unable to truncate to %lu",To); + return _error->Error("Unable to truncate to %llu",To); } return true; @@ -945,7 +946,7 @@ bool FileFd::Truncate(unsigned long To) // FileFd::Tell - Current seek position /*{{{*/ // --------------------------------------------------------------------- /* */ -unsigned long FileFd::Tell() +unsigned long long FileFd::Tell() { off_t Res; if (gz) @@ -960,7 +961,7 @@ unsigned long FileFd::Tell() // FileFd::FileSize - Return the size of the file /*{{{*/ // --------------------------------------------------------------------- /* */ -unsigned long FileFd::FileSize() +unsigned long long FileFd::FileSize() { struct stat Buf; @@ -972,9 +973,9 @@ unsigned long FileFd::FileSize() // FileFd::Size - Return the size of the content in the file /*{{{*/ // --------------------------------------------------------------------- /* */ -unsigned long FileFd::Size() +unsigned long long FileFd::Size() { - unsigned long size = FileSize(); + unsigned long long size = FileSize(); // only check gzsize if we are actually a gzip file, just checking for // "gz" is not sufficient as uncompressed files will be opened with @@ -984,6 +985,7 @@ unsigned long FileFd::Size() /* unfortunately zlib.h doesn't provide a gzsize(), so we have to do * this ourselves; the original (uncompressed) file size is the last 32 * bits of the file */ + // FIXME: Size for gz-files is limited by 32bit… no largefile support off_t orig_pos = lseek(iFd, 0, SEEK_CUR); if (lseek(iFd, -4, SEEK_END) < 0) return _error->Errno("lseek","Unable to seek to end of gzipped file"); diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index a1b177f38..0d0451a46 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -31,8 +31,6 @@ /* Define this for python-apt */ #define APT_HAS_GZIP 1 -using std::string; - class FileFd { protected: @@ -41,30 +39,45 @@ class FileFd enum LocalFlags {AutoClose = (1<<0),Fail = (1<<1),DelOnFail = (1<<2), HitEof = (1<<3), Replace = (1<<4) }; unsigned long Flags; - string FileName; - string TemporaryFileName; + std::string FileName; + std::string TemporaryFileName; gzFile gz; public: enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny,WriteTemp,ReadOnlyGzip, WriteAtomic}; - inline bool Read(void *To,unsigned long Size,bool AllowEof) + inline bool Read(void *To,unsigned long long Size,bool AllowEof) { - unsigned long Jnk; + unsigned long long Jnk; if (AllowEof) return Read(To,Size,&Jnk); return Read(To,Size); } - bool Read(void *To,unsigned long Size,unsigned long *Actual = 0); - bool Write(const void *From,unsigned long Size); - bool Seek(unsigned long To); - bool Skip(unsigned long To); - bool Truncate(unsigned long To); - unsigned long Tell(); - unsigned long Size(); - unsigned long FileSize(); - bool Open(string FileName,OpenMode Mode,unsigned long Perms = 0666); + bool Read(void *To,unsigned long long Size,unsigned long long *Actual = 0); + bool Write(const void *From,unsigned long long Size); + bool Seek(unsigned long long To); + bool Skip(unsigned long long To); + bool Truncate(unsigned long long To); + unsigned long long Tell(); + unsigned long long Size(); + unsigned long long FileSize(); + + /* You want to use 'unsigned long long' if you are talking about a file + to be able to support large files (>2 or >4 GB) properly. + This shouldn't happen all to often for the indexes, but deb's might be… + And as the auto-conversation converts a 'unsigned long *' to a 'bool' + instead of 'unsigned long long *' we need to provide this explicitely - + otherwise applications magically start to fail… */ + __deprecated bool Read(void *To,unsigned long long Size,unsigned long *Actual) + { + unsigned long long R; + bool const T = Read(To, Size, &R); + *Actual = R; + return T; + } + + bool Open(std::string FileName,OpenMode Mode,unsigned long Perms = 0666); bool OpenDescriptor(int Fd, OpenMode Mode, bool AutoClose=false); bool Close(); bool Sync(); @@ -78,9 +91,9 @@ class FileFd inline void EraseOnFailure() {Flags |= DelOnFail;}; inline void OpFail() {Flags |= Fail;}; inline bool Eof() {return (Flags & HitEof) == HitEof;}; - inline string &Name() {return FileName;}; + inline std::string &Name() {return FileName;}; - FileFd(string FileName,OpenMode Mode,unsigned long Perms = 0666) : iFd(-1), + FileFd(std::string FileName,OpenMode Mode,unsigned long Perms = 0666) : iFd(-1), Flags(0), gz(NULL) { Open(FileName,Mode,Perms); @@ -92,12 +105,12 @@ class FileFd bool RunScripts(const char *Cnf); bool CopyFile(FileFd &From,FileFd &To); -int GetLock(string File,bool Errors = true); -bool FileExists(string File); -bool RealFileExists(string File); -bool DirectoryExists(string const &Path) __attrib_const; -bool CreateDirectory(string const &Parent, string const &Path); -time_t GetModificationTime(string const &Path); +int GetLock(std::string File,bool Errors = true); +bool FileExists(std::string File); +bool RealFileExists(std::string File); +bool DirectoryExists(std::string const &Path) __attrib_const; +bool CreateDirectory(std::string const &Parent, std::string const &Path); +time_t GetModificationTime(std::string const &Path); /** \brief Ensure the existence of the given Path * @@ -105,13 +118,13 @@ time_t GetModificationTime(string const &Path); * /apt/ will be removed before CreateDirectory call. * \param Path which should exist after (successful) call */ -bool CreateAPTDirectoryIfNeeded(string const &Parent, string const &Path); +bool CreateAPTDirectoryIfNeeded(std::string const &Parent, std::string const &Path); -std::vector<string> GetListOfFilesInDir(string const &Dir, string const &Ext, +std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, std::string const &Ext, bool const &SortList, bool const &AllowNoExt=false); -std::vector<string> GetListOfFilesInDir(string const &Dir, std::vector<string> const &Ext, +std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, std::vector<std::string> const &Ext, bool const &SortList); -string SafeGetCWD(); +std::string SafeGetCWD(); void SetCloseExec(int Fd,bool Close); void SetNonBlock(int Fd,bool Block); bool WaitFd(int Fd,bool write = false,unsigned long timeout = 0); @@ -119,10 +132,10 @@ pid_t ExecFork(); bool ExecWait(pid_t Pid,const char *Name,bool Reap = false); // File string manipulators -string flNotDir(string File); -string flNotFile(string File); -string flNoLink(string File); -string flExtension(string File); -string flCombine(string Dir,string File); +std::string flNotDir(std::string File); +std::string flNotFile(std::string File); +std::string flNoLink(std::string File); +std::string flExtension(std::string File); +std::string flCombine(std::string Dir,std::string File); #endif diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index 4407574fa..05001f042 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -11,12 +11,14 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/hashes.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/configuration.h> #include <apt-pkg/macros.h> -#include <unistd.h> +#include <unistd.h> #include <string> #include <iostream> /*}}}*/ @@ -30,20 +32,20 @@ HashString::HashString() { } -HashString::HashString(string Type, string Hash) : Type(Type), Hash(Hash) +HashString::HashString(std::string Type, std::string Hash) : Type(Type), Hash(Hash) { } -HashString::HashString(string StringedHash) /*{{{*/ +HashString::HashString(std::string StringedHash) /*{{{*/ { // legacy: md5sum without "MD5Sum:" prefix - if (StringedHash.find(":") == string::npos && StringedHash.size() == 32) + if (StringedHash.find(":") == std::string::npos && StringedHash.size() == 32) { Type = "MD5Sum"; Hash = StringedHash; return; } - string::size_type pos = StringedHash.find(":"); + std::string::size_type pos = StringedHash.find(":"); Type = StringedHash.substr(0,pos); Hash = StringedHash.substr(pos+1, StringedHash.size() - pos); @@ -51,34 +53,34 @@ HashString::HashString(string StringedHash) /*{{{*/ std::clog << "HashString(string): " << Type << " : " << Hash << std::endl; } /*}}}*/ -bool HashString::VerifyFile(string filename) const /*{{{*/ +bool HashString::VerifyFile(std::string filename) const /*{{{*/ { - string fileHash; + std::string fileHash; FileFd Fd(filename, FileFd::ReadOnly); if(Type == "MD5Sum") { MD5Summation MD5; MD5.AddFD(Fd.Fd(), Fd.Size()); - fileHash = (string)MD5.Result(); + fileHash = (std::string)MD5.Result(); } else if (Type == "SHA1") { SHA1Summation SHA1; SHA1.AddFD(Fd.Fd(), Fd.Size()); - fileHash = (string)SHA1.Result(); + fileHash = (std::string)SHA1.Result(); } else if (Type == "SHA256") { SHA256Summation SHA256; SHA256.AddFD(Fd.Fd(), Fd.Size()); - fileHash = (string)SHA256.Result(); + fileHash = (std::string)SHA256.Result(); } else if (Type == "SHA512") { SHA512Summation SHA512; SHA512.AddFD(Fd.Fd(), Fd.Size()); - fileHash = (string)SHA512.Result(); + fileHash = (std::string)SHA512.Result(); } Fd.Close(); @@ -98,26 +100,26 @@ bool HashString::empty() const return (Type.empty() || Hash.empty()); } -string HashString::toStr() const +std::string HashString::toStr() const { - return Type+string(":")+Hash; + return Type + std::string(":") + Hash; } // Hashes::AddFD - Add the contents of the FD /*{{{*/ // --------------------------------------------------------------------- /* */ -bool Hashes::AddFD(int const Fd,unsigned long Size, bool const addMD5, +bool Hashes::AddFD(int const Fd,unsigned long long Size, bool const addMD5, bool const addSHA1, bool const addSHA256, bool const addSHA512) { unsigned char Buf[64*64]; - int Res = 0; + ssize_t Res = 0; int ToEOF = (Size == 0); while (Size != 0 || ToEOF) { - unsigned n = sizeof(Buf); - if (!ToEOF) n = min(Size,(unsigned long)n); + unsigned long long n = sizeof(Buf); + if (!ToEOF) n = std::min(Size, n); Res = read(Fd,Buf,n); - if (Res < 0 || (!ToEOF && (unsigned) Res != n)) // error, or short read + if (Res < 0 || (!ToEOF && Res != (ssize_t) n)) // error, or short read return false; if (ToEOF && Res == 0) // EOF break; diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index e702fcca2..81851dede 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -22,31 +22,28 @@ #include <vector> #include <cstring> -using std::min; -using std::vector; - // helper class that contains hash function name // and hash class HashString { protected: - string Type; - string Hash; + std::string Type; + std::string Hash; static const char * _SupportedHashes[10]; public: - HashString(string Type, string Hash); - HashString(string StringedHashString); // init from str as "type:hash" + HashString(std::string Type, std::string Hash); + HashString(std::string StringedHashString); // init from str as "type:hash" HashString(); // get hash type used - string HashType() { return Type; }; + std::string HashType() { return Type; }; // verify the given filename against the currently loaded hash - bool VerifyFile(string filename) const; + bool VerifyFile(std::string filename) const; // helper - string toStr() const; // convert to str as "type:hash" + std::string toStr() const; // convert to str as "type:hash" bool empty() const; // return the list of hashes we support @@ -62,14 +59,14 @@ class Hashes SHA256Summation SHA256; SHA512Summation SHA512; - inline bool Add(const unsigned char *Data,unsigned long Size) + inline bool Add(const unsigned char *Data,unsigned long long Size) { return MD5.Add(Data,Size) && SHA1.Add(Data,Size) && SHA256.Add(Data,Size) && SHA512.Add(Data,Size); }; inline bool Add(const char *Data) {return Add((unsigned char *)Data,strlen(Data));}; - inline bool AddFD(int const Fd,unsigned long Size = 0) + inline bool AddFD(int const Fd,unsigned long long Size = 0) { return AddFD(Fd, Size, true, true, true, true); }; - bool AddFD(int const Fd, unsigned long Size, bool const addMD5, + bool AddFD(int const Fd, unsigned long long Size, bool const addMD5, bool const addSHA1, bool const addSHA256, bool const addSHA512); inline bool Add(const unsigned char *Beg,const unsigned char *End) {return Add(Beg,End-Beg);}; diff --git a/apt-pkg/contrib/hashsum.cc b/apt-pkg/contrib/hashsum.cc index 728747d7a..ff3b112bb 100644 --- a/apt-pkg/contrib/hashsum.cc +++ b/apt-pkg/contrib/hashsum.cc @@ -1,4 +1,5 @@ // Cryptographic API Base +#include <config.h> #include <unistd.h> #include "hashsum_template.h" @@ -6,16 +7,16 @@ // Summation::AddFD - Add content of file into the checksum /*{{{*/ // --------------------------------------------------------------------- /* */ -bool SummationImplementation::AddFD(int const Fd, unsigned long Size) { +bool SummationImplementation::AddFD(int const Fd, unsigned long long Size) { unsigned char Buf[64 * 64]; - int Res = 0; + ssize_t Res = 0; int ToEOF = (Size == 0); while (Size != 0 || ToEOF) { - unsigned n = sizeof(Buf); - if (!ToEOF) n = min(Size,(unsigned long)n); + unsigned long long n = sizeof(Buf); + if (!ToEOF) n = std::min(Size, n); Res = read(Fd, Buf, n); - if (Res < 0 || (!ToEOF && (unsigned) Res != n)) // error, or short read + if (Res < 0 || (!ToEOF && Res != (ssize_t) n)) // error, or short read return false; if (ToEOF && Res == 0) // EOF break; diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h index 85d94c2af..27d192b82 100644 --- a/apt-pkg/contrib/hashsum_template.h +++ b/apt-pkg/contrib/hashsum_template.h @@ -15,9 +15,6 @@ #include <algorithm> #include <stdint.h> -using std::string; -using std::min; - template<int N> class HashSumValue { @@ -29,9 +26,13 @@ class HashSumValue bool operator ==(const HashSumValue &rhs) const { return memcmp(Sum,rhs.Sum,sizeof(Sum)) == 0; - }; + }; + bool operator !=(const HashSumValue &rhs) const + { + return memcmp(Sum,rhs.Sum,sizeof(Sum)) != 0; + }; - string Value() const + std::string Value() const { char Conv[16] = { '0','1','2','3','4','5','6','7','8','9','a','b', @@ -48,7 +49,7 @@ class HashSumValue Result[I] = Conv[Sum[J] >> 4]; Result[I + 1] = Conv[Sum[J] & 0xF]; } - return string(Result); + return std::string(Result); }; inline void Value(unsigned char S[N/8]) @@ -57,12 +58,12 @@ class HashSumValue S[I] = Sum[I]; }; - inline operator string() const + inline operator std::string() const { return Value(); }; - bool Set(string Str) + bool Set(std::string Str) { return Hex2Num(Str,Sum,sizeof(Sum)); }; @@ -73,7 +74,7 @@ class HashSumValue Sum[I] = S[I]; }; - HashSumValue(string Str) + HashSumValue(std::string Str) { memset(Sum,0,sizeof(Sum)); Set(Str); @@ -87,8 +88,8 @@ class HashSumValue class SummationImplementation { public: - virtual bool Add(const unsigned char *inbuf, unsigned long inlen) = 0; - inline bool Add(const char *inbuf, unsigned long const inlen) + virtual bool Add(const unsigned char *inbuf, unsigned long long inlen) = 0; + inline bool Add(const char *inbuf, unsigned long long const inlen) { return Add((unsigned char *)inbuf, inlen); }; inline bool Add(const unsigned char *Data) @@ -101,7 +102,7 @@ class SummationImplementation inline bool Add(const char *Beg, const char *End) { return Add((const unsigned char *)Beg, End - Beg); }; - bool AddFD(int Fd, unsigned long Size = 0); + bool AddFD(int Fd, unsigned long long Size = 0); }; #endif diff --git a/apt-pkg/contrib/md5.cc b/apt-pkg/contrib/md5.cc index 65e20e9bb..4351aeb22 100644 --- a/apt-pkg/contrib/md5.cc +++ b/apt-pkg/contrib/md5.cc @@ -35,6 +35,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/md5.h> #include <apt-pkg/strutl.h> #include <apt-pkg/macros.h> @@ -43,7 +45,6 @@ #include <unistd.h> #include <netinet/in.h> // For htonl #include <inttypes.h> -#include <config.h> /*}}}*/ // byteSwap - Swap bytes in a buffer /*{{{*/ @@ -186,7 +187,7 @@ MD5Summation::MD5Summation() // MD5Summation::Add - 'Add' a data set to the hash /*{{{*/ // --------------------------------------------------------------------- /* */ -bool MD5Summation::Add(const unsigned char *data,unsigned long len) +bool MD5Summation::Add(const unsigned char *data,unsigned long long len) { if (Done == true) return false; diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h index e76428325..a207da4e4 100644 --- a/apt-pkg/contrib/md5.h +++ b/apt-pkg/contrib/md5.h @@ -29,9 +29,6 @@ #include <algorithm> #include <stdint.h> -using std::string; -using std::min; - #include "hashsum_template.h" typedef HashSumValue<128> MD5SumValue; @@ -45,7 +42,7 @@ class MD5Summation : public SummationImplementation public: - bool Add(const unsigned char *inbuf, unsigned long inlen); + bool Add(const unsigned char *inbuf, unsigned long long inlen); using SummationImplementation::Add; MD5SumValue Result(); diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index 19381ae47..f76169a92 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -17,10 +17,11 @@ /*}}}*/ // Include Files /*{{{*/ #define _BSD_SOURCE +#include <config.h> + #include <apt-pkg/mmap.h> #include <apt-pkg/error.h> - -#include <apti18n.h> +#include <apt-pkg/fileutl.h> #include <sys/mman.h> #include <sys/stat.h> @@ -28,9 +29,10 @@ #include <fcntl.h> #include <stdlib.h> #include <errno.h> - #include <cstring> - /*}}}*/ + +#include <apti18n.h> + /*}}}*/ // MMap::MMap - Constructor /*{{{*/ // --------------------------------------------------------------------- @@ -94,7 +96,7 @@ bool MMap::Map(FileFd &Fd) return false; } else - return _error->Errno("mmap",_("Couldn't make mmap of %lu bytes"), + return _error->Errno("mmap",_("Couldn't make mmap of %llu bytes"), iSize); } @@ -165,7 +167,7 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop) return true; #ifdef _POSIX_SYNCHRONIZED_IO - unsigned long PSize = sysconf(_SC_PAGESIZE); + unsigned long long PSize = sysconf(_SC_PAGESIZE); if ((Flags & ReadOnly) != ReadOnly) { if (SyncToFd != 0) @@ -176,7 +178,7 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop) } else { - if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0) + if (msync((char *)Base+(unsigned long long)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0) return _error->Errno("msync", _("Unable to synchronize mmap")); } } @@ -196,7 +198,7 @@ DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long const &Work if (_error->PendingError() == true) return; - unsigned long EndOfFile = Fd->Size(); + unsigned long long EndOfFile = Fd->Size(); if (EndOfFile > WorkSpace) WorkSpace = EndOfFile; else if(WorkSpace > 0) @@ -284,7 +286,7 @@ DynamicMMap::~DynamicMMap() return; } - unsigned long EndOfFile = iSize; + unsigned long long EndOfFile = iSize; iSize = WorkSpace; Close(false); if(ftruncate(Fd->Fd(),EndOfFile) < 0) @@ -294,9 +296,9 @@ DynamicMMap::~DynamicMMap() // DynamicMMap::RawAllocate - Allocate a raw chunk of unaligned space /*{{{*/ // --------------------------------------------------------------------- /* This allocates a block of memory aligned to the given size */ -unsigned long DynamicMMap::RawAllocate(unsigned long Size,unsigned long Aln) +unsigned long DynamicMMap::RawAllocate(unsigned long long Size,unsigned long Aln) { - unsigned long Result = iSize; + unsigned long long Result = iSize; if (Aln != 0) Result += Aln - (iSize%Aln); @@ -411,7 +413,7 @@ bool DynamicMMap::Grow() { if (GrowFactor <= 0) return _error->Error(_("Unable to increase size of the MMap as automatic growing is disabled by user.")); - unsigned long const newSize = WorkSpace + GrowFactor; + unsigned long long const newSize = WorkSpace + GrowFactor; if(Fd != 0) { Fd->Seek(newSize - 1); diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index 2bf2c1540..2ed4a95f8 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -27,9 +27,8 @@ #include <string> -#include <apt-pkg/fileutl.h> -using std::string; +class FileFd; /* This should be a 32 bit type, larger tyes use too much ram and smaller types are too small. Where ever possible 'unsigned long' should be used @@ -41,7 +40,7 @@ class MMap protected: unsigned long Flags; - unsigned long iSize; + unsigned long long iSize; void *Base; // In case mmap can not be used, we keep a dup of the file @@ -60,8 +59,8 @@ class MMap // Simple accessors inline operator void *() {return Base;}; inline void *Data() {return Base;}; - inline unsigned long Size() {return iSize;}; - inline void AddSize(unsigned long const size) {iSize += size;}; + inline unsigned long long Size() {return iSize;}; + inline void AddSize(unsigned long long const size) {iSize += size;}; inline bool validData() const { return Base != (void *)-1 && Base != 0; }; // File manipulators @@ -99,10 +98,10 @@ class DynamicMMap : public MMap public: // Allocation - unsigned long RawAllocate(unsigned long Size,unsigned long Aln = 0); + unsigned long RawAllocate(unsigned long long Size,unsigned long Aln = 0); unsigned long Allocate(unsigned long ItemSize); unsigned long WriteString(const char *String,unsigned long Len = (unsigned long)-1); - inline unsigned long WriteString(const string &S) {return WriteString(S.c_str(),S.length());}; + inline unsigned long WriteString(const std::string &S) {return WriteString(S.c_str(),S.length());}; void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;}; DynamicMMap(FileFd &F,unsigned long Flags,unsigned long const &WorkSpace = 2*1024*1024, diff --git a/apt-pkg/contrib/netrc.cc b/apt-pkg/contrib/netrc.cc index 34f472ee1..cb7d36088 100644 --- a/apt-pkg/contrib/netrc.cc +++ b/apt-pkg/contrib/netrc.cc @@ -11,9 +11,12 @@ ##################################################################### */ /*}}}*/ +#include <config.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/strutl.h> #include <apt-pkg/fileutl.h> + #include <iostream> #include <stdio.h> #include <stdlib.h> @@ -23,6 +26,7 @@ #include "netrc.h" +using std::string; /* Get user and password from .netrc when given a machine name */ @@ -47,10 +51,7 @@ int parsenetrc (char *host, char *login, char *password, char *netrcfile = NULL) int specific_login = (login[0] != 0); char *home = NULL; bool netrc_alloc = false; - int state = NOTHING; - char state_login = 0; /* Found a login keyword */ - char state_password = 0; /* Found a password keyword */ int state_our_login = false; /* With specific_login, found *our* login name */ @@ -81,6 +82,10 @@ int parsenetrc (char *host, char *login, char *password, char *netrcfile = NULL) bool done = false; char netrcbuffer[256]; + int state = NOTHING; + char state_login = 0; /* Found a login keyword */ + char state_password = 0; /* Found a password keyword */ + while (!done && fgets(netrcbuffer, sizeof (netrcbuffer), file)) { tok = strtok_r (netrcbuffer, " \t\n", &tok_buf); while (!done && tok) { diff --git a/apt-pkg/contrib/netrc.h b/apt-pkg/contrib/netrc.h index 02a5eb09f..7b94eba88 100644 --- a/apt-pkg/contrib/netrc.h +++ b/apt-pkg/contrib/netrc.h @@ -14,16 +14,18 @@ #ifndef NETRC_H #define NETRC_H -#include <apt-pkg/strutl.h> +#include <string> #define DOT_CHAR "." #define DIR_CHAR "/" +class URI; + // Assume: password[0]=0, host[0] != 0. // If login[0] = 0, search for login and password within a machine section // in the netrc. // If login[0] != 0, search for password within machine and login. int parsenetrc (char *host, char *login, char *password, char *filename); -void maybe_add_auth (URI &Uri, string NetRCFile); +void maybe_add_auth (URI &Uri, std::string NetRCFile); #endif diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc index 84ee4c124..317048845 100644 --- a/apt-pkg/contrib/progress.cc +++ b/apt-pkg/contrib/progress.cc @@ -8,15 +8,17 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/progress.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> -#include <apti18n.h> - #include <iostream> #include <stdio.h> #include <cstring> + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -35,7 +37,7 @@ OpProgress::OpProgress() : Current(0), Total(0), Size(0), SubTotal(1), /* Current is the Base Overall progress in units of Total. Cur is the sub progress in units of SubTotal. Size is a scaling factor that says what percent of Total SubTotal is. */ -void OpProgress::Progress(unsigned long Cur) +void OpProgress::Progress(unsigned long long Cur) { if (Total == 0 || Size == 0 || SubTotal == 0) Percent = 0; @@ -47,8 +49,8 @@ void OpProgress::Progress(unsigned long Cur) // OpProgress::OverallProgress - Set the overall progress /*{{{*/ // --------------------------------------------------------------------- /* */ -void OpProgress::OverallProgress(unsigned long Current, unsigned long Total, - unsigned long Size,const string &Op) +void OpProgress::OverallProgress(unsigned long long Current, unsigned long long Total, + unsigned long long Size,const string &Op) { this->Current = Current; this->Total = Total; @@ -65,7 +67,7 @@ void OpProgress::OverallProgress(unsigned long Current, unsigned long Total, // OpProgress::SubProgress - Set the sub progress state /*{{{*/ // --------------------------------------------------------------------- /* */ -void OpProgress::SubProgress(unsigned long SubTotal,const string &Op, +void OpProgress::SubProgress(unsigned long long SubTotal,const string &Op, float const Percent) { this->SubTotal = SubTotal; diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h index 3a914d17f..7635719bc 100644 --- a/apt-pkg/contrib/progress.h +++ b/apt-pkg/contrib/progress.h @@ -25,26 +25,24 @@ #include <string> #include <sys/time.h> -using std::string; - class Configuration; class OpProgress { - unsigned long Current; - unsigned long Total; - unsigned long Size; - unsigned long SubTotal; + unsigned long long Current; + unsigned long long Total; + unsigned long long Size; + unsigned long long SubTotal; float LastPercent; // Change reduction code struct timeval LastTime; - string LastOp; - string LastSubOp; + std::string LastOp; + std::string LastSubOp; protected: - string Op; - string SubOp; + std::string Op; + std::string SubOp; float Percent; bool MajorChange; @@ -54,10 +52,10 @@ class OpProgress public: - void Progress(unsigned long Current); - void SubProgress(unsigned long SubTotal, const string &Op = "", float const Percent = -1); - void OverallProgress(unsigned long Current,unsigned long Total, - unsigned long Size,const string &Op); + void Progress(unsigned long long Current); + void SubProgress(unsigned long long SubTotal, const std::string &Op = "", float const Percent = -1); + void OverallProgress(unsigned long long Current,unsigned long long Total, + unsigned long long Size,const std::string &Op); virtual void Done() {}; OpProgress(); @@ -67,8 +65,8 @@ class OpProgress class OpTextProgress : public OpProgress { protected: - - string OldOp; + + std::string OldOp; bool NoUpdate; bool NoDisplay; unsigned long LastLen; diff --git a/apt-pkg/contrib/sha1.cc b/apt-pkg/contrib/sha1.cc index 5b9db202d..b5a6a2440 100644 --- a/apt-pkg/contrib/sha1.cc +++ b/apt-pkg/contrib/sha1.cc @@ -29,6 +29,8 @@ */ /*}}} */ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/sha1.h> #include <apt-pkg/strutl.h> #include <apt-pkg/macros.h> @@ -36,7 +38,6 @@ #include <string.h> #include <unistd.h> #include <inttypes.h> -#include <config.h> /*}}}*/ // SHA1Transform - Alters an existing SHA-1 hash /*{{{*/ @@ -241,7 +242,7 @@ SHA1SumValue SHA1Summation::Result() // SHA1Summation::Add - Adds content of buffer into the checksum /*{{{*/ // --------------------------------------------------------------------- /* May not be called after Result() is called */ -bool SHA1Summation::Add(const unsigned char *data,unsigned long len) +bool SHA1Summation::Add(const unsigned char *data,unsigned long long len) { if (Done) return false; diff --git a/apt-pkg/contrib/sha1.h b/apt-pkg/contrib/sha1.h index 2701fc67e..b4b139a22 100644 --- a/apt-pkg/contrib/sha1.h +++ b/apt-pkg/contrib/sha1.h @@ -18,9 +18,6 @@ #include <cstring> #include <algorithm> -using std::string; -using std::min; - #include "hashsum_template.h" typedef HashSumValue<160> SHA1SumValue; @@ -34,7 +31,7 @@ class SHA1Summation : public SummationImplementation bool Done; public: - bool Add(const unsigned char *inbuf, unsigned long inlen); + bool Add(const unsigned char *inbuf, unsigned long long inlen); using SummationImplementation::Add; SHA1SumValue Result(); diff --git a/apt-pkg/contrib/sha2.h b/apt-pkg/contrib/sha2.h index 386225889..51c921dbd 100644 --- a/apt-pkg/contrib/sha2.h +++ b/apt-pkg/contrib/sha2.h @@ -30,7 +30,7 @@ class SHA2SummationBase : public SummationImplementation protected: bool Done; public: - bool Add(const unsigned char *inbuf, unsigned long len) = 0; + bool Add(const unsigned char *inbuf, unsigned long long len) = 0; void Result(); }; @@ -41,7 +41,7 @@ class SHA256Summation : public SHA2SummationBase unsigned char Sum[32]; public: - bool Add(const unsigned char *inbuf, unsigned long len) + bool Add(const unsigned char *inbuf, unsigned long long len) { if (Done) return false; @@ -73,7 +73,7 @@ class SHA512Summation : public SHA2SummationBase unsigned char Sum[64]; public: - bool Add(const unsigned char *inbuf, unsigned long len) + bool Add(const unsigned char *inbuf, unsigned long long len) { if (Done) return false; diff --git a/apt-pkg/contrib/sha2_internal.cc b/apt-pkg/contrib/sha2_internal.cc index 565db2f91..6d27e8f2b 100644 --- a/apt-pkg/contrib/sha2_internal.cc +++ b/apt-pkg/contrib/sha2_internal.cc @@ -31,6 +31,7 @@ * * $Id: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $ */ +#include <config.h> #include <string.h> /* memcpy()/memset() or bcopy()/bzero() */ #include <assert.h> /* assert() */ @@ -604,7 +605,12 @@ void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) { *context->buffer = 0x80; } /* Set the bit count: */ - *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; + union { + sha2_byte* c; + sha2_word64* l; + } bitcount; + bitcount.c = &context->buffer[SHA256_SHORT_BLOCK_LENGTH]; + *(bitcount.l) = context->bitcount; /* Final transform: */ SHA256_Transform(context, (sha2_word32*)context->buffer); @@ -921,8 +927,13 @@ static void SHA512_Last(SHA512_CTX* context) { *context->buffer = 0x80; } /* Store the length of input data (in bits): */ - *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1]; - *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0]; + union { + sha2_byte* c; + sha2_word64* l; + } bitcount; + bitcount.c = &context->buffer[SHA512_SHORT_BLOCK_LENGTH]; + bitcount.l[0] = context->bitcount[1]; + bitcount.l[1] = context->bitcount[0]; /* Final transform: */ SHA512_Transform(context, (sha2_word64*)context->buffer); diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index ab2da2d9a..861cdcbeb 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -15,12 +15,12 @@ ##################################################################### */ /*}}}*/ // Includes /*{{{*/ +#include <config.h> + #include <apt-pkg/strutl.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/error.h> -#include <apti18n.h> - #include <ctype.h> #include <string.h> #include <stdio.h> @@ -31,7 +31,7 @@ #include <stdarg.h> #include <iconv.h> -#include "config.h" +#include <apti18n.h> using namespace std; /*}}}*/ @@ -179,14 +179,14 @@ bool ParseQuoteWord(const char *&String,string &Res) { if (*C == '"') { - for (C++; *C != 0 && *C != '"'; C++); - if (*C == 0) + C = strchr(C + 1, '"'); + if (C == NULL) return false; } if (*C == '[') { - for (C++; *C != 0 && *C != ']'; C++); - if (*C == 0) + C = strchr(C + 1, ']'); + if (C == NULL) return false; } } @@ -271,7 +271,7 @@ bool ParseCWord(const char *&String,string &Res) string QuoteString(const string &Str, const char *Bad) { string Res; - for (string::const_iterator I = Str.begin(); I != Str.end(); I++) + for (string::const_iterator I = Str.begin(); I != Str.end(); ++I) { if (strchr(Bad,*I) != 0 || isprint(*I) == 0 || *I == 0x25 || // percent '%' char @@ -298,7 +298,7 @@ string DeQuoteString(string::const_iterator const &begin, string::const_iterator const &end) { string Res; - for (string::const_iterator I = begin; I != end; I++) + for (string::const_iterator I = begin; I != end; ++I) { if (*I == '%' && I + 2 < end && isxdigit(I[1]) && isxdigit(I[2])) @@ -632,7 +632,7 @@ string LookupTag(const string &Message,const char *Tag,const char *Default) { // Look for a matching tag. int Length = strlen(Tag); - for (string::const_iterator I = Message.begin(); I + Length < Message.end(); I++) + for (string::const_iterator I = Message.begin(); I + Length < Message.end(); ++I) { // Found the tag if (I[Length] == ':' && stringcasecmp(I,I+Length,Tag) == 0) @@ -640,14 +640,14 @@ string LookupTag(const string &Message,const char *Tag,const char *Default) // Find the end of line and strip the leading/trailing spaces string::const_iterator J; I += Length + 1; - for (; isspace(*I) != 0 && I < Message.end(); I++); - for (J = I; *J != '\n' && J < Message.end(); J++); - for (; J > I && isspace(J[-1]) != 0; J--); + for (; isspace(*I) != 0 && I < Message.end(); ++I); + for (J = I; *J != '\n' && J < Message.end(); ++J); + for (; J > I && isspace(J[-1]) != 0; --J); return string(I,J); } - for (; *I != '\n' && I < Message.end(); I++); + for (; *I != '\n' && I < Message.end(); ++I); } // Failed to find a match @@ -904,11 +904,10 @@ bool StrToTime(const string &Val,time_t &Result) { struct tm Tm; char Month[10]; - const char *I = Val.c_str(); - + // Skip the day of the week - for (;*I != 0 && *I != ' '; I++); - + const char *I = strchr(Val.c_str(), ' '); + // Handle RFC 1123 time Month[0] = 0; if (sscanf(I," %d %3s %d %d:%d:%d GMT",&Tm.tm_mday,Month,&Tm.tm_year, @@ -970,6 +969,34 @@ bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base) return true; } /*}}}*/ +// StrToNum - Convert a fixed length string to a number /*{{{*/ +// --------------------------------------------------------------------- +/* This is used in decoding the crazy fixed length string headers in + tar and ar files. */ +bool StrToNum(const char *Str,unsigned long long &Res,unsigned Len,unsigned Base) +{ + char S[30]; + if (Len >= sizeof(S)) + return false; + memcpy(S,Str,Len); + S[Len] = 0; + + // All spaces is a zero + Res = 0; + unsigned I; + for (I = 0; S[I] == ' '; I++); + if (S[I] == 0) + return true; + + char *End; + Res = strtoull(S,&End,Base); + if (End == S) + return false; + + return true; +} + /*}}}*/ + // Base256ToNum - Convert a fixed length binary to a number /*{{{*/ // --------------------------------------------------------------------- /* This is used in decoding the 256bit encoded fixed length fields in @@ -1224,7 +1251,7 @@ int tolower_ascii(int const c) bool CheckDomainList(const string &Host,const string &List) { string::const_iterator Start = List.begin(); - for (string::const_iterator Cur = List.begin(); Cur <= List.end(); Cur++) + for (string::const_iterator Cur = List.begin(); Cur <= List.end(); ++Cur) { if (Cur < List.end() && *Cur != ',') continue; @@ -1248,7 +1275,7 @@ string DeEscapeString(const string &input) char tmp[3]; string::const_iterator it, escape_start; string output, octal, hex; - for (it = input.begin(); it != input.end(); it++) + for (it = input.begin(); it != input.end(); ++it) { // just copy non-escape chars if (*it != '\\') @@ -1264,7 +1291,7 @@ string DeEscapeString(const string &input) // copy output += *it; // advance iterator one step further - it += 1; + ++it; continue; } @@ -1273,7 +1300,7 @@ string DeEscapeString(const string &input) continue; // read it - it++; + ++it; switch (*it) { case '0': @@ -1310,7 +1337,7 @@ void URI::CopyFrom(const string &U) string::const_iterator I = U.begin(); // Locate the first colon, this separates the scheme - for (; I < U.end() && *I != ':' ; I++); + for (; I < U.end() && *I != ':' ; ++I); string::const_iterator FirstColon = I; /* Determine if this is a host type URI with a leading double // @@ -1322,7 +1349,7 @@ void URI::CopyFrom(const string &U) /* Find the / indicating the end of the hostname, ignoring /'s in the square brackets */ bool InBracket = false; - for (; SingleSlash < U.end() && (*SingleSlash != '/' || InBracket == true); SingleSlash++) + for (; SingleSlash < U.end() && (*SingleSlash != '/' || InBracket == true); ++SingleSlash) { if (*SingleSlash == '[') InBracket = true; @@ -1355,11 +1382,11 @@ void URI::CopyFrom(const string &U) I = FirstColon + 1; if (I > SingleSlash) I = SingleSlash; - for (; I < SingleSlash && *I != ':'; I++); + for (; I < SingleSlash && *I != ':'; ++I); string::const_iterator SecondColon = I; // Search for the @ after the colon - for (; I < SingleSlash && *I != '@'; I++); + for (; I < SingleSlash && *I != '@'; ++I); string::const_iterator At = I; // Now write the host and user/pass diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index fba85cf94..93f4bef4f 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -27,59 +27,56 @@ #include "macros.h" -using std::string; -using std::vector; -using std::ostream; - -bool UTF8ToCodeset(const char *codeset, const string &orig, string *dest); +bool UTF8ToCodeset(const char *codeset, const std::string &orig, std::string *dest); char *_strstrip(char *String); char *_strtabexpand(char *String,size_t Len); -bool ParseQuoteWord(const char *&String,string &Res); -bool ParseCWord(const char *&String,string &Res); -string QuoteString(const string &Str,const char *Bad); -string DeQuoteString(const string &Str); -string DeQuoteString(string::const_iterator const &begin, string::const_iterator const &end); +bool ParseQuoteWord(const char *&String,std::string &Res); +bool ParseCWord(const char *&String,std::string &Res); +std::string QuoteString(const std::string &Str,const char *Bad); +std::string DeQuoteString(const std::string &Str); +std::string DeQuoteString(std::string::const_iterator const &begin, std::string::const_iterator const &end); // unescape (\0XX and \xXX) from a string -string DeEscapeString(const string &input); - -string SizeToStr(double Bytes); -string TimeToStr(unsigned long Sec); -string Base64Encode(const string &Str); -string OutputInDepth(const unsigned long Depth, const char* Separator=" "); -string URItoFileName(const string &URI); -string TimeRFC1123(time_t Date); +std::string DeEscapeString(const std::string &input); + +std::string SizeToStr(double Bytes); +std::string TimeToStr(unsigned long Sec); +std::string Base64Encode(const std::string &Str); +std::string OutputInDepth(const unsigned long Depth, const char* Separator=" "); +std::string URItoFileName(const std::string &URI); +std::string TimeRFC1123(time_t Date); bool RFC1123StrToTime(const char* const str,time_t &time) __must_check; bool FTPMDTMStrToTime(const char* const str,time_t &time) __must_check; -__deprecated bool StrToTime(const string &Val,time_t &Result); -string LookupTag(const string &Message,const char *Tag,const char *Default = 0); -int StringToBool(const string &Text,int Default = -1); -bool ReadMessages(int Fd, vector<string> &List); +__deprecated bool StrToTime(const std::string &Val,time_t &Result); +std::string LookupTag(const std::string &Message,const char *Tag,const char *Default = 0); +int StringToBool(const std::string &Text,int Default = -1); +bool ReadMessages(int Fd, std::vector<std::string> &List); bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0); +bool StrToNum(const char *Str,unsigned long long &Res,unsigned Len,unsigned Base = 0); bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len); -bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length); +bool Hex2Num(const std::string &Str,unsigned char *Num,unsigned int Length); bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); -vector<string> VectorizeString(string const &haystack, char const &split) __attrib_const; -void ioprintf(ostream &out,const char *format,...) __like_printf(2); -void strprintf(string &out,const char *format,...) __like_printf(2); +std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) __attrib_const; +void ioprintf(std::ostream &out,const char *format,...) __like_printf(2); +void strprintf(std::string &out,const char *format,...) __like_printf(2); char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_printf(3); -bool CheckDomainList(const string &Host, const string &List); +bool CheckDomainList(const std::string &Host, const std::string &List); int tolower_ascii(int const c) __attrib_const __hot; -string StripEpoch(const string &VerStr); +std::string StripEpoch(const std::string &VerStr); #define APT_MKSTRCMP(name,func) \ inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B+strlen(B));}; \ inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \ -inline int name(const string& A,const char *B) {return func(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));}; \ -inline int name(const string& A,const string& B) {return func(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());}; \ -inline int name(const string& A,const char *B,const char *BEnd) {return func(A.c_str(),A.c_str()+A.length(),B,BEnd);}; +inline int name(const std::string& A,const char *B) {return func(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));}; \ +inline int name(const std::string& A,const std::string& B) {return func(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());}; \ +inline int name(const std::string& A,const char *B,const char *BEnd) {return func(A.c_str(),A.c_str()+A.length(),B,BEnd);}; #define APT_MKSTRCMP2(name,func) \ inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \ -inline int name(const string& A,const char *B) {return func(A.begin(),A.end(),B,B+strlen(B));}; \ -inline int name(const string& A,const string& B) {return func(A.begin(),A.end(),B.begin(),B.end());}; \ -inline int name(const string& A,const char *B,const char *BEnd) {return func(A.begin(),A.end(),B,BEnd);}; +inline int name(const std::string& A,const char *B) {return func(A.begin(),A.end(),B,B+strlen(B));}; \ +inline int name(const std::string& A,const std::string& B) {return func(A.begin(),A.end(),B.begin(),B.end());}; \ +inline int name(const std::string& A,const char *B,const char *BEnd) {return func(A.begin(),A.end(),B,BEnd);}; int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd); int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd); @@ -88,17 +85,17 @@ int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd) case the definition of string::const_iterator is not the same as const char * and we need these extra functions */ #if __GNUC__ >= 3 -int stringcmp(string::const_iterator A,string::const_iterator AEnd, +int stringcmp(std::string::const_iterator A,std::string::const_iterator AEnd, const char *B,const char *BEnd); -int stringcmp(string::const_iterator A,string::const_iterator AEnd, - string::const_iterator B,string::const_iterator BEnd); -int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, +int stringcmp(std::string::const_iterator A,std::string::const_iterator AEnd, + std::string::const_iterator B,std::string::const_iterator BEnd); +int stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd, const char *B,const char *BEnd); -int stringcasecmp(string::const_iterator A,string::const_iterator AEnd, - string::const_iterator B,string::const_iterator BEnd); +int stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd, + std::string::const_iterator B,std::string::const_iterator BEnd); -inline int stringcmp(string::const_iterator A,string::const_iterator Aend,const char *B) {return stringcmp(A,Aend,B,B+strlen(B));}; -inline int stringcasecmp(string::const_iterator A,string::const_iterator Aend,const char *B) {return stringcasecmp(A,Aend,B,B+strlen(B));}; +inline int stringcmp(std::string::const_iterator A,std::string::const_iterator Aend,const char *B) {return stringcmp(A,Aend,B,B+strlen(B));}; +inline int stringcasecmp(std::string::const_iterator A,std::string::const_iterator Aend,const char *B) {return stringcasecmp(A,Aend,B,B+strlen(B));}; #endif APT_MKSTRCMP2(stringcmp,stringcmp); @@ -108,34 +105,34 @@ inline const char *DeNull(const char *s) {return (s == 0?"(null)":s);}; class URI { - void CopyFrom(const string &From); + void CopyFrom(const std::string &From); public: - string Access; - string User; - string Password; - string Host; - string Path; + std::string Access; + std::string User; + std::string Password; + std::string Host; + std::string Path; unsigned int Port; - operator string(); - inline void operator =(const string &From) {CopyFrom(From);}; + operator std::string(); + inline void operator =(const std::string &From) {CopyFrom(From);}; inline bool empty() {return Access.empty();}; - static string SiteOnly(const string &URI); - static string NoUserPassword(const string &URI); + static std::string SiteOnly(const std::string &URI); + static std::string NoUserPassword(const std::string &URI); - URI(string Path) {CopyFrom(Path);}; + URI(std::string Path) {CopyFrom(Path);}; URI() : Port(0) {}; }; struct SubstVar { const char *Subst; - const string *Contents; + const std::string *Contents; }; -string SubstVar(string Str,const struct SubstVar *Vars); -string SubstVar(const string &Str,const string &Subst,const string &Contents); +std::string SubstVar(std::string Str,const struct SubstVar *Vars); +std::string SubstVar(const std::string &Str,const std::string &Subst,const std::string &Contents); struct RxChoiceList { diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index c9e7f1176..27c1f7f32 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -9,6 +9,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/debindexfile.h> #include <apt-pkg/debsrcrecords.h> #include <apt-pkg/deblistparser.h> @@ -352,7 +354,7 @@ pkgCache::PkgFileIterator debPackagesIndex::FindInCache(pkgCache &Cache) const { string FileName = IndexFile("Packages"); pkgCache::PkgFileIterator File = Cache.FileBegin(); - for (; File.end() == false; File++) + for (; File.end() == false; ++File) { if (File.FileName() == NULL || FileName != File.FileName()) continue; @@ -540,7 +542,7 @@ pkgCache::PkgFileIterator debTranslationsIndex::FindInCache(pkgCache &Cache) con string FileName = IndexFile(Language); pkgCache::PkgFileIterator File = Cache.FileBegin(); - for (; File.end() == false; File++) + for (; File.end() == false; ++File) { if (FileName != File.FileName()) continue; @@ -620,7 +622,7 @@ bool debStatusIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const pkgCache::PkgFileIterator debStatusIndex::FindInCache(pkgCache &Cache) const { pkgCache::PkgFileIterator File = Cache.FileBegin(); - for (; File.end() == false; File++) + for (; File.end() == false; ++File) { if (this->File != File.FileName()) continue; diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index 678c22473..9e64d4476 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -26,14 +26,14 @@ class debStatusIndex : public pkgIndexFile void *d; protected: - string File; + std::string File; public: virtual const Type *GetType() const; // Interface for acquire - virtual string Describe(bool Short) const {return File;}; + virtual std::string Describe(bool Short) const {return File;}; // Interface for the Cache Generator virtual bool Exists() const; @@ -43,7 +43,7 @@ class debStatusIndex : public pkgIndexFile bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog, unsigned long const Flag) const; virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; - debStatusIndex(string File); + debStatusIndex(std::string File); virtual ~debStatusIndex() {}; }; @@ -52,25 +52,25 @@ class debPackagesIndex : public pkgIndexFile /** \brief dpointer placeholder (for later in case we need it) */ void *d; - string URI; - string Dist; - string Section; - string Architecture; + std::string URI; + std::string Dist; + std::string Section; + std::string Architecture; - string Info(const char *Type) const; - string IndexFile(const char *Type) const; - string IndexURI(const char *Type) const; + std::string Info(const char *Type) const; + std::string IndexFile(const char *Type) const; + std::string IndexURI(const char *Type) const; public: virtual const Type *GetType() const; // Stuff for accessing files on remote items - virtual string ArchiveInfo(pkgCache::VerIterator Ver) const; - virtual string ArchiveURI(string File) const {return URI + File;}; + virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const; + virtual std::string ArchiveURI(std::string File) const {return URI + File;}; // Interface for acquire - virtual string Describe(bool Short) const; + virtual std::string Describe(bool Short) const; // Interface for the Cache Generator virtual bool Exists() const; @@ -79,8 +79,8 @@ class debPackagesIndex : public pkgIndexFile virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const; virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; - debPackagesIndex(string const &URI, string const &Dist, string const &Section, - bool const &Trusted, string const &Arch = "native"); + debPackagesIndex(std::string const &URI, std::string const &Dist, std::string const &Section, + bool const &Trusted, std::string const &Arch = "native"); virtual ~debPackagesIndex() {}; }; @@ -89,23 +89,23 @@ class debTranslationsIndex : public pkgIndexFile /** \brief dpointer placeholder (for later in case we need it) */ void *d; - string URI; - string Dist; - string Section; + std::string URI; + std::string Dist; + std::string Section; const char * const Language; - string Info(const char *Type) const; - string IndexFile(const char *Type) const; - string IndexURI(const char *Type) const; + std::string Info(const char *Type) const; + std::string IndexFile(const char *Type) const; + std::string IndexURI(const char *Type) const; - inline string TranslationFile() const {return string("Translation-").append(Language);}; + inline std::string TranslationFile() const {return std::string("Translation-").append(Language);}; public: virtual const Type *GetType() const; // Interface for acquire - virtual string Describe(bool Short) const; + virtual std::string Describe(bool Short) const; virtual bool GetIndexes(pkgAcquire *Owner) const; // Interface for the Cache Generator @@ -115,7 +115,7 @@ class debTranslationsIndex : public pkgIndexFile virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const; virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; - debTranslationsIndex(string URI,string Dist,string Section, char const * const Language); + debTranslationsIndex(std::string URI,std::string Dist,std::string Section, char const * const Language); virtual ~debTranslationsIndex() {}; }; @@ -124,25 +124,25 @@ class debSourcesIndex : public pkgIndexFile /** \brief dpointer placeholder (for later in case we need it) */ void *d; - string URI; - string Dist; - string Section; + std::string URI; + std::string Dist; + std::string Section; - string Info(const char *Type) const; - string IndexFile(const char *Type) const; - string IndexURI(const char *Type) const; + std::string Info(const char *Type) const; + std::string IndexFile(const char *Type) const; + std::string IndexURI(const char *Type) const; public: virtual const Type *GetType() const; // Stuff for accessing files on remote items - virtual string SourceInfo(pkgSrcRecords::Parser const &Record, + virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record, pkgSrcRecords::File const &File) const; - virtual string ArchiveURI(string File) const {return URI + File;}; + virtual std::string ArchiveURI(std::string File) const {return URI + File;}; // Interface for acquire - virtual string Describe(bool Short) const; + virtual std::string Describe(bool Short) const; // Interface for the record parsers virtual pkgSrcRecords::Parser *CreateSrcParser() const; @@ -152,7 +152,7 @@ class debSourcesIndex : public pkgIndexFile virtual bool HasPackages() const {return false;}; virtual unsigned long Size() const; - debSourcesIndex(string URI,string Dist,string Section,bool Trusted); + debSourcesIndex(std::string URI,std::string Dist,std::string Section,bool Trusted); virtual ~debSourcesIndex() {}; }; diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index e4f3f9582..28568d5e3 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -10,11 +10,14 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/deblistparser.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> #include <apt-pkg/aptconfiguration.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> #include <apt-pkg/crc-16.h> #include <apt-pkg/md5.h> #include <apt-pkg/macros.h> @@ -23,6 +26,8 @@ #include <ctype.h> /*}}}*/ +using std::string; + static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Important}, {"required",pkgCache::State::Required}, {"standard",pkgCache::State::Standard}, @@ -69,10 +74,7 @@ string debListParser::Package() { // --------------------------------------------------------------------- /* This will return the Architecture of the package this section describes */ string debListParser::Architecture() { - std::string const Arch = Section.FindS("Architecture"); - if (Arch.empty() == true) - return _config->Find("APT::Architecture"); - return Arch; + return Section.FindS("Architecture"); } /*}}}*/ // ListParser::ArchitectureAll /*{{{*/ @@ -198,7 +200,7 @@ string debListParser::DescriptionLanguage() std::vector<string> const lang = APT::Configuration::getLanguages(true); for (std::vector<string>::const_iterator l = lang.begin(); - l != lang.end(); l++) + l != lang.end(); ++l) if (Section.FindS(string("Description-").append(*l).c_str()).empty() == false) return *l; @@ -520,9 +522,9 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, // Skip whitespace for (;I != Stop && isspace(*I) != 0; I++); Start = I; - for (;I != Stop && *I != ')'; I++); - if (I == Stop || Start == I) - return 0; + I = (const char*) memchr(I, ')', Stop - I); + if (I == NULL || Start == I) + return 0; // Skip trailing whitespace const char *End = I; @@ -673,6 +675,9 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver) return _error->Error("Problem parsing Provides line"); if (Op != pkgCache::Dep::NoOp) { _error->Warning("Ignoring Provides line with DepCompareOp for package %s", Package.c_str()); + } else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign) { + if (NewProvidesAllArch(Ver, Package, Version) == false) + return false; } else { if (NewProvides(Ver, Package, Arch, Version) == false) return false; @@ -795,21 +800,16 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI, } // seperate the tag from the data - for (; buffer[len] != ':' && buffer[len] != '\0'; ++len) - /* nothing */ - ; - if (buffer[len] == '\0') + const char* dataStart = strchr(buffer + len, ':'); + if (dataStart == NULL) continue; - char* dataStart = buffer + len; + len = dataStart - buffer; for (++dataStart; *dataStart == ' '; ++dataStart) /* nothing */ ; - char* dataEnd = dataStart; - for (++dataEnd; *dataEnd != '\0'; ++dataEnd) - /* nothing */ - ; + const char* dataEnd = (const char*)rawmemchr(dataStart, '\0'); // The last char should be a newline, but we can never be sure: #633350 - char* lineEnd = dataEnd; + const char* lineEnd = dataEnd; for (--lineEnd; *lineEnd == '\r' || *lineEnd == '\n'; --lineEnd) /* nothing */ ; diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 41d712fbf..9519d9711 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -12,7 +12,6 @@ #define PKGLIB_DEBLISTPARSER_H #include <apt-pkg/pkgcachegen.h> -#include <apt-pkg/indexfile.h> #include <apt-pkg/tagfile.h> class debListParser : public pkgCacheGenerator::ListParser @@ -34,7 +33,7 @@ class debListParser : public pkgCacheGenerator::ListParser pkgTagFile Tags; pkgTagSection Section; unsigned long iOffset; - string Arch; + std::string Arch; std::vector<std::string> Architectures; bool MultiArchEnabled; @@ -43,21 +42,21 @@ class debListParser : public pkgCacheGenerator::ListParser bool ParseDepends(pkgCache::VerIterator &Ver,const char *Tag, unsigned int Type); bool ParseProvides(pkgCache::VerIterator &Ver); - bool NewProvidesAllArch(pkgCache::VerIterator &Ver, string const &Package, string const &Version); - static bool GrabWord(string Word,WordList *List,unsigned char &Out); + bool NewProvidesAllArch(pkgCache::VerIterator &Ver, std::string const &Package, std::string const &Version); + static bool GrabWord(std::string Word,WordList *List,unsigned char &Out); public: - static unsigned char GetPrio(string Str); + static unsigned char GetPrio(std::string Str); // These all operate against the current section - virtual string Package(); - virtual string Architecture(); + virtual std::string Package(); + virtual std::string Architecture(); virtual bool ArchitectureAll(); - virtual string Version(); + virtual std::string Version(); virtual bool NewVersion(pkgCache::VerIterator &Ver); - virtual string Description(); - virtual string DescriptionLanguage(); + virtual std::string Description(); + virtual std::string DescriptionLanguage(); virtual MD5SumValue Description_md5(); virtual unsigned short VersionHash(); virtual bool UsePackage(pkgCache::PkgIterator &Pkg, @@ -68,15 +67,15 @@ class debListParser : public pkgCacheGenerator::ListParser virtual bool Step(); bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File, - string section); + std::string section); static const char *ParseDepends(const char *Start,const char *Stop, - string &Package,string &Ver,unsigned int &Op, + std::string &Package,std::string &Ver,unsigned int &Op, bool const &ParseArchFlags = false, bool const &StripMultiArch = true); static const char *ConvertRelation(const char *I,unsigned int &Op); - debListParser(FileFd *File, string const &Arch = ""); + debListParser(FileFd *File, std::string const &Arch = ""); virtual ~debListParser() {}; }; diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 8cbf42579..5d3a80aa5 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -1,14 +1,19 @@ // ijones, walters +#include <config.h> #include <apt-pkg/debmetaindex.h> #include <apt-pkg/debindexfile.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> #include <apt-pkg/acquire-item.h> #include <apt-pkg/configuration.h> #include <apt-pkg/aptconfiguration.h> +#include <apt-pkg/indexrecords.h> +#include <apt-pkg/sourcelist.h> #include <apt-pkg/error.h> #include <set> +#include <algorithm> using namespace std; @@ -197,7 +202,11 @@ vector <struct IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const { } } - std::vector<std::string> const lang = APT::Configuration::getLanguages(true); + std::vector<std::string> lang = APT::Configuration::getLanguages(true); + std::vector<std::string>::iterator lend = std::remove(lang.begin(), lang.end(), "none"); + if (lend != lang.end()) + lang.erase(lend); + if (lang.empty() == true) return IndexTargets; @@ -208,8 +217,7 @@ vector <struct IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const { for (std::set<std::string>::const_iterator s = sections.begin(); s != sections.end(); ++s) { for (std::vector<std::string>::const_iterator l = lang.begin(); - l != lang.end(); l++) { - if (*l == "none") continue; + l != lang.end(); ++l) { IndexTarget * Target = new OptionalIndexTarget(); Target->ShortDesc = "Translation-" + *l; Target->MetaKey = TranslationIndexURISuffix(l->c_str(), *s); @@ -238,7 +246,7 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool const &GetAll) const // special case for --print-uris if (GetAll) { vector <struct IndexTarget *> *targets = ComputeIndexTargets(); - for (vector <struct IndexTarget*>::const_iterator Target = targets->begin(); Target != targets->end(); Target++) { + for (vector <struct IndexTarget*>::const_iterator Target = targets->begin(); Target != targets->end(); ++Target) { new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description, (*Target)->ShortDesc, HashString()); } @@ -295,7 +303,7 @@ vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles() { if (src != ArchEntries.end()) { vector<debSectionEntry const*> const SectionEntries = src->second; for (vector<debSectionEntry const*>::const_iterator I = SectionEntries.begin(); - I != SectionEntries.end(); I++) + I != SectionEntries.end(); ++I) Indexes->push_back(new debSourcesIndex (URI, Dist, (*I)->Section, IsTrusted())); } @@ -310,7 +318,7 @@ vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles() { if (a->first == "source") continue; for (vector<debSectionEntry const*>::const_iterator I = a->second.begin(); - I != a->second.end(); I++) { + I != a->second.end(); ++I) { Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted(), a->first)); sections[(*I)->Section].insert(lang.begin(), lang.end()); } @@ -319,7 +327,7 @@ vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles() { for (map<string, set<string> >::const_iterator s = sections.begin(); s != sections.end(); ++s) for (set<string>::const_iterator l = s->second.begin(); - l != s->second.end(); l++) { + l != s->second.end(); ++l) { if (*l == "none") continue; Indexes->push_back(new debTranslationsIndex(URI,Dist,s->first,(*l).c_str())); } @@ -368,7 +376,7 @@ class debSLTypeDebian : public pkgSourceList::Type map<string, string>::const_iterator const trusted = Options.find("trusted"); for (vector<metaIndex *>::const_iterator I = List.begin(); - I != List.end(); I++) + I != List.end(); ++I) { // We only worry about debian entries here if (strcmp((*I)->GetType(), "deb") != 0) diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 695cfa7cc..0cba2d8a8 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -3,9 +3,10 @@ #define PKGLIB_DEBMETAINDEX_H #include <apt-pkg/metaindex.h> -#include <apt-pkg/sourcelist.h> #include <map> +#include <string> +#include <vector> class debReleaseIndex : public metaIndex { public: @@ -13,43 +14,43 @@ class debReleaseIndex : public metaIndex { class debSectionEntry { public: - debSectionEntry (string const &Section, bool const &IsSrc); - string const Section; + debSectionEntry (std::string const &Section, bool const &IsSrc); + std::string const Section; bool const IsSrc; }; private: /** \brief dpointer placeholder (for later in case we need it) */ void *d; - std::map<string, vector<debSectionEntry const*> > ArchEntries; + std::map<std::string, std::vector<debSectionEntry const*> > ArchEntries; enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; public: - debReleaseIndex(string const &URI, string const &Dist); - debReleaseIndex(string const &URI, string const &Dist, bool const Trusted); + debReleaseIndex(std::string const &URI, std::string const &Dist); + debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted); virtual ~debReleaseIndex(); - virtual string ArchiveURI(string const &File) const {return URI + File;}; + virtual std::string ArchiveURI(std::string const &File) const {return URI + File;}; virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const; - vector <struct IndexTarget *>* ComputeIndexTargets() const; - string Info(const char *Type, string const &Section, string const &Arch="") const; - string MetaIndexInfo(const char *Type) const; - string MetaIndexFile(const char *Types) const; - string MetaIndexURI(const char *Type) const; - string IndexURI(const char *Type, string const &Section, string const &Arch="native") const; - string IndexURISuffix(const char *Type, string const &Section, string const &Arch="native") const; - string SourceIndexURI(const char *Type, const string &Section) const; - string SourceIndexURISuffix(const char *Type, const string &Section) const; - string TranslationIndexURI(const char *Type, const string &Section) const; - string TranslationIndexURISuffix(const char *Type, const string &Section) const; - virtual vector <pkgIndexFile *> *GetIndexFiles(); + std::vector <struct IndexTarget *>* ComputeIndexTargets() const; + std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const; + std::string MetaIndexInfo(const char *Type) const; + std::string MetaIndexFile(const char *Types) const; + std::string MetaIndexURI(const char *Type) const; + std::string IndexURI(const char *Type, std::string const &Section, std::string const &Arch="native") const; + std::string IndexURISuffix(const char *Type, std::string const &Section, std::string const &Arch="native") const; + std::string SourceIndexURI(const char *Type, const std::string &Section) const; + std::string SourceIndexURISuffix(const char *Type, const std::string &Section) const; + std::string TranslationIndexURI(const char *Type, const std::string &Section) const; + std::string TranslationIndexURISuffix(const char *Type, const std::string &Section) const; + virtual std::vector <pkgIndexFile *> *GetIndexFiles(); void SetTrusted(bool const Trusted); virtual bool IsTrusted() const; - void PushSectionEntry(vector<string> const &Archs, const debSectionEntry *Entry); - void PushSectionEntry(string const &Arch, const debSectionEntry *Entry); + void PushSectionEntry(std::vector<std::string> const &Archs, const debSectionEntry *Entry); + void PushSectionEntry(std::string const &Arch, const debSectionEntry *Entry); void PushSectionEntry(const debSectionEntry *Entry); }; diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index f323c03c2..1afa7b74d 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -8,13 +8,19 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/debrecords.h> #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> #include <apt-pkg/aptconfiguration.h> +#include <apt-pkg/fileutl.h> + #include <langinfo.h> /*}}}*/ +using std::string; + // RecordParser::debRecordParser - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -133,9 +139,9 @@ string debRecordParser::LongDesc() orig = Section.FindS("Description").c_str(); else { - vector<string> const lang = APT::Configuration::getLanguages(); - for (vector<string>::const_iterator l = lang.begin(); - orig.empty() && l != lang.end(); l++) + std::vector<string> const lang = APT::Configuration::getLanguages(); + for (std::vector<string>::const_iterator l = lang.begin(); + orig.empty() && l != lang.end(); ++l) orig = Section.FindS(string("Description-").append(*l).c_str()); } diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index 7868bfa3d..9c7ea6b48 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -15,8 +15,8 @@ #define PKGLIB_DEBRECORDS_H #include <apt-pkg/pkgrecords.h> -#include <apt-pkg/indexfile.h> #include <apt-pkg/tagfile.h> +#include <apt-pkg/fileutl.h> class debRecordParser : public pkgRecords::Parser { @@ -35,27 +35,27 @@ class debRecordParser : public pkgRecords::Parser public: // These refer to the archive file for the Version - virtual string FileName(); - virtual string MD5Hash(); - virtual string SHA1Hash(); - virtual string SHA256Hash(); - virtual string SHA512Hash(); - virtual string SourcePkg(); - virtual string SourceVer(); + virtual std::string FileName(); + virtual std::string MD5Hash(); + virtual std::string SHA1Hash(); + virtual std::string SHA256Hash(); + virtual std::string SHA512Hash(); + virtual std::string SourcePkg(); + virtual std::string SourceVer(); // These are some general stats about the package - virtual string Maintainer(); - virtual string ShortDesc(); - virtual string LongDesc(); - virtual string Name(); - virtual string Homepage(); + virtual std::string Maintainer(); + virtual std::string ShortDesc(); + virtual std::string LongDesc(); + virtual std::string Name(); + virtual std::string Homepage(); // An arbitrary custom field - virtual string RecordField(const char *fieldName); + virtual std::string RecordField(const char *fieldName); virtual void GetRec(const char *&Start,const char *&Stop); - debRecordParser(string FileName,pkgCache &Cache); + debRecordParser(std::string FileName,pkgCache &Cache); virtual ~debRecordParser() {}; }; diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index 749305005..ce55ccd1f 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -9,6 +9,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/deblistparser.h> #include <apt-pkg/debsrcrecords.h> #include <apt-pkg/error.h> @@ -19,6 +21,8 @@ using std::max; /*}}}*/ +using std::string; + // SrcRecordParser::Binaries - Return the binaries field /*{{{*/ // --------------------------------------------------------------------- /* This member parses the binaries field into a pair of class arrays and @@ -28,25 +32,32 @@ using std::max; used during scanning to find the right package */ const char **debSrcRecordParser::Binaries() { - // This should use Start/Stop too, it is supposed to be efficient after all. - string Bins = Sect.FindS("Binary"); - if (Bins.empty() == true || Bins.length() >= 102400) - return 0; - - if (Bins.length() >= BufSize) - { - delete [] Buffer; - // allocate new size based on buffer (but never smaller than 4000) - BufSize = max((unsigned int)4000, max((unsigned int)Bins.length()+1,2*BufSize)); - Buffer = new char[BufSize]; - } + const char *Start, *End; + if (Sect.Find("Binary", Start, End) == false) + return NULL; + for (; isspace(*Start) != 0; ++Start); + if (Start >= End) + return NULL; + + StaticBinList.clear(); + free(Buffer); + Buffer = strndup(Start, End - Start); - strcpy(Buffer,Bins.c_str()); - if (TokSplitString(',',Buffer,StaticBinList, - sizeof(StaticBinList)/sizeof(StaticBinList[0])) == false) - return 0; + char* bin = Buffer; + do { + char* binStartNext = strchrnul(bin, ','); + char* binEnd = binStartNext - 1; + for (; isspace(*binEnd) != 0; --binEnd) + binEnd = '\0'; + StaticBinList.push_back(bin); + if (*binStartNext != ',') + break; + *binStartNext = '\0'; + for (bin = binStartNext + 1; isspace(*bin) != 0; ++bin); + } while (*bin != '\0'); + StaticBinList.push_back(NULL); - return (const char **)StaticBinList; + return (const char **) &StaticBinList[0]; } /*}}}*/ // SrcRecordParser::BuildDepends - Return the Build-Depends information /*{{{*/ @@ -55,7 +66,7 @@ const char **debSrcRecordParser::Binaries() package/version records representing the build dependency. The returned array need not be freed and will be reused by the next call to this function */ -bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec> &BuildDeps, +bool debSrcRecordParser::BuildDepends(std::vector<pkgSrcRecords::Parser::BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch) { unsigned int I; @@ -100,7 +111,7 @@ bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec> // --------------------------------------------------------------------- /* This parses the list of files and returns it, each file is required to have a complete source package */ -bool debSrcRecordParser::Files(vector<pkgSrcRecords::File> &List) +bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List) { List.erase(List.begin(),List.end()); diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index aa859b0e6..4c8d03224 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -24,10 +24,9 @@ class debSrcRecordParser : public pkgSrcRecords::Parser FileFd Fd; pkgTagFile Tags; pkgTagSection Sect; - char *StaticBinList[400]; + std::vector<const char*> StaticBinList; unsigned long iOffset; char *Buffer; - unsigned int BufSize; public: @@ -35,24 +34,24 @@ class debSrcRecordParser : public pkgSrcRecords::Parser virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);}; virtual bool Jump(unsigned long const &Off) {iOffset = Off; return Tags.Jump(Sect,Off);}; - virtual string Package() const {return Sect.FindS("Package");}; - virtual string Version() const {return Sect.FindS("Version");}; - virtual string Maintainer() const {return Sect.FindS("Maintainer");}; - virtual string Section() const {return Sect.FindS("Section");}; + virtual std::string Package() const {return Sect.FindS("Package");}; + virtual std::string Version() const {return Sect.FindS("Version");}; + virtual std::string Maintainer() const {return Sect.FindS("Maintainer");}; + virtual std::string Section() const {return Sect.FindS("Section");}; virtual const char **Binaries(); - virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true); + virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true); virtual unsigned long Offset() {return iOffset;}; - virtual string AsStr() + virtual std::string AsStr() { const char *Start=0,*Stop=0; Sect.GetSection(Start,Stop); - return string(Start,Stop); + return std::string(Start,Stop); }; - virtual bool Files(vector<pkgSrcRecords::File> &F); + virtual bool Files(std::vector<pkgSrcRecords::File> &F); - debSrcRecordParser(string const &File,pkgIndexFile const *Index) + debSrcRecordParser(std::string const &File,pkgIndexFile const *Index) : Parser(Index), Fd(File,FileFd::ReadOnlyGzip), Tags(&Fd,102400), - Buffer(0), BufSize(0) {} + Buffer(NULL) {} virtual ~debSrcRecordParser(); }; diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 7644bc66b..7ed6936c3 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -10,6 +10,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/debsystem.h> #include <apt-pkg/debversion.h> #include <apt-pkg/debindexfile.h> @@ -17,13 +19,16 @@ #include <apt-pkg/configuration.h> #include <apt-pkg/error.h> #include <apt-pkg/fileutl.h> -#include <apti18n.h> #include <sys/types.h> #include <unistd.h> #include <dirent.h> #include <errno.h> + +#include <apti18n.h> /*}}}*/ +using std::string; + debSystem debSys; class debSystemPrivate { @@ -216,7 +221,7 @@ signed debSystem::Score(Configuration const &Cnf) // System::AddStatusFiles - Register the status files /*{{{*/ // --------------------------------------------------------------------- /* */ -bool debSystem::AddStatusFiles(vector<pkgIndexFile *> &List) +bool debSystem::AddStatusFiles(std::vector<pkgIndexFile *> &List) { if (d->StatusFile == 0) d->StatusFile = new debStatusIndex(_config->FindFile("Dir::State::status")); diff --git a/apt-pkg/deb/debsystem.h b/apt-pkg/deb/debsystem.h index 232155256..855123516 100644 --- a/apt-pkg/deb/debsystem.h +++ b/apt-pkg/deb/debsystem.h @@ -11,10 +11,12 @@ #define PKGLIB_DEBSYSTEM_H #include <apt-pkg/pkgsystem.h> +#include <apt-pkg/pkgcache.h> class debSystemPrivate; - class debStatusIndex; +class pkgDepCache; + class debSystem : public pkgSystem { // private d-pointer diff --git a/apt-pkg/deb/debversion.cc b/apt-pkg/deb/debversion.cc index 755ffbe96..a02699a44 100644 --- a/apt-pkg/deb/debversion.cc +++ b/apt-pkg/deb/debversion.cc @@ -10,7 +10,7 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#define APT_COMPATIBILITY 986 +#include <config.h> #include <apt-pkg/debversion.h> #include <apt-pkg/pkgcache.h> @@ -127,14 +127,12 @@ int debVersioningSystem::CmpFragment(const char *A,const char *AEnd, int debVersioningSystem::DoCmpVersion(const char *A,const char *AEnd, const char *B,const char *BEnd) { - // Strip off the epoch and compare it - const char *lhs = A; - const char *rhs = B; - for (;lhs != AEnd && *lhs != ':'; lhs++); - for (;rhs != BEnd && *rhs != ':'; rhs++); - if (lhs == AEnd) + // Strip off the epoch and compare it + const char *lhs = (const char*) memchr(A, ':', AEnd - A); + const char *rhs = (const char*) memchr(B, ':', BEnd - B); + if (lhs == NULL) lhs = A; - if (rhs == BEnd) + if (rhs == NULL) rhs = B; // Special case: a zero epoch is the same as no epoch, @@ -169,15 +167,12 @@ int debVersioningSystem::DoCmpVersion(const char *A,const char *AEnd, if (rhs != B) rhs++; - // Find the last - - const char *dlhs = AEnd-1; - const char *drhs = BEnd-1; - for (;dlhs > lhs && *dlhs != '-'; dlhs--); - for (;drhs > rhs && *drhs != '-'; drhs--); - - if (dlhs == lhs) + // Find the last - + const char *dlhs = (const char*) memrchr(lhs, '-', AEnd - lhs); + const char *drhs = (const char*) memrchr(rhs, '-', BEnd - rhs); + if (dlhs == NULL) dlhs = AEnd; - if (drhs == rhs) + if (drhs == NULL) drhs = BEnd; // Compare the main version @@ -262,7 +257,7 @@ bool debVersioningSystem::CheckDep(const char *PkgVer, // debVS::UpstreamVersion - Return the upstream version string /*{{{*/ // --------------------------------------------------------------------- /* This strips all the debian specific information from the version number */ -string debVersioningSystem::UpstreamVersion(const char *Ver) +std::string debVersioningSystem::UpstreamVersion(const char *Ver) { // Strip off the bit before the first colon const char *I = Ver; @@ -277,6 +272,6 @@ string debVersioningSystem::UpstreamVersion(const char *Ver) if (*I == '-') Last = I - Ver; - return string(Ver,Last); + return std::string(Ver,Last); } /*}}}*/ diff --git a/apt-pkg/deb/debversion.h b/apt-pkg/deb/debversion.h index 56fb67887..f1d6f3cc5 100644 --- a/apt-pkg/deb/debversion.h +++ b/apt-pkg/deb/debversion.h @@ -32,39 +32,11 @@ class debVersioningSystem : public pkgVersioningSystem { return DoCmpVersion(A,Aend,B,Bend); } - virtual string UpstreamVersion(const char *A); + virtual std::string UpstreamVersion(const char *A); debVersioningSystem(); }; extern debVersioningSystem debVS; -#ifdef APT_COMPATIBILITY -#if APT_COMPATIBILITY != 986 -#warning "Using APT_COMPATIBILITY" -#endif - -inline int pkgVersionCompare(const char *A, const char *B) -{ - return debVS.CmpVersion(A,B); -} -inline int pkgVersionCompare(const char *A, const char *AEnd, - const char *B, const char *BEnd) -{ - return debVS.DoCmpVersion(A,AEnd,B,BEnd); -} -inline int pkgVersionCompare(string A,string B) -{ - return debVS.CmpVersion(A,B); -} -inline bool pkgCheckDep(const char *DepVer,const char *PkgVer,int Op) -{ - return debVS.CheckDep(PkgVer,Op,DepVer); -} -inline string pkgBaseVersion(const char *Ver) -{ - return debVS.UpstreamVersion(Ver); -} -#endif - #endif diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 019b72bb8..7c0ed5639 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -8,6 +8,8 @@ ##################################################################### */ /*}}}*/ // Includes /*{{{*/ +#include <config.h> + #include <apt-pkg/dpkgpm.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> @@ -16,6 +18,7 @@ #include <apt-pkg/strutl.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/cachefile.h> +#include <apt-pkg/packagemanager.h> #include <unistd.h> #include <stdlib.h> @@ -40,7 +43,6 @@ #include <sys/ioctl.h> #include <pty.h> -#include <config.h> #include <apti18n.h> /*}}}*/ @@ -229,7 +231,7 @@ bool pkgDPkgPM::SendV2Pkgs(FILE *F) fprintf(F,"\n"); // Write out the package actions in order. - for (vector<Item>::iterator I = List.begin(); I != List.end(); I++) + for (vector<Item>::iterator I = List.begin(); I != List.end(); ++I) { if(I->Pkg.end() == true) continue; @@ -351,7 +353,7 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) // Feed it the filenames. if (Version <= 1) { - for (vector<Item>::iterator I = List.begin(); I != List.end(); I++) + for (vector<Item>::iterator I = List.begin(); I != List.end(); ++I) { // Only deal with packages to be installed from .deb if (I->Op != Item::Install) @@ -706,7 +708,7 @@ bool pkgDPkgPM::OpenLog() chmod(history_name.c_str(), 0644); fprintf(d->history_out, "\nStart-Date: %s\n", timestr); string remove, purge, install, reinstall, upgrade, downgrade; - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { enum { CANDIDATE, CANDIDATE_AUTO, CURRENT_CANDIDATE, CURRENT } infostring; string *line = NULL; @@ -884,14 +886,14 @@ bool pkgDPkgPM::Go(int OutStatusFd) // that will be [installed|configured|removed|purged] and add // them to the PackageOps map (the dpkg states it goes through) // and the PackageOpsTranslations (human readable strings) - for (vector<Item>::const_iterator I = List.begin(); I != List.end();I++) + for (vector<Item>::const_iterator I = List.begin(); I != List.end(); ++I) { if((*I).Pkg.end() == true) continue; string const name = (*I).Pkg.Name(); PackageOpsDone[name] = 0; - for(int i=0; (DpkgStatesOpMap[(*I).Op][i]).state != NULL; i++) + for(int i=0; (DpkgStatesOpMap[(*I).Op][i]).state != NULL; ++i) { PackageOps[name].push_back(DpkgStatesOpMap[(*I).Op][i]); PackagesTotal++; @@ -903,13 +905,35 @@ bool pkgDPkgPM::Go(int OutStatusFd) // create log OpenLog(); + // Generate the base argument list for dpkg + std::vector<const char *> Args; + unsigned long StartSize = 0; + string const Tmp = _config->Find("Dir::Bin::dpkg","dpkg"); + Args.push_back(Tmp.c_str()); + StartSize += Tmp.length(); + + // Stick in any custom dpkg options + Configuration::Item const *Opts = _config->Tree("DPkg::Options"); + if (Opts != 0) + { + Opts = Opts->Child; + for (; Opts != 0; Opts = Opts->Next) + { + if (Opts->Value.empty() == true) + continue; + Args.push_back(Opts->Value.c_str()); + StartSize += Opts->Value.length(); + } + } + size_t const BaseArgs = Args.size(); + // this loop is runs once per operation for (vector<Item>::const_iterator I = List.begin(); I != List.end();) { // Do all actions with the same Op in one run vector<Item>::const_iterator J = I; if (TriggersPending == true) - for (; J != List.end(); J++) + for (; J != List.end(); ++J) { if (J->Op == I->Op) continue; @@ -921,14 +945,15 @@ bool pkgDPkgPM::Go(int OutStatusFd) break; } else - for (; J != List.end() && J->Op == I->Op; J++) + for (; J != List.end() && J->Op == I->Op; ++J) /* nothing */; - // Generate the argument list - const char *Args[MaxArgs + 50]; // keep track of allocated strings for multiarch package names - char *Packages[MaxArgs + 50]; - unsigned int pkgcount = 0; + std::vector<char *> Packages; + + // start with the baseset of arguments + unsigned long Size = StartSize; + Args.erase(Args.begin() + BaseArgs, Args.end()); // Now check if we are within the MaxArgs limit // @@ -936,139 +961,122 @@ bool pkgDPkgPM::Go(int OutStatusFd) // the argument list is split in a way that A depends on B // and they are in the same "--configure A B" run // - with the split they may now be configured in different - // runs + // runs, using Immediate-Configure-All can help prevent this. if (J - I > (signed)MaxArgs) + { J = I + MaxArgs; - - unsigned int n = 0; - unsigned long Size = 0; - string const Tmp = _config->Find("Dir::Bin::dpkg","dpkg"); - Args[n++] = Tmp.c_str(); - Size += strlen(Args[n-1]); - - // Stick in any custom dpkg options - Configuration::Item const *Opts = _config->Tree("DPkg::Options"); - if (Opts != 0) + Args.reserve(MaxArgs + 10); + } + else { - Opts = Opts->Child; - for (; Opts != 0; Opts = Opts->Next) - { - if (Opts->Value.empty() == true) - continue; - Args[n++] = Opts->Value.c_str(); - Size += Opts->Value.length(); - } + Args.reserve((J - I) + 10); } + - char status_fd_buf[20]; int fd[2]; pipe(fd); - - Args[n++] = "--status-fd"; - Size += strlen(Args[n-1]); + +#define ADDARG(X) Args.push_back(X); Size += strlen(X) +#define ADDARGC(X) Args.push_back(X); Size += sizeof(X) - 1 + + ADDARGC("--status-fd"); + char status_fd_buf[20]; snprintf(status_fd_buf,sizeof(status_fd_buf),"%i", fd[1]); - Args[n++] = status_fd_buf; - Size += strlen(Args[n-1]); + ADDARG(status_fd_buf); + unsigned long const Op = I->Op; switch (I->Op) { case Item::Remove: - Args[n++] = "--force-depends"; - Size += strlen(Args[n-1]); - Args[n++] = "--force-remove-essential"; - Size += strlen(Args[n-1]); - Args[n++] = "--remove"; - Size += strlen(Args[n-1]); + ADDARGC("--force-depends"); + ADDARGC("--force-remove-essential"); + ADDARGC("--remove"); break; case Item::Purge: - Args[n++] = "--force-depends"; - Size += strlen(Args[n-1]); - Args[n++] = "--force-remove-essential"; - Size += strlen(Args[n-1]); - Args[n++] = "--purge"; - Size += strlen(Args[n-1]); + ADDARGC("--force-depends"); + ADDARGC("--force-remove-essential"); + ADDARGC("--purge"); break; case Item::Configure: - Args[n++] = "--configure"; - Size += strlen(Args[n-1]); + ADDARGC("--configure"); break; case Item::ConfigurePending: - Args[n++] = "--configure"; - Size += strlen(Args[n-1]); - Args[n++] = "--pending"; - Size += strlen(Args[n-1]); + ADDARGC("--configure"); + ADDARGC("--pending"); break; case Item::TriggersPending: - Args[n++] = "--triggers-only"; - Size += strlen(Args[n-1]); - Args[n++] = "--pending"; - Size += strlen(Args[n-1]); + ADDARGC("--triggers-only"); + ADDARGC("--pending"); break; case Item::Install: - Args[n++] = "--unpack"; - Size += strlen(Args[n-1]); - Args[n++] = "--auto-deconfigure"; - Size += strlen(Args[n-1]); + ADDARGC("--unpack"); + ADDARGC("--auto-deconfigure"); break; } if (NoTriggers == true && I->Op != Item::TriggersPending && I->Op != Item::ConfigurePending) { - Args[n++] = "--no-triggers"; - Size += strlen(Args[n-1]); + ADDARGC("--no-triggers"); } +#undef ADDARGC // Write in the file or package names if (I->Op == Item::Install) { - for (;I != J && Size < MaxArgBytes; I++) + for (;I != J && Size < MaxArgBytes; ++I) { if (I->File[0] != '/') return _error->Error("Internal Error, Pathname to install is not absolute '%s'",I->File.c_str()); - Args[n++] = I->File.c_str(); - Size += strlen(Args[n-1]); + Args.push_back(I->File.c_str()); + Size += I->File.length(); } - } + } else { string const nativeArch = _config->Find("APT::Architecture"); unsigned long const oldSize = I->Op == Item::Configure ? Size : 0; - for (;I != J && Size < MaxArgBytes; I++) + for (;I != J && Size < MaxArgBytes; ++I) { if((*I).Pkg.end() == true) continue; if (I->Op == Item::Configure && disappearedPkgs.find(I->Pkg.Name()) != disappearedPkgs.end()) continue; if (I->Pkg.Arch() == nativeArch || !strcmp(I->Pkg.Arch(), "all")) - Args[n++] = I->Pkg.Name(); + { + char const * const name = I->Pkg.Name(); + ADDARG(name); + } else { - Packages[pkgcount] = strdup(I->Pkg.FullName(false).c_str()); - Args[n++] = Packages[pkgcount++]; + char * const fullname = strdup(I->Pkg.FullName(false).c_str()); + Packages.push_back(fullname); + ADDARG(fullname); } - Size += strlen(Args[n-1]); } // skip configure action if all sheduled packages disappeared if (oldSize == Size) continue; } - Args[n] = 0; +#undef ADDARG + J = I; if (_config->FindB("Debug::pkgDPkgPM",false) == true) { - for (unsigned int k = 0; k != n; k++) - clog << Args[k] << ' '; + for (std::vector<const char *>::const_iterator a = Args.begin(); + a != Args.end(); ++a) + clog << *a << ' '; clog << endl; continue; } - + Args.push_back(NULL); + cout << flush; clog << flush; cerr << flush; @@ -1078,8 +1086,13 @@ bool pkgDPkgPM::Go(int OutStatusFd) it to all processes in the group. Since dpkg ignores the signal it doesn't die but we do! So we must also ignore it */ sighandler_t old_SIGQUIT = signal(SIGQUIT,SIG_IGN); - sighandler_t old_SIGINT = signal(SIGINT,SIG_IGN); - + sighandler_t old_SIGINT = signal(SIGINT,SigINT); + + // Check here for any SIGINT + if (pkgPackageManager::SigINTStop && (Op == Item::Remove || Op == Item::Purge || Op == Item::Install)) + break; + + // ignore SIGHUP as well (debian #463030) sighandler_t old_SIGHUP = signal(SIGHUP,SIG_IGN); @@ -1117,7 +1130,6 @@ bool pkgDPkgPM::Go(int OutStatusFd) sigprocmask(SIG_SETMASK, &original_sigmask, 0); } } - // Fork dpkg pid_t Child; _config->Set("APT::Keep-Fds::",fd[1]); @@ -1178,7 +1190,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) /* No Job Control Stop Env is a magic dpkg var that prevents it from using sigstop */ putenv((char *)"DPKG_NO_TSTP=yes"); - execvp(Args[0],(char **)Args); + execvp(Args[0], (char**) &Args[0]); cerr << "Could not exec dpkg!" << endl; _exit(100); } @@ -1204,10 +1216,11 @@ bool pkgDPkgPM::Go(int OutStatusFd) sigemptyset(&sigmask); sigprocmask(SIG_BLOCK,&sigmask,&original_sigmask); - /* clean up the temporary allocation for multiarch package names in - the parent, so we don't leak memory when we return. */ - for (unsigned int i = 0; i < pkgcount; i++) - free(Packages[i]); + /* free vectors (and therefore memory) as we don't need the included data anymore */ + for (std::vector<char *>::const_iterator p = Packages.begin(); + p != Packages.end(); ++p) + free(*p); + Packages.clear(); // the result of the waitpid call int res; @@ -1223,6 +1236,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); + signal(SIGHUP,old_SIGHUP); return _error->Errno("waitpid","Couldn't wait for subprocess"); } @@ -1263,6 +1277,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); + signal(SIGHUP,old_SIGHUP); if(master >= 0) @@ -1300,6 +1315,9 @@ bool pkgDPkgPM::Go(int OutStatusFd) } } CloseLog(); + + if (pkgPackageManager::SigINTStop) + _error->Warning(_("Operation was interrupted before it could finish")); if (RunScripts("DPkg::Post-Invoke") == false) return false; @@ -1324,6 +1342,11 @@ bool pkgDPkgPM::Go(int OutStatusFd) Cache.writeStateFile(NULL); return true; } + +void SigINT(int sig) { + if (_config->FindB("APT::Immediate-Configure-All",false)) + pkgPackageManager::SigINTStop = true; +} /*}}}*/ // pkgDpkgPM::Reset - Dump the contents of the command list /*{{{*/ // --------------------------------------------------------------------- @@ -1477,7 +1500,7 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) // log the ordering const char *ops_str[] = {"Install", "Configure","Remove","Purge"}; fprintf(report, "AptOrdering:\n"); - for (vector<Item>::iterator I = List.begin(); I != List.end(); I++) + for (vector<Item>::iterator I = List.begin(); I != List.end(); ++I) fprintf(report, " %s: %s\n", (*I).Pkg.Name(), ops_str[(*I).Op]); // attach dmesg log (to learn about segfaults) diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index ddf9485c7..6b62360b7 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -15,9 +15,6 @@ #include <map> #include <stdio.h> -using std::vector; -using std::map; - class pkgDPkgPMPrivate; class pkgDPkgPM : public pkgPackageManager @@ -38,7 +35,7 @@ class pkgDPkgPM : public pkgPackageManager needs to declare a Replaces on the disappeared package. \param pkgname Name of the package that disappeared */ - void handleDisappearAction(string const &pkgname); + void handleDisappearAction(std::string const &pkgname); protected: int pkgFailures; @@ -53,11 +50,11 @@ class pkgDPkgPM : public pkgPackageManager // the dpkg states that the pkg will run through, the string is // the package, the vector contains the dpkg states that the package // will go through - map<string,vector<struct DpkgState> > PackageOps; + std::map<std::string,std::vector<struct DpkgState> > PackageOps; // the dpkg states that are already done; the string is the package // the int is the state that is already done (e.g. a package that is // going to be install is already in state "half-installed") - map<string,unsigned int> PackageOpsDone; + std::map<std::string,unsigned int> PackageOpsDone; // progress reporting unsigned int PackagesDone; @@ -66,19 +63,19 @@ class pkgDPkgPM : public pkgPackageManager struct Item { enum Ops {Install, Configure, Remove, Purge, ConfigurePending, TriggersPending} Op; - string File; + std::string File; PkgIterator Pkg; - Item(Ops Op,PkgIterator Pkg,string File = "") : Op(Op), + Item(Ops Op,PkgIterator Pkg,std::string File = "") : Op(Op), File(File), Pkg(Pkg) {}; Item() {}; }; - vector<Item> List; + std::vector<Item> List; // Helpers bool RunScriptsWithPkgs(const char *Cnf); bool SendV2Pkgs(FILE *F); - void WriteHistoryTag(string const &tag, string value); + void WriteHistoryTag(std::string const &tag, std::string value); // apport integration void WriteApportReport(const char *pkgpath, const char *errormsg); @@ -94,7 +91,7 @@ class pkgDPkgPM : public pkgPackageManager void ProcessDpkgStatusLine(int OutStatusFd, char *line); // The Actuall installation implementation - virtual bool Install(PkgIterator Pkg,string File); + virtual bool Install(PkgIterator Pkg,std::string File); virtual bool Configure(PkgIterator Pkg); virtual bool Remove(PkgIterator Pkg,bool Purge = false); virtual bool Go(int StatusFd=-1); @@ -106,4 +103,6 @@ class pkgDPkgPM : public pkgPackageManager virtual ~pkgDPkgPM(); }; +void SigINT(int sig); + #endif diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index ee9315069..529e9240d 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -8,28 +8,33 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/depcache.h> #include <apt-pkg/version.h> #include <apt-pkg/versionmatch.h> #include <apt-pkg/error.h> #include <apt-pkg/sptr.h> #include <apt-pkg/algorithms.h> - #include <apt-pkg/fileutl.h> #include <apt-pkg/strutl.h> #include <apt-pkg/configuration.h> #include <apt-pkg/aptconfiguration.h> #include <apt-pkg/pkgsystem.h> #include <apt-pkg/tagfile.h> +#include <apt-pkg/progress.h> #include <iostream> -#include <sstream> +#include <sstream> #include <set> #include <sys/stat.h> -#include <apti18n.h> +#include <apti18n.h> /*}}}*/ + +using std::string; + // helper for Install-Recommends-Sections and Never-MarkAuto-Sections /*{{{*/ static bool ConfigValueInSubTree(const char* SubTree, const char *needle) @@ -129,7 +134,7 @@ bool pkgDepCache::Init(OpProgress *Prog) /* Set the current state of everything. In this state all of the packages are kept exactly as is. See AllUpgrade */ int Done = 0; - for (PkgIterator I = PkgBegin(); I.end() != true; I++,Done++) + for (PkgIterator I = PkgBegin(); I.end() != true; ++I, ++Done) { if (Prog != 0 && Done%20 == 0) Prog->Progress(Done); @@ -169,14 +174,14 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/ string const state = _config->FindFile("Dir::State::extended_states"); if(RealFileExists(state)) { state_file.Open(state, FileFd::ReadOnly); - int const file_size = state_file.Size(); + off_t const file_size = state_file.Size(); if(Prog != NULL) Prog->OverallProgress(0, file_size, 1, _("Reading state information")); pkgTagFile tagfile(&state_file); pkgTagSection section; - int amt = 0; + off_t amt = 0; bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); while(tagfile.Step(section)) { string const pkgname = section.FindS("Package"); @@ -292,7 +297,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ // then write the ones we have not seen yet std::ostringstream ostr; - for(pkgCache::PkgIterator pkg=Cache->PkgBegin(); !pkg.end(); pkg++) { + for(pkgCache::PkgIterator pkg=Cache->PkgBegin(); !pkg.end(); ++pkg) { StateCache const &P = PkgState[pkg->ID]; if(P.Flags & Flag::Auto) { if (pkgs_seen.find(pkg.FullName()) != pkgs_seen.end()) { @@ -365,7 +370,7 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res) // Check the providing packages PrvIterator P = Dep.TargetPkg().ProvidesList(); PkgIterator Pkg = Dep.ParentPkg(); - for (; P.end() != true; P++) + for (; P.end() != true; ++P) { /* Provides may never be applied against the same package (or group) if it is a conflicts. See the comment above. */ @@ -534,7 +539,7 @@ void pkgDepCache::BuildGroupOrs(VerIterator const &V) { unsigned char Group = 0; - for (DepIterator D = V.DependsList(); D.end() != true; D++) + for (DepIterator D = V.DependsList(); D.end() != true; ++D) { // Build the dependency state. unsigned char &State = DepState[D->ID]; @@ -574,7 +579,7 @@ unsigned char pkgDepCache::VersionState(DepIterator D,unsigned char Check, // Compute a single dependency element (glob or) DepIterator Start = D; unsigned char State = 0; - for (bool LastOR = true; D.end() == false && LastOR == true; D++) + for (bool LastOR = true; D.end() == false && LastOR == true; ++D) { State |= DepState[D->ID]; LastOR = (D->CompareOp & Dep::Or) == Dep::Or; @@ -664,15 +669,15 @@ void pkgDepCache::Update(OpProgress *Prog) // Perform the depends pass int Done = 0; - for (PkgIterator I = PkgBegin(); I.end() != true; I++,Done++) + for (PkgIterator I = PkgBegin(); I.end() != true; ++I, ++Done) { if (Prog != 0 && Done%20 == 0) Prog->Progress(Done); - for (VerIterator V = I.VersionList(); V.end() != true; V++) + for (VerIterator V = I.VersionList(); V.end() != true; ++V) { unsigned char Group = 0; - for (DepIterator D = V.DependsList(); D.end() != true; D++) + for (DepIterator D = V.DependsList(); D.end() != true; ++D) { // Build the dependency state. unsigned char &State = DepState[D->ID]; @@ -709,7 +714,7 @@ void pkgDepCache::Update(OpProgress *Prog) void pkgDepCache::Update(DepIterator D) { // Update the reverse deps - for (;D.end() != true; D++) + for (;D.end() != true; ++D) { unsigned char &State = DepState[D->ID]; State = DependencyState(D); @@ -742,13 +747,13 @@ void pkgDepCache::Update(PkgIterator const &Pkg) // Update the provides map for the current ver if (Pkg->CurrentVer != 0) for (PrvIterator P = Pkg.CurrentVer().ProvidesList(); - P.end() != true; P++) + P.end() != true; ++P) Update(P.ParentPkg().RevDependsList()); // Update the provides map for the candidate ver if (PkgState[Pkg->ID].CandidateVer != 0) for (PrvIterator P = PkgState[Pkg->ID].CandidateVerIter(*this).ProvidesList(); - P.end() != true; P++) + P.end() != true; ++P) Update(P.ParentPkg().RevDependsList()); } /*}}}*/ @@ -1009,7 +1014,7 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, DepIterator Start = Dep; bool Result = true; unsigned Ors = 0; - for (bool LastOR = true; Dep.end() == false && LastOR == true; Dep++,Ors++) + for (bool LastOR = true; Dep.end() == false && LastOR == true; ++Dep, ++Ors) { LastOR = (Dep->CompareOp & Dep::Or) == Dep::Or; @@ -1475,12 +1480,12 @@ pkgCache::VerIterator pkgDepCache::Policy::GetCandidateVer(PkgIterator const &Pk unless they are already installed */ VerIterator Last(*(pkgCache *)this,0); - for (VerIterator I = Pkg.VersionList(); I.end() == false; I++) + for (VerIterator I = Pkg.VersionList(); I.end() == false; ++I) { if (Pkg.CurrentVer() == I) return I; - for (VerFileIterator J = I.FileList(); J.end() == false; J++) + for (VerFileIterator J = I.FileList(); J.end() == false; ++J) { if ((J.File()->Flags & Flag::NotSource) != 0) continue; diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index d935c1887..f6e6c0afc 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -40,12 +40,13 @@ #include <apt-pkg/configuration.h> #include <apt-pkg/pkgcache.h> -#include <apt-pkg/progress.h> -#include <apt-pkg/error.h> #include <vector> #include <memory> #include <set> +#include <list> + +class OpProgress; class pkgDepCache : protected pkgCache::Namespace { @@ -338,9 +339,9 @@ class pkgDepCache : protected pkgCache::Namespace inline Header &Head() {return *Cache->HeaderP;}; inline GrpIterator GrpBegin() {return Cache->GrpBegin();}; inline PkgIterator PkgBegin() {return Cache->PkgBegin();}; - inline GrpIterator FindGrp(string const &Name) {return Cache->FindGrp(Name);}; - inline PkgIterator FindPkg(string const &Name) {return Cache->FindPkg(Name);}; - inline PkgIterator FindPkg(string const &Name, string const &Arch) {return Cache->FindPkg(Name, Arch);}; + inline GrpIterator FindGrp(std::string const &Name) {return Cache->FindGrp(Name);}; + inline PkgIterator FindPkg(std::string const &Name) {return Cache->FindPkg(Name);}; + inline PkgIterator FindPkg(std::string const &Name, std::string const &Arch) {return Cache->FindPkg(Name, Arch);}; inline pkgCache &GetCache() {return *Cache;}; inline pkgVersioningSystem &VS() {return *Cache->VS;}; @@ -400,7 +401,7 @@ class pkgDepCache : protected pkgCache::Namespace // @{ bool MarkKeep(PkgIterator const &Pkg, bool Soft = false, bool FromUser = true, unsigned long Depth = 0); - bool MarkDelete(PkgIterator const &Pkg, bool Purge = false, + bool MarkDelete(PkgIterator const &Pkg, bool MarkPurge = false, unsigned long Depth = 0, bool FromUser = true); bool MarkInstall(PkgIterator const &Pkg,bool AutoInst = true, unsigned long Depth = 0, bool FromUser = true, @@ -468,7 +469,7 @@ class pkgDepCache : protected pkgCache::Namespace * \param Depth recursive deep of this Marker call * \param FromUser was the remove requested by the user? */ - virtual bool IsDeleteOk(const PkgIterator &Pkg,bool Purge = false, + virtual bool IsDeleteOk(const PkgIterator &Pkg,bool MarkPurge = false, unsigned long Depth = 0, bool FromUser = true); // read persistent states diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index 4d2230613..791aac72f 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -5,19 +5,28 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/edsp.h> #include <apt-pkg/error.h> +#include <apt-pkg/cacheset.h> #include <apt-pkg/configuration.h> #include <apt-pkg/version.h> #include <apt-pkg/policy.h> #include <apt-pkg/tagfile.h> +#include <apt-pkg/fileutl.h> +#include <apt-pkg/progress.h> -#include <apti18n.h> #include <limits> - #include <stdio.h> + +#include <string> + +#include <apti18n.h> /*}}}*/ +using std::string; + // we could use pkgCache::DepType and ::Priority, but these would be localized strings… const char * const EDSP::PrioMap[] = {0, "important", "required", "standard", "optional", "extra"}; @@ -277,7 +286,7 @@ bool EDSP::ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progres std::string msg = SubstVar(SubstVar(section.FindS("Message"), "\n .\n", "\n\n"), "\n ", "\n"); if (msg.empty() == true) { msg = _("External solver failed without a proper error message"); - _error->Error(msg.c_str()); + _error->Error("%s", msg.c_str()); } else _error->Error("External solver failed with: %s", msg.substr(0,msg.find('\n')).c_str()); if (Progress != NULL) diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h index 743c3f5d1..c14309422 100644 --- a/apt-pkg/edsp.h +++ b/apt-pkg/edsp.h @@ -9,12 +9,17 @@ #ifndef PKGLIB_EDSP_H #define PKGLIB_EDSP_H -#include <apt-pkg/depcache.h> -#include <apt-pkg/cacheset.h> -#include <apt-pkg/progress.h> +#include <apt-pkg/pkgcache.h> +#include <list> #include <string> +namespace APT { + class PackageSet; +}; +class pkgDepCache; +class OpProgress; + class EDSP /*{{{*/ { // we could use pkgCache::DepType and ::Priority, but these would be localized strings… diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc index f5881e663..058cef636 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -6,6 +6,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/edspindexfile.h> #include <apt-pkg/edsplistparser.h> #include <apt-pkg/sourcelist.h> @@ -13,6 +15,7 @@ #include <apt-pkg/progress.h> #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> #include <apt-pkg/acquire-item.h> #include <sys/stat.h> diff --git a/apt-pkg/edsp/edspindexfile.h b/apt-pkg/edsp/edspindexfile.h index 0053388eb..9670c4837 100644 --- a/apt-pkg/edsp/edspindexfile.h +++ b/apt-pkg/edsp/edspindexfile.h @@ -8,7 +8,6 @@ #ifndef PKGLIB_EDSPINDEXFILE_H #define PKGLIB_EDSPINDEXFILE_H -#include <apt-pkg/indexfile.h> #include <apt-pkg/debindexfile.h> class edspIndex : public debStatusIndex @@ -22,7 +21,7 @@ class edspIndex : public debStatusIndex virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const; - edspIndex(string File); + edspIndex(std::string File); }; #endif diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index 3349e8cce..bcfdb1017 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -9,6 +9,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/edsplistparser.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> @@ -18,7 +20,7 @@ /*}}}*/ // ListParser::edspListParser - Constructor /*{{{*/ -edspListParser::edspListParser(FileFd *File, string const &Arch) : debListParser(File, Arch) +edspListParser::edspListParser(FileFd *File, std::string const &Arch) : debListParser(File, Arch) {} /*}}}*/ // ListParser::NewVersion - Fill in the version structure /*{{{*/ @@ -31,11 +33,11 @@ bool edspListParser::NewVersion(pkgCache::VerIterator &Ver) // ListParser::Description - Return the description string /*{{{*/ // --------------------------------------------------------------------- /* Sorry, no description for the resolvers… */ -string edspListParser::Description() +std::string edspListParser::Description() { return ""; } -string edspListParser::DescriptionLanguage() +std::string edspListParser::DescriptionLanguage() { return ""; } @@ -83,7 +85,7 @@ bool edspListParser::ParseStatus(pkgCache::PkgIterator &Pkg, /*}}}*/ // ListParser::LoadReleaseInfo - Load the release information /*{{{*/ bool edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI, - FileFd &File, string component) + FileFd &File, std::string component) { return true; } diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h index ec9f09905..5d82716c7 100644 --- a/apt-pkg/edsp/edsplistparser.h +++ b/apt-pkg/edsp/edsplistparser.h @@ -12,23 +12,22 @@ #define PKGLIB_EDSPLISTPARSER_H #include <apt-pkg/deblistparser.h> -#include <apt-pkg/pkgcachegen.h> -#include <apt-pkg/indexfile.h> -#include <apt-pkg/tagfile.h> + +class FileFd; class edspListParser : public debListParser { public: virtual bool NewVersion(pkgCache::VerIterator &Ver); - virtual string Description(); - virtual string DescriptionLanguage(); + virtual std::string Description(); + virtual std::string DescriptionLanguage(); virtual MD5SumValue Description_md5(); virtual unsigned short VersionHash(); bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File, - string section); + std::string section); - edspListParser(FileFd *File, string const &Arch = ""); + edspListParser(FileFd *File, std::string const &Arch = ""); protected: virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver); diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc index ac0bb8beb..6b9207451 100644 --- a/apt-pkg/edsp/edspsystem.cc +++ b/apt-pkg/edsp/edspsystem.cc @@ -9,17 +9,20 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/edspsystem.h> #include <apt-pkg/debversion.h> #include <apt-pkg/edspindexfile.h> #include <apt-pkg/configuration.h> #include <apt-pkg/error.h> #include <apt-pkg/fileutl.h> -#include <apti18n.h> #include <sys/types.h> #include <unistd.h> #include <dirent.h> #include <errno.h> + +#include <apti18n.h> /*}}}*/ edspSystem edspSys; @@ -94,7 +97,7 @@ signed edspSystem::Score(Configuration const &Cnf) } /*}}}*/ // System::AddStatusFiles - Register the status files /*{{{*/ -bool edspSystem::AddStatusFiles(vector<pkgIndexFile *> &List) +bool edspSystem::AddStatusFiles(std::vector<pkgIndexFile *> &List) { if (StatusFile == 0) { diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 31c577705..4df018ef4 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -10,7 +10,7 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include "indexcopy.h" +#include<config.h> #include <apt-pkg/error.h> #include <apt-pkg/progress.h> @@ -21,7 +21,6 @@ #include <apt-pkg/indexrecords.h> #include <apt-pkg/md5.h> #include <apt-pkg/cdrom.h> -#include <apti18n.h> #include <iostream> #include <sstream> @@ -30,6 +29,10 @@ #include <sys/types.h> #include <fcntl.h> #include <stdio.h> +#include <stdlib.h> + +#include "indexcopy.h" +#include <apti18n.h> /*}}}*/ using namespace std; @@ -43,7 +46,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List, pkgCdromStatus *log) { OpProgress *Progress = NULL; - if (List.size() == 0) + if (List.empty() == true) return true; if(log) @@ -53,8 +56,8 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List, bool Debug = _config->FindB("Debug::aptcdrom",false); // Prepare the progress indicator - unsigned long TotalSize = 0; - for (vector<string>::iterator I = List.begin(); I != List.end(); I++) + off_t TotalSize = 0; + for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) { struct stat Buf; if (stat(string(*I + GetFileName()).c_str(),&Buf) != 0 && @@ -64,14 +67,14 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List, TotalSize += Buf.st_size; } - unsigned long CurrentSize = 0; + off_t CurrentSize = 0; unsigned int NotFound = 0; unsigned int WrongSize = 0; unsigned int Packages = 0; - for (vector<string>::iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) { string OrigPath = string(*I,CDROM.length()); - unsigned long FileSize = 0; + off_t FileSize = 0; // Open the package file FileFd Pkg; @@ -164,7 +167,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List, if(Progress) Progress->Progress(Parser.Offset()); string File; - unsigned long Size; + unsigned long long Size; if (GetFile(File,Size) == false) { fclose(TargetFl); @@ -219,7 +222,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List, } // Size match - if ((unsigned)Buf.st_size != Size) + if ((unsigned long long)Buf.st_size != Size) { if (Debug == true) clog << "Wrong Size: " << File << endl; @@ -453,7 +456,7 @@ bool IndexCopy::GrabFirst(string Path,string &To,unsigned int Depth) // PackageCopy::GetFile - Get the file information from the section /*{{{*/ // --------------------------------------------------------------------- /* */ -bool PackageCopy::GetFile(string &File,unsigned long &Size) +bool PackageCopy::GetFile(string &File,unsigned long long &Size) { File = Section->FindS("Filename"); Size = Section->FindI("Size"); @@ -479,7 +482,7 @@ bool PackageCopy::RewriteEntry(FILE *Target,string File) // SourceCopy::GetFile - Get the file information from the section /*{{{*/ // --------------------------------------------------------------------- /* */ -bool SourceCopy::GetFile(string &File,unsigned long &Size) +bool SourceCopy::GetFile(string &File,unsigned long long &Size) { string Files = Section->FindS("Files"); if (Files.empty() == true) @@ -502,7 +505,7 @@ bool SourceCopy::GetFile(string &File,unsigned long &Size) return _error->Error("Error parsing file record"); // Parse the size and append the directory - Size = atoi(sSize.c_str()); + Size = strtoull(sSize.c_str(), NULL, 10); File = Base + File; return true; } @@ -583,13 +586,13 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList, /*{{{*/ vector<string> PkgList,vector<string> SrcList) { - if (SigList.size() == 0) + if (SigList.empty() == true) return true; bool Debug = _config->FindB("Debug::aptcdrom",false); // Read all Release files - for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); I++) + for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); ++I) { if(Debug) cout << "Signature verify for: " << *I << endl; @@ -633,7 +636,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList, // go over the Indexfiles and see if they verify // if so, remove them from our copy of the lists vector<string> keys = MetaIndex->MetaKeys(); - for (vector<string>::iterator I = keys.begin(); I != keys.end(); I++) + for (vector<string>::iterator I = keys.begin(); I != keys.end(); ++I) { if(!Verify(prefix,*I, MetaIndex)) { // something went wrong, don't copy the Release.gpg @@ -776,7 +779,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ vector<string> &List, pkgCdromStatus *log) { OpProgress *Progress = NULL; - if (List.size() == 0) + if (List.empty() == true) return true; if(log) @@ -785,8 +788,8 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ bool Debug = _config->FindB("Debug::aptcdrom",false); // Prepare the progress indicator - unsigned long TotalSize = 0; - for (vector<string>::iterator I = List.begin(); I != List.end(); I++) + off_t TotalSize = 0; + for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) { struct stat Buf; if (stat(string(*I).c_str(),&Buf) != 0 && @@ -796,14 +799,14 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ TotalSize += Buf.st_size; } - unsigned long CurrentSize = 0; + off_t CurrentSize = 0; unsigned int NotFound = 0; unsigned int WrongSize = 0; unsigned int Packages = 0; - for (vector<string>::iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) { string OrigPath = string(*I,CDROM.length()); - unsigned long FileSize = 0; + off_t FileSize = 0; // Open the package file FileFd Pkg; @@ -885,7 +888,6 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ this->Section = &Section; string Prefix; unsigned long Hits = 0; - unsigned long Chop = 0; while (Parser.Step(Section) == true) { if(Progress) @@ -903,7 +905,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ fclose(TargetFl); if (Debug == true) - cout << " Processed by using Prefix '" << Prefix << "' and chop " << Chop << endl; + cout << " Processed by using Prefix '" << Prefix << "' and chop " << endl; if (_config->FindB("APT::CDROM::NoAct",false) == false) { diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index 277fb561c..21294ae7e 100644 --- a/apt-pkg/indexcopy.h +++ b/apt-pkg/indexcopy.h @@ -14,9 +14,6 @@ #include <string> #include <stdio.h> -using std::string; -using std::vector; - class pkgTagSection; class FileFd; class indexRecords; @@ -31,20 +28,20 @@ class IndexCopy /*{{{*/ pkgTagSection *Section; - string ChopDirs(string Path,unsigned int Depth); - bool ReconstructPrefix(string &Prefix,string OrigPath,string CD, - string File); - bool ReconstructChop(unsigned long &Chop,string Dir,string File); - void ConvertToSourceList(string CD,string &Path); - bool GrabFirst(string Path,string &To,unsigned int Depth); - virtual bool GetFile(string &Filename,unsigned long &Size) = 0; - virtual bool RewriteEntry(FILE *Target,string File) = 0; + std::string ChopDirs(std::string Path,unsigned int Depth); + bool ReconstructPrefix(std::string &Prefix,std::string OrigPath,std::string CD, + std::string File); + bool ReconstructChop(unsigned long &Chop,std::string Dir,std::string File); + void ConvertToSourceList(std::string CD,std::string &Path); + bool GrabFirst(std::string Path,std::string &To,unsigned int Depth); + virtual bool GetFile(std::string &Filename,unsigned long long &Size) = 0; + virtual bool RewriteEntry(FILE *Target,std::string File) = 0; virtual const char *GetFileName() = 0; virtual const char *Type() = 0; public: - bool CopyPackages(string CDROM,string Name,vector<string> &List, + bool CopyPackages(std::string CDROM,std::string Name,std::vector<std::string> &List, pkgCdromStatus *log); virtual ~IndexCopy() {}; }; @@ -53,8 +50,8 @@ class PackageCopy : public IndexCopy /*{{{*/ { protected: - virtual bool GetFile(string &Filename,unsigned long &Size); - virtual bool RewriteEntry(FILE *Target,string File); + virtual bool GetFile(std::string &Filename,unsigned long long &Size); + virtual bool RewriteEntry(FILE *Target,std::string File); virtual const char *GetFileName() {return "Packages";}; virtual const char *Type() {return "Package";}; @@ -64,8 +61,8 @@ class SourceCopy : public IndexCopy /*{{{*/ { protected: - virtual bool GetFile(string &Filename,unsigned long &Size); - virtual bool RewriteEntry(FILE *Target,string File); + virtual bool GetFile(std::string &Filename,unsigned long long &Size); + virtual bool RewriteEntry(FILE *Target,std::string File); virtual const char *GetFileName() {return "Sources";}; virtual const char *Type() {return "Source";}; @@ -77,7 +74,7 @@ class TranslationsCopy /*{{{*/ pkgTagSection *Section; public: - bool CopyTranslations(string CDROM,string Name,vector<string> &List, + bool CopyTranslations(std::string CDROM,std::string Name,std::vector<std::string> &List, pkgCdromStatus *log); }; /*}}}*/ @@ -86,13 +83,13 @@ class SigVerify /*{{{*/ /** \brief dpointer placeholder (for later in case we need it) */ void *d; - bool Verify(string prefix,string file, indexRecords *records); - bool CopyMetaIndex(string CDROM, string CDName, - string prefix, string file); + bool Verify(std::string prefix,std::string file, indexRecords *records); + bool CopyMetaIndex(std::string CDROM, std::string CDName, + std::string prefix, std::string file); public: - bool CopyAndVerify(string CDROM,string Name,vector<string> &SigList, - vector<string> PkgList,vector<string> SrcList); + bool CopyAndVerify(std::string CDROM,std::string Name,std::vector<std::string> &SigList, + std::vector<std::string> PkgList,std::vector<std::string> SrcList); /** \brief generates and run the command to verify a file with gpgv */ static bool RunGPGV(std::string const &File, std::string const &FileOut, diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc index 37be87055..642a750d4 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -8,6 +8,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/indexfile.h> #include <apt-pkg/error.h> #include <apt-pkg/aptconfiguration.h> @@ -27,7 +29,8 @@ unsigned long pkgIndexFile::Type::GlobalListLen = 0; pkgIndexFile::Type::Type() { ItmList[GlobalListLen] = this; - GlobalListLen++; + GlobalListLen++; + Label = NULL; } /*}}}*/ // Type::GetType - Locate the type by name /*{{{*/ @@ -44,9 +47,9 @@ pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type) // IndexFile::ArchiveInfo - Stub /*{{{*/ // --------------------------------------------------------------------- /* */ -string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const +std::string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const { - return string(); + return std::string(); } /*}}}*/ // IndexFile::FindInCache - Stub /*{{{*/ @@ -60,10 +63,10 @@ pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const // IndexFile::SourceIndex - Stub /*{{{*/ // --------------------------------------------------------------------- /* */ -string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record, +std::string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record, pkgSrcRecords::File const &File) const { - return string(); + return std::string(); } /*}}}*/ // IndexFile::TranslationsAvailable - Check if will use Translation /*{{{*/ @@ -95,7 +98,7 @@ __attribute__ ((deprecated)) bool pkgIndexFile::CheckLanguageCode(const char *La /* As we have now possibly more than one LanguageCode this method is supersided by a) private classmembers or b) getLanguages(). TODO: Remove method with next API break */ -__attribute__ ((deprecated)) string pkgIndexFile::LanguageCode() { +__attribute__ ((deprecated)) std::string pkgIndexFile::LanguageCode() { if (TranslationsAvailable() == false) return ""; return APT::Configuration::getLanguages()[0]; diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h index 2b5ae6342..5e162a846 100644 --- a/apt-pkg/indexfile.h +++ b/apt-pkg/indexfile.h @@ -27,12 +27,12 @@ #include <apt-pkg/pkgcache.h> #include <apt-pkg/srcrecords.h> #include <apt-pkg/pkgrecords.h> - -using std::string; +#include <apt-pkg/macros.h> class pkgAcquire; class pkgCacheGenerator; class OpProgress; + class pkgIndexFile { protected: @@ -59,13 +59,13 @@ class pkgIndexFile virtual const Type *GetType() const = 0; // Return descriptive strings of various sorts - virtual string ArchiveInfo(pkgCache::VerIterator Ver) const; - virtual string SourceInfo(pkgSrcRecords::Parser const &Record, + virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const; + virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record, pkgSrcRecords::File const &File) const; - virtual string Describe(bool Short = false) const = 0; + virtual std::string Describe(bool Short = false) const = 0; // Interface for acquire - virtual string ArchiveURI(string /*File*/) const {return string();}; + virtual std::string ArchiveURI(std::string /*File*/) const {return std::string();}; // Interface for the record parsers virtual pkgSrcRecords::Parser *CreateSrcParser() const {return 0;}; @@ -84,7 +84,7 @@ class pkgIndexFile static bool TranslationsAvailable(); static bool CheckLanguageCode(const char *Lang); - static string LanguageCode(); + static std::string LanguageCode(); bool IsTrusted() const { return Trusted; }; diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index 10e154ad2..cdb9250e8 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -3,16 +3,24 @@ // $Id: indexrecords.cc,v 1.1.2.4 2003/12/30 02:11:43 mdz Exp $ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/indexrecords.h> #include <apt-pkg/tagfile.h> #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> #include <apt-pkg/configuration.h> -#include <apti18n.h> +#include <apt-pkg/fileutl.h> +#include <apt-pkg/hashes.h> + #include <sys/stat.h> #include <clocale> +#include <apti18n.h> /*}}}*/ + +using std::string; + string indexRecords::GetDist() const { return this->Dist; @@ -78,7 +86,7 @@ bool indexRecords::Load(const string Filename) /*{{{*/ string Name; string Hash; - size_t Size; + unsigned long long Size; while (Start < End) { if (!parseSumData(Start, End, Name, Hash, Size)) @@ -113,10 +121,14 @@ bool indexRecords::Load(const string Filename) /*{{{*/ } // get the user settings for this archive and use what expires earlier int MaxAge = _config->FindI("Acquire::Max-ValidTime", 0); - if (Label.empty() == true) + if (Label.empty() == false) MaxAge = _config->FindI(string("Acquire::Max-ValidTime::" + Label).c_str(), MaxAge); + int MinAge = _config->FindI("Acquire::Min-ValidTime", 0); + if (Label.empty() == false) + MinAge = _config->FindI(string("Acquire::Min-ValidTime::" + Label).c_str(), MinAge); - if(MaxAge == 0) // No user settings, use the one from the Release file + if(MaxAge == 0 && + (MinAge == 0 || ValidUntil == 0)) // No user settings, use the one from the Release file return true; time_t date; @@ -125,15 +137,22 @@ bool indexRecords::Load(const string Filename) /*{{{*/ strprintf(ErrorText, _("Invalid 'Date' entry in Release file %s"), Filename.c_str()); return false; } - date += 24*60*60*MaxAge; - if (ValidUntil == 0 || ValidUntil > date) - ValidUntil = date; + if (MinAge != 0 && ValidUntil != 0) { + time_t const min_date = date + MinAge; + if (ValidUntil < min_date) + ValidUntil = min_date; + } + if (MaxAge != 0) { + time_t const max_date = date + MaxAge; + if (ValidUntil == 0 || ValidUntil > max_date) + ValidUntil = max_date; + } return true; } /*}}}*/ -vector<string> indexRecords::MetaKeys() /*{{{*/ +std::vector<string> indexRecords::MetaKeys() /*{{{*/ { std::vector<std::string> keys; std::map<string,checkSum *>::iterator I = Entries.begin(); @@ -145,7 +164,7 @@ vector<string> indexRecords::MetaKeys() /*{{{*/ } /*}}}*/ bool indexRecords::parseSumData(const char *&Start, const char *End, /*{{{*/ - string &Name, string &Hash, size_t &Size) + string &Name, string &Hash, unsigned long long &Size) { Name = ""; Hash = ""; @@ -182,7 +201,7 @@ bool indexRecords::parseSumData(const char *&Start, const char *End, /*{{{*/ if (EntryEnd == End) return false; - Size = strtol (Start, NULL, 10); + Size = strtoull (Start, NULL, 10); /* Skip over intermediate blanks */ Start = EntryEnd; diff --git a/apt-pkg/indexrecords.h b/apt-pkg/indexrecords.h index 5b532c1a5..fa60a0847 100644 --- a/apt-pkg/indexrecords.h +++ b/apt-pkg/indexrecords.h @@ -7,7 +7,6 @@ #include <apt-pkg/pkgcache.h> -#include <apt-pkg/fileutl.h> #include <apt-pkg/hashes.h> #include <map> @@ -16,44 +15,44 @@ class indexRecords { - bool parseSumData(const char *&Start, const char *End, string &Name, - string &Hash, size_t &Size); + bool parseSumData(const char *&Start, const char *End, std::string &Name, + std::string &Hash, unsigned long long &Size); public: struct checkSum; - string ErrorText; + std::string ErrorText; protected: - string Dist; - string Suite; - string ExpectedDist; + std::string Dist; + std::string Suite; + std::string ExpectedDist; time_t ValidUntil; - std::map<string,checkSum *> Entries; + std::map<std::string,checkSum *> Entries; public: indexRecords(); - indexRecords(const string ExpectedDist); + indexRecords(const std::string ExpectedDist); // Lookup function - virtual const checkSum *Lookup(const string MetaKey); + virtual const checkSum *Lookup(const std::string MetaKey); /** \brief tests if a checksum for this file is available */ - bool Exists(string const &MetaKey) const; + bool Exists(std::string const &MetaKey) const; std::vector<std::string> MetaKeys(); - virtual bool Load(string Filename); - string GetDist() const; + virtual bool Load(std::string Filename); + std::string GetDist() const; time_t GetValidUntil() const; - virtual bool CheckDist(const string MaybeDist) const; - string GetExpectedDist() const; + virtual bool CheckDist(const std::string MaybeDist) const; + std::string GetExpectedDist() const; virtual ~indexRecords(){}; }; struct indexRecords::checkSum { - string MetaKeyFilename; + std::string MetaKeyFilename; HashString Hash; - size_t Size; + unsigned long long Size; }; #endif diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 8f20c31df..a1c47c030 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -8,14 +8,18 @@ ##################################################################### */ /*}}}*/ // Include files /*{{{*/ +#include<config.h> + #include <apt-pkg/init.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/error.h> +#include <apt-pkg/pkgsystem.h> +#include <apt-pkg/configuration.h> -#include <apti18n.h> -#include <config.h> #include <cstdlib> #include <sys/stat.h> + +#include <apti18n.h> /*}}}*/ #define Stringfy_(x) # x @@ -82,13 +86,12 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Dir::Log::Terminal","term.log"); Cnf.CndSet("Dir::Log::History","history.log"); - if (Cnf.Exists("Dir::Ignore-Files-Silently") == false) - { - Cnf.Set("Dir::Ignore-Files-Silently::", "~$"); - Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$"); - Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$"); - Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$"); - } + Cnf.Set("Dir::Ignore-Files-Silently::", "~$"); + Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$"); + Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$"); + Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$"); + Cnf.Set("Dir::Ignore-Files-Silently::", "\\.save$"); + Cnf.Set("Dir::Ignore-Files-Silently::", "\\.orig$"); // Default cdrom mount point Cnf.CndSet("Acquire::cdrom::mount", "/media/cdrom/"); @@ -106,14 +109,14 @@ bool pkgInitConfig(Configuration &Cnf) } // Read the configuration parts dir - string Parts = Cnf.FindDir("Dir::Etc::parts"); + std::string Parts = Cnf.FindDir("Dir::Etc::parts"); if (DirectoryExists(Parts) == true) Res &= ReadConfigDir(Cnf,Parts); else _error->WarningE("DirectoryExists",_("Unable to read %s"),Parts.c_str()); // Read the main config file - string FName = Cnf.FindFile("Dir::Etc::main"); + std::string FName = Cnf.FindFile("Dir::Etc::main"); if (RealFileExists(FName) == true) Res &= ReadConfigFile(Cnf,FName); @@ -140,7 +143,7 @@ bool pkgInitConfig(Configuration &Cnf) bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys) { Sys = 0; - string Label = Cnf.Find("Apt::System",""); + std::string Label = Cnf.Find("Apt::System",""); if (Label.empty() == false) { Sys = pkgSystem::GetSystem(Label.c_str()); diff --git a/apt-pkg/init.h b/apt-pkg/init.h index 6b92dd200..0c1c7ae5a 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -13,8 +13,8 @@ #ifndef PKGLIB_INIT_H #define PKGLIB_INIT_H -#include <apt-pkg/configuration.h> -#include <apt-pkg/pkgsystem.h> +class pkgSystem; +class Configuration; // These lines are extracted by the makefiles and the buildsystem // Increasing MAJOR or MINOR results in the need of recompiling all @@ -22,7 +22,7 @@ // Non-ABI-Breaks should only increase RELEASE number. // See also buildlib/libversion.mak #define APT_PKG_MAJOR 4 -#define APT_PKG_MINOR 11 +#define APT_PKG_MINOR 12 #define APT_PKG_RELEASE 0 extern const char *pkgVersion; @@ -31,15 +31,4 @@ extern const char *pkgLibVersion; bool pkgInitConfig(Configuration &Cnf); bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys); -#ifdef APT_COMPATIBILITY -#if APT_COMPATIBILITY != 986 -#warning "Using APT_COMPATIBILITY" -#endif - -inline bool pkgInitialize(Configuration &Cnf) -{ - return pkgInitConfig(Cnf) && pkgInitSystem(Cnf,_system); -}; -#endif - #endif diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h index f60235a5d..9cc79a7a6 100644 --- a/apt-pkg/metaindex.h +++ b/apt-pkg/metaindex.h @@ -4,12 +4,7 @@ #include <string> #include <apt-pkg/pkgcache.h> -#include <apt-pkg/srcrecords.h> -#include <apt-pkg/pkgrecords.h> #include <apt-pkg/indexfile.h> -#include <apt-pkg/vendor.h> - -using std::string; class pkgAcquire; class pkgCacheGenerator; @@ -18,35 +13,35 @@ class OpProgress; class metaIndex { protected: - vector <pkgIndexFile *> *Indexes; + std::vector <pkgIndexFile *> *Indexes; const char *Type; - string URI; - string Dist; + std::string URI; + std::string Dist; bool Trusted; public: // Various accessors - virtual string GetURI() const {return URI;} - virtual string GetDist() const {return Dist;} + virtual std::string GetURI() const {return URI;} + virtual std::string GetDist() const {return Dist;} virtual const char* GetType() const {return Type;} // Interface for acquire - virtual string ArchiveURI(string const& /*File*/) const = 0; + virtual std::string ArchiveURI(std::string const& /*File*/) const = 0; virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const = 0; - virtual vector<pkgIndexFile *> *GetIndexFiles() = 0; + virtual std::vector<pkgIndexFile *> *GetIndexFiles() = 0; virtual bool IsTrusted() const = 0; - metaIndex(string const &URI, string const &Dist, char const * const Type) : + metaIndex(std::string const &URI, std::string const &Dist, char const * const Type) : Indexes(NULL), Type(Type), URI(URI), Dist(Dist) { } virtual ~metaIndex() { if (Indexes == 0) return; - for (vector<pkgIndexFile *>::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I) + for (std::vector<pkgIndexFile *>::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I) delete *I; delete Indexes; } diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index 19661fc2d..0ac9a83e3 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -63,6 +63,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/orderlist.h> #include <apt-pkg/depcache.h> #include <apt-pkg/error.h> @@ -145,14 +147,14 @@ bool pkgOrderList::DoRun() Depth = 0; WipeFlags(Added | AddPending | Loop | InList); - for (iterator I = List; I != End; I++) + for (iterator I = List; I != End; ++I) Flag(*I,InList); // Rebuild the main list into the temp list. iterator OldEnd = End; End = NList; - for (iterator I = List; I != OldEnd; I++) - if (VisitNode(PkgIterator(Cache,*I)) == false) + for (iterator I = List; I != OldEnd; ++I) + if (VisitNode(PkgIterator(Cache,*I), "DoRun") == false) { End = OldEnd; return false; @@ -197,7 +199,7 @@ bool pkgOrderList::OrderCritical() { clog << "** Critical Unpack ordering done" << endl; - for (iterator I = List; I != End; I++) + for (iterator I = List; I != End; ++I) { PkgIterator P(Cache,*I); if (IsNow(P) == true) @@ -222,7 +224,7 @@ bool pkgOrderList::OrderUnpack(string *FileList) WipeFlags(After); // Set the inlist flag - for (iterator I = List; I != End; I++) + for (iterator I = List; I != End; ++I) { PkgIterator P(Cache,*I); if (IsMissing(P) == true && IsNow(P) == true) @@ -270,7 +272,7 @@ bool pkgOrderList::OrderUnpack(string *FileList) { clog << "** Unpack ordering done" << endl; - for (iterator I = List; I != End; I++) + for (iterator I = List; I != End; ++I) { PkgIterator P(Cache,*I); if (IsNow(P) == true) @@ -323,7 +325,7 @@ int pkgOrderList::Score(PkgIterator Pkg) Score += ScoreImmediate; for (DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList(); - D.end() == false; D++) + D.end() == false; ++D) if (D->Type == pkgCache::Dep::PreDepends) { Score += ScorePreDepends; @@ -488,40 +490,76 @@ bool pkgOrderList::VisitRProvides(DepFunc F,VerIterator Ver) return true; bool Res = true; - for (PrvIterator P = Ver.ProvidesList(); P.end() == false; P++) + for (PrvIterator P = Ver.ProvidesList(); P.end() == false; ++P) Res &= (this->*F)(P.ParentPkg().RevDependsList()); return Res; } /*}}}*/ // OrderList::VisitProvides - Visit all of the providing packages /*{{{*/ // --------------------------------------------------------------------- -/* This routine calls visit on all providing packages. */ +/* This routine calls visit on all providing packages. + + If the dependency is negative it first visits packages which are + intended to be removed and after that all other packages. + It does so to avoid situations in which this package is used to + satisfy a (or-group/provides) dependency of another package which + could have been satisfied also by upgrading another package - + otherwise we have more broken packages dpkg needs to auto- + deconfigure and in very complicated situations it even decides + against it! */ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical) -{ +{ SPtrArray<Version *> List = D.AllTargets(); - for (Version **I = List; *I != 0; I++) + for (Version **I = List; *I != 0; ++I) { VerIterator Ver(Cache,*I); PkgIterator Pkg = Ver.ParentPkg(); + if (D.IsNegative() == true && Cache[Pkg].Delete() == false) + continue; + if (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing) continue; - + if (D.IsNegative() == false && Cache[Pkg].InstallVer != *I) continue; - + if (D.IsNegative() == true && (Version *)Pkg.CurrentVer() != *I) continue; - + // Skip over missing files if (Critical == false && IsMissing(D.ParentPkg()) == true) continue; - if (VisitNode(Pkg) == false) + if (VisitNode(Pkg, "Provides-1") == false) return false; } + if (D.IsNegative() == false) + return true; + for (Version **I = List; *I != 0; ++I) + { + VerIterator Ver(Cache,*I); + PkgIterator Pkg = Ver.ParentPkg(); + + if (Cache[Pkg].Delete() == true) + continue; + + if (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing) + continue; + + if ((Version *)Pkg.CurrentVer() != *I) + continue; + + // Skip over missing files + if (Critical == false && IsMissing(D.ParentPkg()) == true) + continue; + + if (VisitNode(Pkg, "Provides-2") == false) + return false; + } + return true; } /*}}}*/ @@ -530,7 +568,7 @@ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical) /* This is the core ordering routine. It calls the set dependency consideration functions which then potentialy call this again. Finite depth is achived through the colouring mechinism. */ -bool pkgOrderList::VisitNode(PkgIterator Pkg) +bool pkgOrderList::VisitNode(PkgIterator Pkg, char const* from) { // Looping or irrelevent. // This should probably trancend not installed packages @@ -541,7 +579,7 @@ bool pkgOrderList::VisitNode(PkgIterator Pkg) if (Debug == true) { for (int j = 0; j != Depth; j++) clog << ' '; - clog << "Visit " << Pkg.FullName() << endl; + clog << "Visit " << Pkg.FullName() << " from " << from << endl; } Depth++; @@ -615,7 +653,7 @@ bool pkgOrderList::VisitNode(PkgIterator Pkg) Loops are preprocessed and logged. */ bool pkgOrderList::DepUnPackCrit(DepIterator D) { - for (; D.end() == false; D++) + for (; D.end() == false; ++D) { if (D.Reverse() == true) { @@ -636,7 +674,7 @@ bool pkgOrderList::DepUnPackCrit(DepIterator D) if (CheckDep(D) == true) continue; - if (VisitNode(D.ParentPkg()) == false) + if (VisitNode(D.ParentPkg(), "UnPackCrit") == false) return false; } else @@ -693,7 +731,7 @@ bool pkgOrderList::DepUnPackPreD(DepIterator D) if (D.Reverse() == true) return DepUnPackCrit(D); - for (; D.end() == false; D++) + for (; D.end() == false; ++D) { if (D.IsCritical() == false) continue; @@ -736,7 +774,7 @@ bool pkgOrderList::DepUnPackPre(DepIterator D) if (D.Reverse() == true) return true; - for (; D.end() == false; D++) + for (; D.end() == false; ++D) { /* Only consider the PreDepends or Depends. Depends are only considered at the lowest depth or in the case of immediate @@ -791,7 +829,7 @@ bool pkgOrderList::DepUnPackPre(DepIterator D) bool pkgOrderList::DepUnPackDep(DepIterator D) { - for (; D.end() == false; D++) + for (; D.end() == false; ++D) if (D.IsCritical() == true) { if (D.Reverse() == true) @@ -811,7 +849,7 @@ bool pkgOrderList::DepUnPackDep(DepIterator D) if (IsMissing(D.ParentPkg()) == true) continue; - if (VisitNode(D.ParentPkg()) == false) + if (VisitNode(D.ParentPkg(), "UnPackDep-Parent") == false) return false; } else @@ -825,7 +863,7 @@ bool pkgOrderList::DepUnPackDep(DepIterator D) if (CheckDep(D) == true) continue; - if (VisitNode(D.TargetPkg()) == false) + if (VisitNode(D.TargetPkg(), "UnPackDep-Target") == false) return false; } } @@ -846,7 +884,7 @@ bool pkgOrderList::DepConfigure(DepIterator D) if (D.Reverse() == true) return true; - for (; D.end() == false; D++) + for (; D.end() == false; ++D) if (D->Type == pkgCache::Dep::Depends) if (VisitProvides(D,false) == false) return false; @@ -868,7 +906,7 @@ bool pkgOrderList::DepRemove(DepIterator D) { if (D.Reverse() == false) return true; - for (; D.end() == false; D++) + for (; D.end() == false; ++D) if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) { // Duplication elimination, consider the current version only @@ -924,7 +962,7 @@ bool pkgOrderList::DepRemove(DepIterator D) if (IsFlag(P, InList) == true && IsFlag(P, AddPending) == false && Cache[P].InstallVer != 0 && - VisitNode(P) == true) + VisitNode(P, "Remove-P") == true) { Flag(P, Immediate); tryFixDeps = false; @@ -960,7 +998,7 @@ bool pkgOrderList::DepRemove(DepIterator D) if (IsFlag(F.TargetPkg(), InList) == true && IsFlag(F.TargetPkg(), AddPending) == false && Cache[F.TargetPkg()].InstallVer != 0 && - VisitNode(F.TargetPkg()) == true) + VisitNode(F.TargetPkg(), "Remove-Target") == true) { Flag(F.TargetPkg(), Immediate); tryFixDeps = false; @@ -974,7 +1012,7 @@ bool pkgOrderList::DepRemove(DepIterator D) if (IsFlag(Prv.OwnerPkg(), InList) == true && IsFlag(Prv.OwnerPkg(), AddPending) == false && Cache[Prv.OwnerPkg()].InstallVer != 0 && - VisitNode(Prv.OwnerPkg()) == true) + VisitNode(Prv.OwnerPkg(), "Remove-Owner") == true) { Flag(Prv.OwnerPkg(), Immediate); tryFixDeps = false; @@ -994,7 +1032,7 @@ bool pkgOrderList::DepRemove(DepIterator D) if (IsMissing(D.ParentPkg()) == true) continue; - if (VisitNode(D.ParentPkg()) == false) + if (VisitNode(D.ParentPkg(), "Remove-Parent") == false) return false; } @@ -1021,8 +1059,10 @@ bool pkgOrderList::AddLoop(DepIterator D) Loops[LoopCount++] = D; // Mark the packages as being part of a loop. - Flag(D.TargetPkg(),Loop); - Flag(D.ParentPkg(),Loop); + //Flag(D.TargetPkg(),Loop); + //Flag(D.ParentPkg(),Loop); + /* This is currently disabled because the Loop flag is being used for + loop management in the package manager. Check the orderlist.h file for more info */ return true; } /*}}}*/ @@ -1073,7 +1113,7 @@ bool pkgOrderList::CheckDep(DepIterator D) just needs one */ if (D.IsNegative() == false) { - // ignore provides by older versions of this package + // ignore provides by older versions of this package if (((D.Reverse() == false && Pkg == D.ParentPkg()) || (D.Reverse() == true && Pkg == D.TargetPkg())) && Cache[Pkg].InstallVer != *I) diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h index bbceb3879..a2d7b321b 100644 --- a/apt-pkg/orderlist.h +++ b/apt-pkg/orderlist.h @@ -18,6 +18,7 @@ #include <apt-pkg/pkgcache.h> +#include <apt-pkg/macros.h> class pkgDepCache; class pkgOrderList : protected pkgCache::Namespace @@ -37,7 +38,7 @@ class pkgOrderList : protected pkgCache::Namespace Package **End; Package **List; Package **AfterEnd; - string *FileList; + std::string *FileList; DepIterator Loops[20]; int LoopCount; int Depth; @@ -45,7 +46,8 @@ class pkgOrderList : protected pkgCache::Namespace bool Debug; // Main visit function - bool VisitNode(PkgIterator Pkg); + __deprecated bool VisitNode(PkgIterator Pkg) { return VisitNode(Pkg, "UNKNOWN"); }; + bool VisitNode(PkgIterator Pkg, char const* from); bool VisitDeps(DepFunc F,PkgIterator Pkg); bool VisitRDeps(DepFunc F,PkgIterator Pkg); bool VisitRProvides(DepFunc F,VerIterator Ver); @@ -74,7 +76,12 @@ class pkgOrderList : protected pkgCache::Namespace typedef Package **iterator; - // State flags + /* State flags + The Loop flag can be set on a package that is currently being processed by either SmartConfigure or + SmartUnPack. This allows the package manager to tell when a loop has been formed as it will try to + SmartUnPack or SmartConfigure a package with the Loop flag set. It will then either stop (as it knows + that the operation is unnecessary as its already in process), or in the case of the conflicts resolution + in SmartUnPack, use EarlyRemove to resolve the situation. */ enum Flags {Added = (1 << 0), AddPending = (1 << 1), Immediate = (1 << 2), Loop = (1 << 3), UnPacked = (1 << 4), Configured = (1 << 5), @@ -89,10 +96,13 @@ class pkgOrderList : protected pkgCache::Namespace void Flag(PkgIterator Pkg,unsigned long State, unsigned long F) {Flags[Pkg->ID] = (Flags[Pkg->ID] & (~F)) | State;}; inline void Flag(PkgIterator Pkg,unsigned long F) {Flags[Pkg->ID] |= F;}; inline void Flag(Package *Pkg,unsigned long F) {Flags[Pkg->ID] |= F;}; + // RmFlag removes a flag from a package + inline void RmFlag(Package *Pkg,unsigned long F) {Flags[Pkg->ID] &= ~F;}; + // IsNow will return true if the Pkg has been not been either configured or unpacked inline bool IsNow(PkgIterator Pkg) {return (Flags[Pkg->ID] & (States & (~Removed))) == 0;}; bool IsMissing(PkgIterator Pkg); void WipeFlags(unsigned long F); - void SetFileList(string *FileList) {this->FileList = FileList;}; + void SetFileList(std::string *FileList) {this->FileList = FileList;}; // Accessors inline iterator begin() {return List;}; @@ -105,7 +115,7 @@ class pkgOrderList : protected pkgCache::Namespace // Ordering modes bool OrderCritical(); - bool OrderUnpack(string *FileList = 0); + bool OrderUnpack(std::string *FileList = 0); bool OrderConfigure(); int Score(PkgIterator Pkg); diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 1ae09347a..4f9762701 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -13,6 +13,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/packagemanager.h> #include <apt-pkg/orderlist.h> #include <apt-pkg/depcache.h> @@ -22,13 +24,15 @@ #include <apt-pkg/algorithms.h> #include <apt-pkg/configuration.h> #include <apt-pkg/sptr.h> - -#include <apti18n.h> + +#include <apti18n.h> #include <iostream> -#include <fcntl.h> +#include <fcntl.h> /*}}}*/ using namespace std; +bool pkgPackageManager::SigINTStop = false; + // PM::PackageManager - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -63,7 +67,7 @@ bool pkgPackageManager::GetArchives(pkgAcquire *Owner,pkgSourceList *Sources, if (ordering == false) return _error->Error("Internal ordering error"); - for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++) + for (pkgOrderList::iterator I = List->begin(); I != List->end(); ++I) { PkgIterator Pkg(Cache,*I); FileNames[Pkg->ID] = string(); @@ -99,7 +103,7 @@ bool pkgPackageManager::FixMissing() List->SetFileList(FileNames); bool Bad = false; - for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { if (List->IsMissing(I) == false) continue; @@ -140,7 +144,7 @@ void pkgPackageManager::ImmediateAdd(PkgIterator I, bool UseInstallVer, unsigned D = I.CurrentVer().DependsList(); } - for ( /* nothing */ ; D.end() == false; D++) + for ( /* nothing */ ; D.end() == false; ++D) if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) { if(!List->IsFlag(D.TargetPkg(), pkgOrderList::Immediate)) @@ -166,29 +170,35 @@ bool pkgPackageManager::CreateOrderList() delete List; List = new pkgOrderList(&Cache); - static bool const NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true); + NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true); + ImmConfigureAll = _config->FindB("APT::Immediate-Configure-All",false); + + if (Debug && ImmConfigureAll) + clog << "CreateOrderList(): Adding Immediate flag for all packages because of APT::Immediate-Configure-All" << endl; // Generate the list of affected packages and sort it - for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + for (PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) { // Ignore no-version packages if (I->VersionList == 0) continue; // Mark the package and its dependends for immediate configuration - if (((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential || + if ((((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential || (I->Flags & pkgCache::Flag::Important) == pkgCache::Flag::Important) && - NoImmConfigure == false) + NoImmConfigure == false) || ImmConfigureAll) { - if(Debug) + if(Debug && !ImmConfigureAll) clog << "CreateOrderList(): Adding Immediate flag for " << I.Name() << endl; List->Flag(I,pkgOrderList::Immediate); - - // Look for other install packages to make immediate configurea - ImmediateAdd(I, true); - // And again with the current version. - ImmediateAdd(I, false); + if (!ImmConfigureAll) { + // Look for other install packages to make immediate configurea + ImmediateAdd(I, true); + + // And again with the current version. + ImmediateAdd(I, false); + } } // Not interesting @@ -229,7 +239,7 @@ bool pkgPackageManager::DepAlwaysTrue(DepIterator D) bool pkgPackageManager::CheckRConflicts(PkgIterator Pkg,DepIterator D, const char *Ver) { - for (;D.end() == false; D++) + for (;D.end() == false; ++D) { if (D->Type != pkgCache::Dep::Conflicts && D->Type != pkgCache::Dep::Obsoletes) @@ -256,13 +266,14 @@ bool pkgPackageManager::CheckRConflicts(PkgIterator Pkg,DepIterator D, // PM::ConfigureAll - Run the all out configuration /*{{{*/ // --------------------------------------------------------------------- /* This configures every package. It is assumed they are all unpacked and - that the final configuration is valid. */ + that the final configuration is valid. This is also used to catch packages + that have not been configured when using ImmConfigureAll */ bool pkgPackageManager::ConfigureAll() { pkgOrderList OList(&Cache); // Populate the order list - for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++) + for (pkgOrderList::iterator I = List->begin(); I != List->end(); ++I) if (List->IsFlag(pkgCache::PkgIterator(Cache,*I), pkgOrderList::UnPacked) == true) OList.push_back(*I); @@ -274,12 +285,22 @@ bool pkgPackageManager::ConfigureAll() bool const ConfigurePkgs = (conf == "all"); // Perform the configuring - for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++) + for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); ++I) { PkgIterator Pkg(Cache,*I); + + /* Check if the package has been configured, this can happen if SmartConfigure + calls its self */ + if (List->IsFlag(Pkg,pkgOrderList::Configured)) continue; - if (ConfigurePkgs == true && Configure(Pkg) == false) + if (ConfigurePkgs == true && SmartConfigure(Pkg, 0) == false) { + if (ImmConfigureAll) + _error->Error(_("Could not perform immediate configuration on '%s'. " + "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.Name(),1); + else + _error->Error("Internal error, packages left unconfigured. %s",Pkg.Name()); return false; + } List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States); } @@ -289,35 +310,146 @@ bool pkgPackageManager::ConfigureAll() /*}}}*/ // PM::SmartConfigure - Perform immediate configuration of the pkg /*{{{*/ // --------------------------------------------------------------------- -/* This routine scheduals the configuration of the given package and all - of it's dependents. */ -bool pkgPackageManager::SmartConfigure(PkgIterator Pkg) +/* This function tries to put the system in a state where Pkg can be configured. + This involves checking each of Pkg's dependanies and unpacking and + configuring packages where needed. + + Note on failure: This method can fail, without causing any problems. + This can happen when using Immediate-Configure-All, SmartUnPack may call + SmartConfigure, it may fail because of a complex dependancy situation, but + a error will only be reported if ConfigureAll fails. This is why some of the + messages this function reports on failure (return false;) as just warnings + only shown when debuging*/ +bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) { - if (Debug == true) - clog << "SmartConfigure " << Pkg.Name() << endl; + // If this is true, only check and correct and dependancies without the Loop flag + bool PkgLoop = List->IsFlag(Pkg,pkgOrderList::Loop); + + if (Debug) { + VerIterator InstallVer = VerIterator(Cache,Cache[Pkg].InstallVer); + clog << OutputInDepth(Depth) << "SmartConfigure " << Pkg.Name() << " (" << InstallVer.VerStr() << ")"; + if (PkgLoop) + clog << " (Only Correct Dependancies)"; + clog << endl; + } - pkgOrderList OList(&Cache); + VerIterator const instVer = Cache[Pkg].InstVerIter(Cache); + + /* Because of the ordered list, most dependancies should be unpacked, + however if there is a loop (A depends on B, B depends on A) this will not + be the case, so check for dependancies before configuring. */ + bool Bad = false; + for (DepIterator D = instVer.DependsList(); + D.end() == false; ) + { + // Compute a single dependency element (glob or) + pkgCache::DepIterator Start; + pkgCache::DepIterator End; + D.GlobOr(Start,End); + + if (End->Type == pkgCache::Dep::Depends) + Bad = true; + + // Check for dependanices that have not been unpacked, probably due to loops. + while (End->Type == pkgCache::Dep::Depends) { + PkgIterator DepPkg; + VerIterator InstallVer; + SPtrArray<Version *> VList = Start.AllTargets(); + + // Check through each version of each package that could satisfy this dependancy + for (Version **I = VList; *I != 0; I++) { + VerIterator Ver(Cache,*I); + DepPkg = Ver.ParentPkg(); + InstallVer = VerIterator(Cache,Cache[DepPkg].InstallVer); - if (DepAdd(OList,Pkg) == false) + // Check if the current version of the package is avalible and will satisfy this dependancy + if (DepPkg.CurrentVer() == Ver && List->IsNow(DepPkg) == true && + !List->IsFlag(DepPkg,pkgOrderList::Removed) && DepPkg.State() == PkgIterator::NeedsNothing) + { + Bad = false; + break; + } + + // Check if the version that is going to be installed will satisfy the dependancy + if (Cache[DepPkg].InstallVer == *I) { + if (List->IsFlag(DepPkg,pkgOrderList::UnPacked)) { + if (List->IsFlag(DepPkg,pkgOrderList::Loop) && PkgLoop) { + // This dependancy has already been dealt with by another SmartConfigure on Pkg + Bad = false; + break; + } else if (List->IsFlag(Pkg,pkgOrderList::Loop)) { + /* Check for a loop to prevent one forming + If A depends on B and B depends on A, SmartConfigure will + just hop between them if this is not checked. Dont remove the + loop flag after finishing however as loop is already set. + This means that there is another SmartConfigure call for this + package and it will remove the loop flag */ + Bad = !SmartConfigure(DepPkg, Depth + 1); + } else { + /* Check for a loop to prevent one forming + If A depends on B and B depends on A, SmartConfigure will + just hop between them if this is not checked */ + List->Flag(Pkg,pkgOrderList::Loop); + Bad = !SmartConfigure(DepPkg, Depth + 1); + List->RmFlag(Pkg,pkgOrderList::Loop); + } + // If SmartConfigure was succesfull, Bad is false, so break + if (!Bad) break; + } else if (List->IsFlag(DepPkg,pkgOrderList::Configured)) { + Bad = false; + break; + } + } + } + + /* If the dependany is still not satisfied, try, if possible, unpacking a package to satisfy it */ + if (InstallVer != 0 && Bad) { + if (List->IsNow(DepPkg)) { + Bad = false; + if (List->IsFlag(Pkg,pkgOrderList::Loop)) + { + if (Debug) + std::clog << OutputInDepth(Depth) << "Package " << Pkg << " loops in SmartConfigure" << std::endl; + } + else + { + List->Flag(Pkg,pkgOrderList::Loop); + if (Debug) + cout << OutputInDepth(Depth) << "Unpacking " << DepPkg.Name() << " to avoid loop" << endl; + SmartUnPack(DepPkg, true, Depth + 1); + List->RmFlag(Pkg,pkgOrderList::Loop); + } + } + } + + if (Start==End) { + if (Bad && Debug && List->IsFlag(DepPkg,pkgOrderList::Loop) == false) + std::clog << OutputInDepth(Depth) << "Could not satisfy dependancies for " << Pkg.Name() << std::endl; + break; + } else { + Start++; + } + } + } + + if (Bad) { + if (Debug) + _error->Warning(_("Could not configure '%s'. "),Pkg.Name()); return false; + } + + if (PkgLoop) return true; static std::string const conf = _config->Find("PackageManager::Configure","all"); static bool const ConfigurePkgs = (conf == "all" || conf == "smart"); - if (ConfigurePkgs == true) - if (OList.OrderConfigure() == false) - return false; + if (List->IsFlag(Pkg,pkgOrderList::Configured)) + return _error->Error("Internal configure error on '%s'.", Pkg.Name()); - // Perform the configuring - for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++) - { - PkgIterator Pkg(Cache,*I); - - if (ConfigurePkgs == true && Configure(Pkg) == false) - return false; - - List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States); - } + if (ConfigurePkgs == true && Configure(Pkg) == false) + return false; + + List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States); if ((Cache[Pkg].InstVerIter(Cache)->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same) for (PkgIterator P = Pkg.Group().PackageList(); @@ -327,97 +459,16 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg) Cache[P].InstallVer == 0 || (P.CurrentVer() == Cache[P].InstallVer && (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)) continue; - SmartConfigure(P); + SmartConfigure(P, (Depth +1)); } // Sanity Check if (List->IsFlag(Pkg,pkgOrderList::Configured) == false) - return _error->Error(_("Could not perform immediate configuration on '%s'. " - "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.Name(),1); + return _error->Error(_("Could not configure '%s'. "),Pkg.Name()); return true; } /*}}}*/ -// PM::DepAdd - Add all dependents to the oder list /*{{{*/ -// --------------------------------------------------------------------- -/* This recursively adds all dependents to the order list */ -bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth) -{ - if (OList.IsFlag(Pkg,pkgOrderList::Added) == true) - return true; - if (List->IsFlag(Pkg,pkgOrderList::Configured) == true) - return true; - if (List->IsFlag(Pkg,pkgOrderList::UnPacked) == false) - return false; - - if (Debug) - std::clog << OutputInDepth(Depth) << "DepAdd: " << Pkg.Name() << std::endl; - - // Put the package on the list - OList.push_back(Pkg); - OList.Flag(Pkg,pkgOrderList::Added); - Depth++; - - // Check the dependencies to see if they are all satisfied. - bool Bad = false; - for (DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList(); D.end() == false;) - { - if (D->Type != pkgCache::Dep::Depends && D->Type != pkgCache::Dep::PreDepends) - { - D++; - continue; - } - - // Grok or groups - Bad = true; - for (bool LastOR = true; D.end() == false && LastOR == true; D++) - { - LastOR = (D->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or; - - if (Bad == false) - continue; - - SPtrArray<Version *> VList = D.AllTargets(); - for (Version **I = VList; *I != 0 && Bad == true; I++) - { - VerIterator Ver(Cache,*I); - PkgIterator Pkg = Ver.ParentPkg(); - - // See if the current version is ok - if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true && - Pkg.State() == PkgIterator::NeedsNothing) - { - Bad = false; - continue; - } - - // Not the install version - if (Cache[Pkg].InstallVer != *I || - (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing)) - continue; - - if (List->IsFlag(Pkg,pkgOrderList::UnPacked) == true) - Bad = !DepAdd(OList,Pkg,Depth); - if (List->IsFlag(Pkg,pkgOrderList::Configured) == true) - Bad = false; - } - } - - if (Bad == true) - { - if (Debug) - std::clog << OutputInDepth(Depth) << "DepAdd FAILS on: " << Pkg.Name() << std::endl; - OList.Flag(Pkg,0,pkgOrderList::Added); - OList.pop_back(); - Depth--; - return false; - } - } - - Depth--; - return true; -} - /*}}}*/ // PM::EarlyRemove - Perform removal of packages before their time /*{{{*/ // --------------------------------------------------------------------- /* This is called to deal with conflicts arising from unpacking */ @@ -444,7 +495,7 @@ bool pkgPackageManager::EarlyRemove(PkgIterator Pkg) if (Pkg->CurrentVer != 0) { for (DepIterator D = Pkg.RevDependsList(); D.end() == false && - IsEssential == false; D++) + IsEssential == false; ++D) if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) if ((D.ParentPkg()->Flags & pkgCache::Flag::Essential) != 0) IsEssential = true; @@ -483,30 +534,36 @@ bool pkgPackageManager::SmartRemove(PkgIterator Pkg) /*}}}*/ // PM::SmartUnPack - Install helper /*{{{*/ // --------------------------------------------------------------------- -/* This performs the task of handling pre-depends. */ +/* This puts the system in a state where it can Unpack Pkg, if Pkg is allready + unpacked, or when it has been unpacked, if Immediate==true it configures it. */ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) { - return SmartUnPack(Pkg, true); + return SmartUnPack(Pkg, true, 0); } -bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate) +bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int const Depth) { - // Check if it is already unpacked - if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure && - Cache[Pkg].Keep() == true) - { - List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); - if (Immediate == true && - List->IsFlag(Pkg,pkgOrderList::Immediate) == true) - if (SmartConfigure(Pkg) == false) - return _error->Error(_("Could not perform immediate configuration on already unpacked '%s'. " - "Please see man 5 apt.conf under APT::Immediate-Configure for details."),Pkg.Name()); - return true; + bool PkgLoop = List->IsFlag(Pkg,pkgOrderList::Loop); + + if (Debug) { + clog << OutputInDepth(Depth) << "SmartUnPack " << Pkg.Name(); + VerIterator InstallVer = VerIterator(Cache,Cache[Pkg].InstallVer); + if (Pkg.CurrentVer() == 0) + cout << " (install version " << InstallVer.VerStr() << ")"; + else + cout << " (replace version " << Pkg.CurrentVer().VerStr() << " with " << InstallVer.VerStr() << ")"; + if (PkgLoop) + cout << " (Only Perform PreUnpack Checks)"; + cout << endl; } VerIterator const instVer = Cache[Pkg].InstVerIter(Cache); - /* See if this packages install version has any predependencies - that are not met by 'now' packages. */ + /* PreUnpack Checks: This loop checks and attempts to rectify and problems that would prevent the package being unpacked. + It addresses: PreDepends, Conflicts, Obsoletes and Breaks (DpkgBreaks). Any resolutions that do not require it should + avoid configuration (calling SmartUnpack with Immediate=true), this is because when unpacking some packages with + complex dependancy structures, trying to configure some packages while breaking the loops can complicate things . + This will be either dealt with if the package is configured as a dependency of Pkg (if and when Pkg is configured), + or by the ConfigureAll call at the end of the for loop in OrderInstall. */ for (DepIterator D = instVer.DependsList(); D.end() == false; ) { @@ -517,8 +574,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate) while (End->Type == pkgCache::Dep::PreDepends) { - if (Debug == true) - clog << "PreDepends order for " << Pkg.Name() << std::endl; + if (Debug) + clog << OutputInDepth(Depth) << "PreDepends order for " << Pkg.Name() << std::endl; // Look for possible ok targets. SPtrArray<Version *> VList = Start.AllTargets(); @@ -533,8 +590,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate) Pkg.State() == PkgIterator::NeedsNothing) { Bad = false; - if (Debug == true) - clog << "Found ok package " << Pkg.Name() << endl; + if (Debug) + clog << OutputInDepth(Depth) << "Found ok package " << Pkg.Name() << endl; continue; } } @@ -549,10 +606,15 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate) if (Cache[Pkg].InstallVer != *I || (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing)) continue; + + if (List->IsFlag(Pkg,pkgOrderList::Configured)) { + Bad = false; + continue; + } - if (Debug == true) - clog << "Trying to SmartConfigure " << Pkg.Name() << endl; - Bad = !SmartConfigure(Pkg); + if (Debug) + clog << OutputInDepth(Depth) << "Trying to SmartConfigure " << Pkg.Name() << endl; + Bad = !SmartConfigure(Pkg, Depth + 1); } /* If this or element did not match then continue on to the @@ -564,9 +626,9 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate) return _error->Error("Couldn't configure pre-depend %s for %s, " "probably a dependency cycle.", End.TargetPkg().Name(),Pkg.Name()); - Start++; + ++Start; } - else + else break; } @@ -579,49 +641,140 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate) for (Version **I = VList; *I != 0; I++) { VerIterator Ver(Cache,*I); - PkgIterator Pkg = Ver.ParentPkg(); + PkgIterator ConflictPkg = Ver.ParentPkg(); + VerIterator InstallVer(Cache,Cache[ConflictPkg].InstallVer); // See if the current version is conflicting - if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true) - { - if (EarlyRemove(Pkg) == false) - return _error->Error("Internal Error, Could not early remove %s",Pkg.Name()); + if (ConflictPkg.CurrentVer() == Ver && List->IsNow(ConflictPkg)) + { + cout << OutputInDepth(Depth) << Pkg.Name() << " conflicts with " << ConflictPkg.Name() << endl; + /* If a loop is not present or has not yet been detected, attempt to unpack packages + to resolve this conflict. If there is a loop present, remove packages to resolve this conflict */ + if (!List->IsFlag(ConflictPkg,pkgOrderList::Loop)) { + if (Cache[ConflictPkg].Keep() == 0 && Cache[ConflictPkg].InstallVer != 0) { + if (Debug) + cout << OutputInDepth(Depth) << OutputInDepth(Depth) << "Unpacking " << ConflictPkg.Name() << " to prevent conflict" << endl; + List->Flag(Pkg,pkgOrderList::Loop); + SmartUnPack(ConflictPkg,false, Depth + 1); + // Remove loop to allow it to be used later if needed + List->RmFlag(Pkg,pkgOrderList::Loop); + } else { + if (EarlyRemove(ConflictPkg) == false) + return _error->Error("Internal Error, Could not early remove %s",ConflictPkg.Name()); + } + } else { + if (!List->IsFlag(ConflictPkg,pkgOrderList::Removed)) { + if (Debug) + cout << OutputInDepth(Depth) << "Because of conficts knot, removing " << ConflictPkg.Name() << " to conflict violation" << endl; + if (EarlyRemove(ConflictPkg) == false) + return _error->Error("Internal Error, Could not early remove %s",ConflictPkg.Name()); + } + } + } + } + } + + // Check for breaks + if (End->Type == pkgCache::Dep::DpkgBreaks) { + SPtrArray<Version *> VList = End.AllTargets(); + for (Version **I = VList; *I != 0; I++) + { + VerIterator Ver(Cache,*I); + PkgIterator BrokenPkg = Ver.ParentPkg(); + VerIterator InstallVer(Cache,Cache[BrokenPkg].InstallVer); + + // Check if it needs to be unpacked + if (List->IsFlag(BrokenPkg,pkgOrderList::InList) && Cache[BrokenPkg].Delete() == false && + List->IsNow(BrokenPkg)) { + if (List->IsFlag(BrokenPkg,pkgOrderList::Loop) && PkgLoop) { + // This dependancy has already been dealt with by another SmartUnPack on Pkg + break; + } else if (List->IsFlag(Pkg,pkgOrderList::Loop)) { + /* Found a break, so unpack the package, but dont remove loop as already set. + This means that there is another SmartUnPack call for this + package and it will remove the loop flag. */ + if (Debug) + cout << OutputInDepth(Depth) << " Unpacking " << BrokenPkg.Name() << " to avoid break" << endl; + + SmartUnPack(BrokenPkg, false, Depth + 1); + } else { + List->Flag(Pkg,pkgOrderList::Loop); + // Found a break, so unpack the package + if (Debug) + cout << OutputInDepth(Depth) << " Unpacking " << BrokenPkg.Name() << " to avoid break" << endl; + + SmartUnPack(BrokenPkg, false, Depth + 1); + List->RmFlag(Pkg,pkgOrderList::Loop); + } + } + + // Check if a package needs to be removed + if (Cache[BrokenPkg].Delete() == true && !List->IsFlag(BrokenPkg,pkgOrderList::Configured)) { + if (Debug) + cout << OutputInDepth(Depth) << " Removing " << BrokenPkg.Name() << " to avoid break" << endl; + SmartRemove(BrokenPkg); } } } } - + // Check for reverse conflicts. if (CheckRConflicts(Pkg,Pkg.RevDependsList(), instVer.VerStr()) == false) - return false; + return false; for (PrvIterator P = instVer.ProvidesList(); - P.end() == false; P++) - CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion()); + P.end() == false; ++P) + if (Pkg->Group != P.OwnerPkg()->Group) + CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion()); + + if (PkgLoop) + return true; List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); - if ((instVer->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same) + if (Immediate == true && instVer->MultiArch == pkgCache::Version::Same) + { + /* Do lockstep M-A:same unpacking in two phases: + First unpack all installed architectures, then the not installed. + This way we avoid that M-A: enabled packages are installed before + their older non-M-A enabled packages are replaced by newer versions */ + bool const installed = Pkg->CurrentVer != 0; + if (installed == true && Install(Pkg,FileNames[Pkg->ID]) == false) + return false; for (PkgIterator P = Pkg.Group().PackageList(); P.end() == false; P = Pkg.Group().NextPkg(P)) { - if (Pkg == P || List->IsFlag(P,pkgOrderList::UnPacked) == true || + if (P->CurrentVer == 0 || P == Pkg || List->IsFlag(P,pkgOrderList::UnPacked) == true || Cache[P].InstallVer == 0 || (P.CurrentVer() == Cache[P].InstallVer && (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)) continue; - SmartUnPack(P, false); + if (SmartUnPack(P, false, Depth + 1) == false) + return false; } - - if(Install(Pkg,FileNames[Pkg->ID]) == false) + if (installed == false && Install(Pkg,FileNames[Pkg->ID]) == false) + return false; + for (PkgIterator P = Pkg.Group().PackageList(); + P.end() == false; P = Pkg.Group().NextPkg(P)) + { + if (P->CurrentVer != 0 || P == Pkg || List->IsFlag(P,pkgOrderList::UnPacked) == true || + Cache[P].InstallVer == 0 || (P.CurrentVer() == Cache[P].InstallVer && + (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)) + continue; + if (SmartUnPack(P, false, Depth + 1) == false) + return false; + } + } + // packages which are already unpacked don't need to be unpacked again + else if (Pkg.State() != pkgCache::PkgIterator::NeedsConfigure && Install(Pkg,FileNames[Pkg->ID]) == false) return false; - // Perform immedate configuration of the package. - if (Immediate == true && - List->IsFlag(Pkg,pkgOrderList::Immediate) == true) - if (SmartConfigure(Pkg) == false) - return _error->Error(_("Could not perform immediate configuration on '%s'. " - "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.Name(),2); + if (Immediate == true) { + // Perform immedate configuration of the package. + if (SmartConfigure(Pkg, Depth + 1) == false) + _error->Warning(_("Could not perform immediate configuration on '%s'. " + "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.Name(),2); + } return true; } @@ -652,15 +805,22 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() clog << "Done ordering" << endl; bool DoneSomething = false; - for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++) + for (pkgOrderList::iterator I = List->begin(); I != List->end(); ++I) { PkgIterator Pkg(Cache,*I); - + if (List->IsNow(Pkg) == false) { - if (Debug == true) - clog << "Skipping already done " << Pkg.Name() << endl; + if (!List->IsFlag(Pkg,pkgOrderList::Configured) && !NoImmConfigure) { + if (SmartConfigure(Pkg, 0) == false && Debug) + _error->Warning("Internal Error, Could not configure %s",Pkg.Name()); + // FIXME: The above warning message might need changing + } else { + if (Debug == true) + clog << "Skipping already done " << Pkg.Name() << endl; + } continue; + } if (List->IsMissing(Pkg) == true) @@ -691,9 +851,16 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() return Failed; } else - if (SmartUnPack(Pkg) == false) + if (SmartUnPack(Pkg,List->IsFlag(Pkg,pkgOrderList::Immediate),0) == false) return Failed; DoneSomething = true; + + if (ImmConfigureAll) { + /* ConfigureAll here to pick up and packages left unconfigured becuase they were unpacked in the + "PreUnpack Checks" section */ + if (!ConfigureAll()) + return Failed; + } } // Final run through the configure phase @@ -701,7 +868,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() return Failed; // Sanity check - for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++) + for (pkgOrderList::iterator I = List->begin(); I != List->end(); ++I) { if (List->IsFlag(*I,pkgOrderList::Configured) == false) { @@ -709,7 +876,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() PkgIterator(Cache,*I).Name()); return Failed; } - } + } return Completed; } @@ -741,4 +908,4 @@ pkgPackageManager::OrderResult pkgPackageManager::DoInstall(int statusFd) return DoInstallPostFork(statusFd); } - /*}}}*/ + /*}}}*/ diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 053b4dc13..d4989a6e0 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -23,15 +23,12 @@ #ifndef PKGLIB_PACKAGEMANAGER_H #define PKGLIB_PACKAGEMANAGER_H +#include <apt-pkg/pkgcache.h> #include <string> #include <iostream> -#include <apt-pkg/pkgcache.h> -#include <apt-pkg/depcache.h> #include <set> -using std::string; - class pkgAcquire; class pkgDepCache; class pkgSourceList; @@ -42,12 +39,15 @@ class pkgPackageManager : protected pkgCache::Namespace public: enum OrderResult {Completed,Failed,Incomplete}; + static bool SigINTStop; protected: - string *FileNames; + std::string *FileNames; pkgDepCache &Cache; pkgOrderList *List; bool Debug; + bool NoImmConfigure; + bool ImmConfigureAll; /** \brief saves packages dpkg let disappear @@ -57,7 +57,6 @@ class pkgPackageManager : protected pkgCache::Namespace */ std::set<std::string> disappearedPkgs; - bool DepAdd(pkgOrderList &Order,PkgIterator P,int Depth = 0); void ImmediateAdd(PkgIterator P, bool UseInstallVer, unsigned const int &Depth = 0); virtual OrderResult OrderInstall(); bool CheckRConflicts(PkgIterator Pkg,DepIterator Dep,const char *Ver); @@ -68,15 +67,15 @@ class pkgPackageManager : protected pkgCache::Namespace // Install helpers bool ConfigureAll(); - bool SmartConfigure(PkgIterator Pkg); + bool SmartConfigure(PkgIterator Pkg, int const Depth); //FIXME: merge on abi break bool SmartUnPack(PkgIterator Pkg); - bool SmartUnPack(PkgIterator Pkg, bool const Immediate); + bool SmartUnPack(PkgIterator Pkg, bool const Immediate, int const Depth); bool SmartRemove(PkgIterator Pkg); - bool EarlyRemove(PkgIterator Pkg); + bool EarlyRemove(PkgIterator Pkg); // The Actual installation implementation - virtual bool Install(PkgIterator /*Pkg*/,string /*File*/) {return false;}; + virtual bool Install(PkgIterator /*Pkg*/,std::string /*File*/) {return false;}; virtual bool Configure(PkgIterator /*Pkg*/) {return false;}; virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;}; virtual bool Go(int statusFd=-1) {return true;}; diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 2b8cb6b86..c854249e4 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -20,6 +20,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/pkgcache.h> #include <apt-pkg/policy.h> #include <apt-pkg/version.h> @@ -29,13 +31,12 @@ #include <apt-pkg/aptconfiguration.h> #include <apt-pkg/macros.h> -#include <apti18n.h> - #include <string> #include <sys/stat.h> #include <unistd.h> - #include <ctype.h> + +#include <apti18n.h> /*}}}*/ using std::string; @@ -180,7 +181,7 @@ bool pkgCache::ReMap(bool const &Errorchecks) unsigned long pkgCache::sHash(const string &Str) const { unsigned long Hash = 0; - for (string::const_iterator I = Str.begin(); I != Str.end(); I++) + for (string::const_iterator I = Str.begin(); I != Str.end(); ++I) Hash = 5*Hash + tolower_ascii(*I); return Hash % _count(HeaderP->PkgHashTable); } @@ -188,7 +189,7 @@ unsigned long pkgCache::sHash(const string &Str) const unsigned long pkgCache::sHash(const char *Str) const { unsigned long Hash = 0; - for (const char *I = Str; *I != 0; I++) + for (const char *I = Str; *I != 0; ++I) Hash = 5*Hash + tolower_ascii(*I); return Hash % _count(HeaderP->PkgHashTable); } @@ -489,7 +490,7 @@ pkgCache::PkgIterator::CurVersion() const if they provide no new information (e.g. there is no newer version than candidate) If no version and/or section can be found "none" is used. */ std::ostream& -operator<<(ostream& out, pkgCache::PkgIterator Pkg) +operator<<(std::ostream& out, pkgCache::PkgIterator Pkg) { if (Pkg.end() == true) return out << "invalid package"; @@ -574,7 +575,7 @@ bool pkgCache::DepIterator::SmartTargetPkg(PkgIterator &Result) const virtual package libc-dev which is provided by libc5-dev and libc6-dev we must ignore libc5-dev when considering the provides list. */ PrvIterator PStart = Result.ProvidesList(); - for (; PStart.end() != true && PStart.OwnerPkg() == ParentPkg(); PStart++); + for (; PStart.end() != true && PStart.OwnerPkg() == ParentPkg(); ++PStart); // Nothing but indirect self provides if (PStart.end() == true) @@ -582,7 +583,7 @@ bool pkgCache::DepIterator::SmartTargetPkg(PkgIterator &Result) const // Check for single packages in the provides list PrvIterator P = PStart; - for (; P.end() != true; P++) + for (; P.end() != true; ++P) { // Skip over self provides if (P.OwnerPkg() == ParentPkg()) @@ -616,7 +617,7 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() const PkgIterator DPkg = TargetPkg(); // Walk along the actual package providing versions - for (VerIterator I = DPkg.VersionList(); I.end() == false; I++) + for (VerIterator I = DPkg.VersionList(); I.end() == false; ++I) { if (Owner->VS->CheckDep(I.VerStr(),S->CompareOp,TargetVer()) == false) continue; @@ -631,13 +632,13 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() const } // Follow all provides - for (PrvIterator I = DPkg.ProvidesList(); I.end() == false; I++) + for (PrvIterator I = DPkg.ProvidesList(); I.end() == false; ++I) { if (Owner->VS->CheckDep(I.ProvideVersion(),S->CompareOp,TargetVer()) == false) continue; if (IsNegative() == true && - ParentPkg() == I.OwnerPkg()) + ParentPkg()->Group == I.OwnerPkg()->Group) continue; Size++; @@ -684,7 +685,7 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End) // ostream operator to handle string representation of a dependecy /*{{{*/ // --------------------------------------------------------------------- /* */ -std::ostream& operator<<(ostream& out, pkgCache::DepIterator D) +std::ostream& operator<<(std::ostream& out, pkgCache::DepIterator D) { if (D.end() == true) return out << "invalid dependency"; @@ -722,7 +723,7 @@ int pkgCache::VerIterator::CompareVer(const VerIterator &B) const /* Start at A and look for B. If B is found then A > B otherwise B was before A so A < B */ VerIterator I = *this; - for (;I.end() == false; I++) + for (;I.end() == false; ++I) if (I == B) return 1; return -1; @@ -734,7 +735,7 @@ int pkgCache::VerIterator::CompareVer(const VerIterator &B) const bool pkgCache::VerIterator::Downloadable() const { VerFileIterator Files = FileList(); - for (; Files.end() == false; Files++) + for (; Files.end() == false; ++Files) if ((Files.File()->Flags & pkgCache::Flag::NotSource) != pkgCache::Flag::NotSource) return true; return false; @@ -747,7 +748,7 @@ bool pkgCache::VerIterator::Downloadable() const bool pkgCache::VerIterator::Automatic() const { VerFileIterator Files = FileList(); - for (; Files.end() == false; Files++) + for (; Files.end() == false; ++Files) // Do not check ButAutomaticUpgrades here as it is kind of automatic… if ((Files.File()->Flags & pkgCache::Flag::NotAutomatic) != pkgCache::Flag::NotAutomatic) return true; @@ -762,7 +763,7 @@ pkgCache::VerFileIterator pkgCache::VerIterator::NewestFile() const { VerFileIterator Files = FileList(); VerFileIterator Highest = Files; - for (; Files.end() == false; Files++) + for (; Files.end() == false; ++Files) { if (Owner->VS->CmpReleaseVer(Files.File().Version(),Highest.File().Version()) > 0) Highest = Files; @@ -779,7 +780,7 @@ string pkgCache::VerIterator::RelStr() const { bool First = true; string Res; - for (pkgCache::VerFileIterator I = this->FileList(); I.end() == false; I++) + for (pkgCache::VerFileIterator I = this->FileList(); I.end() == false; ++I) { // Do not print 'not source' entries' pkgCache::PkgFileIterator File = I.File(); @@ -788,7 +789,7 @@ string pkgCache::VerIterator::RelStr() const // See if we have already printed this out.. bool Seen = false; - for (pkgCache::VerFileIterator J = this->FileList(); I != J; J++) + for (pkgCache::VerFileIterator J = this->FileList(); I != J; ++J) { pkgCache::PkgFileIterator File2 = J.File(); if (File2->Label == 0 || File->Label == 0) @@ -889,15 +890,26 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const { std::vector<string> const lang = APT::Configuration::getLanguages(); for (std::vector<string>::const_iterator l = lang.begin(); - l != lang.end(); l++) + l != lang.end(); ++l) { pkgCache::DescIterator Desc = DescriptionList(); for (; Desc.end() == false; ++Desc) - if (*l == Desc.LanguageCode() || - (*l == "en" && strcmp(Desc.LanguageCode(),"") == 0)) + if (*l == Desc.LanguageCode()) break; if (Desc.end() == true) - continue; + { + if (*l == "en") + { + Desc = DescriptionList(); + for (; Desc.end() == false; ++Desc) + if (strcmp(Desc.LanguageCode(), "") == 0) + break; + if (Desc.end() == true) + continue; + } + else + continue; + } return Desc; } for (pkgCache::DescIterator Desc = DescriptionList(); diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 87912aead..7e32a3a96 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -79,8 +79,6 @@ #include <time.h> #include <apt-pkg/mmap.h> -using std::string; - class pkgVersioningSystem; class pkgCache /*{{{*/ { @@ -152,10 +150,10 @@ class pkgCache /*{{{*/ protected: // Memory mapped cache file - string CacheFile; + std::string CacheFile; MMap ⤅ - unsigned long sHash(const string &S) const; + unsigned long sHash(const std::string &S) const; unsigned long sHash(const char *S) const; public: @@ -180,16 +178,16 @@ class pkgCache /*{{{*/ inline void *DataEnd() {return ((unsigned char *)Map.Data()) + Map.Size();}; // String hashing function (512 range) - inline unsigned long Hash(const string &S) const {return sHash(S);}; + inline unsigned long Hash(const std::string &S) const {return sHash(S);}; inline unsigned long Hash(const char *S) const {return sHash(S);}; // Useful transformation things const char *Priority(unsigned char Priority); // Accessors - GrpIterator FindGrp(const string &Name); - PkgIterator FindPkg(const string &Name); - PkgIterator FindPkg(const string &Name, const string &Arch); + GrpIterator FindGrp(const std::string &Name); + PkgIterator FindPkg(const std::string &Name); + PkgIterator FindPkg(const std::string &Name, const std::string &Arch); Header &Head() {return *HeaderP;}; inline GrpIterator GrpBegin(); @@ -214,7 +212,7 @@ class pkgCache /*{{{*/ private: bool MultiArchEnabled; - PkgIterator SingleArchFindPkg(const string &Name); + PkgIterator SingleArchFindPkg(const std::string &Name); inline char const * const NativeArch() const; }; /*}}}*/ diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 49a7f7adc..9f999c41b 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -10,7 +10,7 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#define APT_COMPATIBILITY 986 +#include <config.h> #include <apt-pkg/pkgcachegen.h> #include <apt-pkg/error.h> @@ -23,21 +23,24 @@ #include <apt-pkg/sptr.h> #include <apt-pkg/pkgsystem.h> #include <apt-pkg/macros.h> - #include <apt-pkg/tagfile.h> - -#include <apti18n.h> +#include <apt-pkg/metaindex.h> +#include <apt-pkg/fileutl.h> #include <vector> - #include <sys/stat.h> #include <unistd.h> #include <errno.h> #include <stdio.h> + +#include <apti18n.h> /*}}}*/ typedef vector<pkgIndexFile *>::iterator FileIterator; template <typename Iter> std::vector<Iter*> pkgCacheGenerator::Dynamic<Iter>::toReMap; +bool IsDuplicateDescription(pkgCache::DescIterator Desc, + MD5SumValue const &CurMd5, std::string const &CurLang); + // CacheGenerator::pkgCacheGenerator - Constructor /*{{{*/ // --------------------------------------------------------------------- /* We set the dirty flag and make sure that is written to the disk */ @@ -182,82 +185,154 @@ bool pkgCacheGenerator::MergeList(ListParser &List, if (PackageName.empty() == true) return false; - string const Arch = List.Architecture(); - + Counter++; + if (Counter % 100 == 0 && Progress != 0) + Progress->Progress(List.Offset()); + + string Arch = List.Architecture(); + string const Version = List.Version(); + if (Version.empty() == true && Arch.empty() == true) + { + if (MergeListGroup(List, PackageName) == false) + return false; + } + + if (Arch.empty() == true) + Arch = _config->Find("APT::Architecture"); + // Get a pointer to the package structure pkgCache::PkgIterator Pkg; Dynamic<pkgCache::PkgIterator> DynPkg(Pkg); if (NewPackage(Pkg, PackageName, Arch) == false) - return _error->Error(_("Error occurred while processing %s (NewPackage)"),PackageName.c_str()); - Counter++; - if (Counter % 100 == 0 && Progress != 0) - Progress->Progress(List.Offset()); + // TRANSLATOR: The first placeholder is a package name, + // the other two should be copied verbatim as they include debug info + return _error->Error(_("Error occurred while processing %s (%s%d)"), + PackageName.c_str(), "NewPackage", 1); + - /* Get a pointer to the version structure. We know the list is sorted - so we use that fact in the search. Insertion of new versions is - done with correct sorting */ - string Version = List.Version(); if (Version.empty() == true) { - // we first process the package, then the descriptions - // (this has the bonus that we get MMap error when we run out - // of MMap space) - pkgCache::VerIterator Ver(Cache); - Dynamic<pkgCache::VerIterator> DynVer(Ver); - if (List.UsePackage(Pkg, Ver) == false) - return _error->Error(_("Error occurred while processing %s (UsePackage1)"), - PackageName.c_str()); - - // Find the right version to write the description - MD5SumValue CurMd5 = List.Description_md5(); - Ver = Pkg.VersionList(); - - for (; Ver.end() == false; ++Ver) - { - pkgCache::DescIterator Desc = Ver.DescriptionList(); - Dynamic<pkgCache::DescIterator> DynDesc(Desc); - map_ptrloc *LastDesc = &Ver->DescriptionList; - bool duplicate=false; - - // don't add a new description if we have one for the given - // md5 && language - for ( ; Desc.end() == false; Desc++) - if (MD5SumValue(Desc.md5()) == CurMd5 && - Desc.LanguageCode() == List.DescriptionLanguage()) - duplicate=true; - if(duplicate) - continue; - - for (Desc = Ver.DescriptionList(); - Desc.end() == false; - LastDesc = &Desc->NextDesc, Desc++) - { - if (MD5SumValue(Desc.md5()) == CurMd5) - { - // Add new description - void const * const oldMap = Map.Data(); - map_ptrloc const descindex = NewDescription(Desc, List.DescriptionLanguage(), CurMd5, *LastDesc); - if (oldMap != Map.Data()) - LastDesc += (map_ptrloc*) Map.Data() - (map_ptrloc*) oldMap; - *LastDesc = descindex; - Desc->ParentPkg = Pkg.Index(); - - if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false) - return _error->Error(_("Error occurred while processing %s (NewFileDesc1)"),PackageName.c_str()); - break; - } - } - } + if (MergeListPackage(List, Pkg) == false) + return false; + } + else + { + if (MergeListVersion(List, Pkg, Version, OutVer) == false) + return false; + } - continue; + if (OutVer != 0) + { + FoundFileDeps |= List.HasFileDeps(); + return true; } + } - pkgCache::VerIterator Ver = Pkg.VersionList(); - Dynamic<pkgCache::VerIterator> DynVer(Ver); - map_ptrloc *LastVer = &Pkg->VersionList; - void const * oldMap = Map.Data(); + if (Cache.HeaderP->PackageCount >= (1ULL<<sizeof(Cache.PkgP->ID)*8)-1) + return _error->Error(_("Wow, you exceeded the number of package " + "names this APT is capable of.")); + if (Cache.HeaderP->VersionCount >= (1ULL<<(sizeof(Cache.VerP->ID)*8))-1) + return _error->Error(_("Wow, you exceeded the number of versions " + "this APT is capable of.")); + if (Cache.HeaderP->DescriptionCount >= (1ULL<<(sizeof(Cache.DescP->ID)*8))-1) + return _error->Error(_("Wow, you exceeded the number of descriptions " + "this APT is capable of.")); + if (Cache.HeaderP->DependsCount >= (1ULL<<(sizeof(Cache.DepP->ID)*8))-1ULL) + return _error->Error(_("Wow, you exceeded the number of dependencies " + "this APT is capable of.")); + + FoundFileDeps |= List.HasFileDeps(); + return true; +} +// CacheGenerator::MergeListGroup /*{{{*/ +bool pkgCacheGenerator::MergeListGroup(ListParser &List, std::string const &GrpName) +{ + pkgCache::GrpIterator Grp = Cache.FindGrp(GrpName); + // a group has no data on it's own, only packages have it but these + // stanzas like this come from Translation- files to add descriptions, + // but without a version we don't need a description for it… + if (Grp.end() == true) + return true; + Dynamic<pkgCache::GrpIterator> DynGrp(Grp); + + pkgCache::PkgIterator Pkg; + Dynamic<pkgCache::PkgIterator> DynPkg(Pkg); + for (Pkg = Grp.PackageList(); Pkg.end() == false; Pkg = Grp.NextPkg(Pkg)) + if (MergeListPackage(List, Pkg) == false) + return false; + + return true; +} + /*}}}*/ +// CacheGenerator::MergeListPackage /*{{{*/ +bool pkgCacheGenerator::MergeListPackage(ListParser &List, pkgCache::PkgIterator &Pkg) +{ + // we first process the package, then the descriptions + // (for deb this package processing is in fact a no-op) + pkgCache::VerIterator Ver(Cache); + Dynamic<pkgCache::VerIterator> DynVer(Ver); + if (List.UsePackage(Pkg, Ver) == false) + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "UsePackage", 1); + + // Find the right version to write the description + MD5SumValue CurMd5 = List.Description_md5(); + std::string CurLang = List.DescriptionLanguage(); + + for (Ver = Pkg.VersionList(); Ver.end() == false; ++Ver) + { + pkgCache::DescIterator Desc = Ver.DescriptionList(); + + // a version can only have one md5 describing it + if (MD5SumValue(Desc.md5()) != CurMd5) + continue; + + // don't add a new description if we have one for the given + // md5 && language + if (IsDuplicateDescription(Desc, CurMd5, CurLang) == true) + continue; + + Dynamic<pkgCache::DescIterator> DynDesc(Desc); + // we add at the end, so that the start is constant as we need + // that to be able to efficiently share these lists + map_ptrloc *LastDesc = &Ver->DescriptionList; + for (;Desc.end() == false && Desc->NextDesc != 0; ++Desc); + if (Desc.end() == false) + LastDesc = &Desc->NextDesc; + + void const * const oldMap = Map.Data(); + map_ptrloc const descindex = NewDescription(Desc, CurLang, CurMd5, *LastDesc); + if (oldMap != Map.Data()) + LastDesc += (map_ptrloc*) Map.Data() - (map_ptrloc*) oldMap; + *LastDesc = descindex; + Desc->ParentPkg = Pkg.Index(); + + if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false) + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "NewFileDesc", 1); + + // we can stop here as all "same" versions will share the description + break; + } + + return true; +} + /*}}}*/ +// CacheGenerator::MergeListVersion /*{{{*/ +bool pkgCacheGenerator::MergeListVersion(ListParser &List, pkgCache::PkgIterator &Pkg, + std::string const &Version, pkgCache::VerIterator* &OutVer) +{ + pkgCache::VerIterator Ver = Pkg.VersionList(); + Dynamic<pkgCache::VerIterator> DynVer(Ver); + map_ptrloc *LastVer = &Pkg->VersionList; + void const * oldMap = Map.Data(); + + unsigned long const Hash = List.VersionHash(); + if (Ver.end() == false) + { + /* We know the list is sorted so we use that fact in the search. + Insertion of new versions is done with correct sorting */ int Res = 1; - unsigned long const Hash = List.VersionHash(); for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++) { Res = Cache.VS->CmpVersion(Version,Ver.VerStr()); @@ -275,94 +350,123 @@ bool pkgCacheGenerator::MergeList(ListParser &List, if (Res == 0 && Ver.end() == false && Ver->Hash == Hash) { if (List.UsePackage(Pkg,Ver) == false) - return _error->Error(_("Error occurred while processing %s (UsePackage2)"), - PackageName.c_str()); + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "UsePackage", 2); if (NewFileVer(Ver,List) == false) - return _error->Error(_("Error occurred while processing %s (NewFileVer1)"), - PackageName.c_str()); - + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "NewFileVer", 1); + // Read only a single record and return if (OutVer != 0) { *OutVer = Ver; - FoundFileDeps |= List.HasFileDeps(); return true; } - - continue; + + return true; } + } - // Add a new version - map_ptrloc const verindex = NewVersion(Ver,Version,*LastVer); - if (verindex == 0 && _error->PendingError()) - return _error->Error(_("Error occurred while processing %s (NewVersion%d)"), - PackageName.c_str(), 1); + // Add a new version + map_ptrloc const verindex = NewVersion(Ver,Version,*LastVer); + if (verindex == 0 && _error->PendingError()) + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "NewVersion", 1); - if (oldMap != Map.Data()) + if (oldMap != Map.Data()) LastVer += (map_ptrloc*) Map.Data() - (map_ptrloc*) oldMap; - *LastVer = verindex; - Ver->ParentPkg = Pkg.Index(); - Ver->Hash = Hash; + *LastVer = verindex; + Ver->ParentPkg = Pkg.Index(); + Ver->Hash = Hash; - if (List.NewVersion(Ver) == false) - return _error->Error(_("Error occurred while processing %s (NewVersion%d)"), - PackageName.c_str(), 2); + if (unlikely(List.NewVersion(Ver) == false)) + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "NewVersion", 2); - if (List.UsePackage(Pkg,Ver) == false) - return _error->Error(_("Error occurred while processing %s (UsePackage3)"), - PackageName.c_str()); - - if (NewFileVer(Ver,List) == false) - return _error->Error(_("Error occurred while processing %s (NewVersion%d)"), - PackageName.c_str(), 3); + if (unlikely(List.UsePackage(Pkg,Ver) == false)) + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "UsePackage", 3); - // Read only a single record and return - if (OutVer != 0) - { - *OutVer = Ver; - FoundFileDeps |= List.HasFileDeps(); - return true; - } + if (unlikely(NewFileVer(Ver,List) == false)) + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "NewFileVer", 2); - /* Record the Description data. Description data always exist in - Packages and Translation-* files. */ - pkgCache::DescIterator Desc = Ver.DescriptionList(); - Dynamic<pkgCache::DescIterator> DynDesc(Desc); - map_ptrloc *LastDesc = &Ver->DescriptionList; + pkgCache::GrpIterator Grp = Pkg.Group(); + Dynamic<pkgCache::GrpIterator> DynGrp(Grp); - // Skip to the end of description set - for (; Desc.end() == false; LastDesc = &Desc->NextDesc, Desc++); + /* If it is the first version of this package we need to add implicit + Multi-Arch dependencies to all other package versions in the group now - + otherwise we just add them for this new version */ + if (Pkg.VersionList()->NextVer == 0) + { + pkgCache::PkgIterator P = Grp.PackageList(); + Dynamic<pkgCache::PkgIterator> DynP(P); + for (; P.end() != true; P = Grp.NextPkg(P)) + { + if (P->ID == Pkg->ID) + continue; + pkgCache::VerIterator V = P.VersionList(); + Dynamic<pkgCache::VerIterator> DynV(V); + for (; V.end() != true; ++V) + if (unlikely(AddImplicitDepends(V, Pkg) == false)) + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "AddImplicitDepends", 1); + } + } + if (unlikely(AddImplicitDepends(Grp, Pkg, Ver) == false)) + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "AddImplicitDepends", 2); - // Add new description - oldMap = Map.Data(); - map_ptrloc const descindex = NewDescription(Desc, List.DescriptionLanguage(), List.Description_md5(), *LastDesc); - if (oldMap != Map.Data()) - LastDesc += (map_ptrloc*) Map.Data() - (map_ptrloc*) oldMap; - *LastDesc = descindex; - Desc->ParentPkg = Pkg.Index(); + // Read only a single record and return + if (OutVer != 0) + { + *OutVer = Ver; + return true; + } - if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false) - return _error->Error(_("Error occurred while processing %s (NewFileDesc2)"),PackageName.c_str()); + /* Record the Description (it is not translated) */ + MD5SumValue CurMd5 = List.Description_md5(); + if (CurMd5.Value().empty() == true) + return true; + std::string CurLang = List.DescriptionLanguage(); + + /* Before we add a new description we first search in the group for + a version with a description of the same MD5 - if so we reuse this + description group instead of creating our own for this version */ + for (pkgCache::PkgIterator P = Grp.PackageList(); + P.end() == false; P = Grp.NextPkg(P)) + { + for (pkgCache::VerIterator V = P.VersionList(); + V.end() == false; ++V) + { + if (IsDuplicateDescription(V.DescriptionList(), CurMd5, "") == false) + continue; + Ver->DescriptionList = V->DescriptionList; + return true; + } } - FoundFileDeps |= List.HasFileDeps(); + // We haven't found reusable descriptions, so add the first description + pkgCache::DescIterator Desc = Ver.DescriptionList(); + Dynamic<pkgCache::DescIterator> DynDesc(Desc); + map_ptrloc *LastDesc = &Ver->DescriptionList; + + oldMap = Map.Data(); + map_ptrloc const descindex = NewDescription(Desc, CurLang, CurMd5, *LastDesc); + if (oldMap != Map.Data()) + LastDesc += (map_ptrloc*) Map.Data() - (map_ptrloc*) oldMap; + *LastDesc = descindex; + Desc->ParentPkg = Pkg.Index(); + + if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false) + return _error->Error(_("Error occurred while processing %s (%s%d)"), + Pkg.Name(), "NewFileDesc", 2); - if (Cache.HeaderP->PackageCount >= (1ULL<<sizeof(Cache.PkgP->ID)*8)-1) - return _error->Error(_("Wow, you exceeded the number of package " - "names this APT is capable of.")); - if (Cache.HeaderP->VersionCount >= (1ULL<<(sizeof(Cache.VerP->ID)*8))-1) - return _error->Error(_("Wow, you exceeded the number of versions " - "this APT is capable of.")); - if (Cache.HeaderP->DescriptionCount >= (1ULL<<(sizeof(Cache.DescP->ID)*8))-1) - return _error->Error(_("Wow, you exceeded the number of descriptions " - "this APT is capable of.")); - if (Cache.HeaderP->DependsCount >= (1ULL<<(sizeof(Cache.DepP->ID)*8))-1ULL) - return _error->Error(_("Wow, you exceeded the number of dependencies " - "this APT is capable of.")); return true; } /*}}}*/ + /*}}}*/ // CacheGenerator::MergeFileProvides - Merge file provides /*{{{*/ // --------------------------------------------------------------------- /* If we found any file depends while parsing the main list we need to @@ -387,8 +491,8 @@ bool pkgCacheGenerator::MergeFileProvides(ListParser &List) pkgCache::PkgIterator Pkg = Cache.FindPkg(PackageName); Dynamic<pkgCache::PkgIterator> DynPkg(Pkg); if (Pkg.end() == true) - return _error->Error(_("Error occurred while processing %s (FindPkg)"), - PackageName.c_str()); + return _error->Error(_("Error occurred while processing %s (%s%d)"), + PackageName.c_str(), "FindPkg", 1); Counter++; if (Counter % 100 == 0 && Progress != 0) Progress->Progress(List.Offset()); @@ -396,12 +500,13 @@ bool pkgCacheGenerator::MergeFileProvides(ListParser &List) unsigned long Hash = List.VersionHash(); pkgCache::VerIterator Ver = Pkg.VersionList(); Dynamic<pkgCache::VerIterator> DynVer(Ver); - for (; Ver.end() == false; Ver++) + for (; Ver.end() == false; ++Ver) { if (Ver->Hash == Hash && Version.c_str() == Ver.VerStr()) { if (List.CollectFileProvides(Cache,Ver) == false) - return _error->Error(_("Error occurred while processing %s (CollectFileProvides)"),PackageName.c_str()); + return _error->Error(_("Error occurred while processing %s (%s%d)"), + PackageName.c_str(), "CollectFileProvides", 1); break; } } @@ -493,6 +598,75 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,const string &Name return true; } /*}}}*/ +// CacheGenerator::AddImplicitDepends /*{{{*/ +bool pkgCacheGenerator::AddImplicitDepends(pkgCache::GrpIterator &G, + pkgCache::PkgIterator &P, + pkgCache::VerIterator &V) +{ + // copy P.Arch() into a string here as a cache remap + // in NewDepends() later may alter the pointer location + string Arch = P.Arch() == NULL ? "" : P.Arch(); + map_ptrloc *OldDepLast = NULL; + /* MultiArch handling introduces a lot of implicit Dependencies: + - MultiArch: same → Co-Installable if they have the same version + - All others conflict with all other group members */ + bool const coInstall = ((V->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same); + pkgCache::PkgIterator D = G.PackageList(); + Dynamic<pkgCache::PkgIterator> DynD(D); + for (; D.end() != true; D = G.NextPkg(D)) + { + if (Arch == D.Arch() || D->VersionList == 0) + continue; + /* We allow only one installed arch at the time + per group, therefore each group member conflicts + with all other group members */ + if (coInstall == true) + { + // Replaces: ${self}:other ( << ${binary:Version}) + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::Less, pkgCache::Dep::Replaces, + OldDepLast); + // Breaks: ${self}:other (!= ${binary:Version}) + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::NotEquals, pkgCache::Dep::DpkgBreaks, + OldDepLast); + } else { + // Conflicts: ${self}:other + NewDepends(D, V, "", + pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, + OldDepLast); + } + } + return true; +} +bool pkgCacheGenerator::AddImplicitDepends(pkgCache::VerIterator &V, + pkgCache::PkgIterator &D) +{ + /* MultiArch handling introduces a lot of implicit Dependencies: + - MultiArch: same → Co-Installable if they have the same version + - All others conflict with all other group members */ + map_ptrloc *OldDepLast = NULL; + bool const coInstall = ((V->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same); + if (coInstall == true) + { + // Replaces: ${self}:other ( << ${binary:Version}) + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::Less, pkgCache::Dep::Replaces, + OldDepLast); + // Breaks: ${self}:other (!= ${binary:Version}) + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::NotEquals, pkgCache::Dep::DpkgBreaks, + OldDepLast); + } else { + // Conflicts: ${self}:other + NewDepends(D, V, "", + pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, + OldDepLast); + } + return true; +} + + /*}}}*/ // CacheGenerator::NewFileVer - Create a new File<->Version association /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -512,7 +686,7 @@ bool pkgCacheGenerator::NewFileVer(pkgCache::VerIterator &Ver, // Link it to the end of the list map_ptrloc *Last = &Ver->FileList; - for (pkgCache::VerFileIterator V = Ver.FileList(); V.end() == false; V++) + for (pkgCache::VerFileIterator V = Ver.FileList(); V.end() == false; ++V) Last = &V->NextFile; VF->NextFile = *Last; *Last = VF.Index(); @@ -569,7 +743,7 @@ bool pkgCacheGenerator::NewFileDesc(pkgCache::DescIterator &Desc, // Link it to the end of the list map_ptrloc *Last = &Desc->FileList; - for (pkgCache::DescFileIterator D = Desc.FileList(); D.end() == false; D++) + for (pkgCache::DescFileIterator D = Desc.FileList(); D.end() == false; ++D) Last = &D->NextFile; DF->NextFile = *Last; @@ -611,76 +785,6 @@ map_ptrloc pkgCacheGenerator::NewDescription(pkgCache::DescIterator &Desc, return Description; } /*}}}*/ -// CacheGenerator::FinishCache - do various finish operations /*{{{*/ -// --------------------------------------------------------------------- -/* This prepares the Cache for delivery */ -bool pkgCacheGenerator::FinishCache(OpProgress *Progress) -{ - // FIXME: add progress reporting for this operation - // Do we have different architectures in your groups ? - vector<string> archs = APT::Configuration::getArchitectures(); - if (archs.size() > 1) - { - // Create Conflicts in between the group - pkgCache::GrpIterator G = GetCache().GrpBegin(); - Dynamic<pkgCache::GrpIterator> DynG(G); - for (; G.end() != true; G++) - { - string const PkgName = G.Name(); - pkgCache::PkgIterator P = G.PackageList(); - Dynamic<pkgCache::PkgIterator> DynP(P); - for (; P.end() != true; P = G.NextPkg(P)) - { - pkgCache::PkgIterator allPkg; - Dynamic<pkgCache::PkgIterator> DynallPkg(allPkg); - pkgCache::VerIterator V = P.VersionList(); - Dynamic<pkgCache::VerIterator> DynV(V); - for (; V.end() != true; V++) - { - // copy P.Arch() into a string here as a cache remap - // in NewDepends() later may alter the pointer location - string Arch = P.Arch() == NULL ? "" : P.Arch(); - map_ptrloc *OldDepLast = NULL; - /* MultiArch handling introduces a lot of implicit Dependencies: - - MultiArch: same → Co-Installable if they have the same version - - Architecture: all → Need to be Co-Installable for internal reasons - - All others conflict with all other group members */ - bool const coInstall = ((V->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same); - for (vector<string>::const_iterator A = archs.begin(); A != archs.end(); ++A) - { - if (*A == Arch) - continue; - /* We allow only one installed arch at the time - per group, therefore each group member conflicts - with all other group members */ - pkgCache::PkgIterator D = G.FindPkg(*A); - Dynamic<pkgCache::PkgIterator> DynD(D); - if (D.end() == true) - continue; - if (coInstall == true) - { - // Replaces: ${self}:other ( << ${binary:Version}) - NewDepends(D, V, V.VerStr(), - pkgCache::Dep::Less, pkgCache::Dep::Replaces, - OldDepLast); - // Breaks: ${self}:other (!= ${binary:Version}) - NewDepends(D, V, V.VerStr(), - pkgCache::Dep::NotEquals, pkgCache::Dep::DpkgBreaks, - OldDepLast); - } else { - // Conflicts: ${self}:other - NewDepends(D, V, "", - pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, - OldDepLast); - } - } - } - } - } - } - return true; -} - /*}}}*/ // CacheGenerator::NewDepends - Create a dependency element /*{{{*/ // --------------------------------------------------------------------- /* This creates a dependency element in the tree. It is linked to the @@ -729,7 +833,7 @@ bool pkgCacheGenerator::NewDepends(pkgCache::PkgIterator &Pkg, if (OldDepLast == NULL) { OldDepLast = &Ver->DependsList; - for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; ++D) OldDepLast = &D->NextDepends; } else if (oldMap != Map.Data()) OldDepLast += (map_ptrloc*) Map.Data() - (map_ptrloc*) oldMap; @@ -959,7 +1063,7 @@ static bool CheckValidity(const string &CacheFile, verify the IMS data and check that it is on the disk too.. */ SPtrArray<bool> Visited = new bool[Cache.HeaderP->PackageFileCount]; memset(Visited,0,sizeof(*Visited)*Cache.HeaderP->PackageFileCount); - for (; Start != End; Start++) + for (; Start != End; ++Start) { if (Debug == true) std::clog << "Checking PkgFile " << (*Start)->Describe() << ": "; @@ -1026,7 +1130,7 @@ static bool CheckValidity(const string &CacheFile, static unsigned long ComputeSize(FileIterator Start,FileIterator End) { unsigned long TotalSize = 0; - for (; Start != End; Start++) + for (; Start != End; ++Start) { if ((*Start)->HasPackages() == false) continue; @@ -1044,7 +1148,7 @@ static bool BuildCache(pkgCacheGenerator &Gen, FileIterator Start, FileIterator End) { FileIterator I; - for (I = Start; I != End; I++) + for (I = Start; I != End; ++I) { if ((*I)->HasPackages() == false) continue; @@ -1074,7 +1178,7 @@ static bool BuildCache(pkgCacheGenerator &Gen, Progress->Done(); TotalSize = ComputeSize(Start, End); CurrentSize = 0; - for (I = Start; I != End; I++) + for (I = Start; I != End; ++I) { unsigned long Size = (*I)->Size(); if (Progress != NULL) @@ -1121,12 +1225,12 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress vector<pkgIndexFile *> Files; for (vector<metaIndex *>::const_iterator i = List.begin(); i != List.end(); - i++) + ++i) { vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles(); for (vector<pkgIndexFile *>::const_iterator j = Indexes->begin(); j != Indexes->end(); - j++) + ++j) Files.push_back (*j); } @@ -1243,9 +1347,6 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress if (BuildCache(Gen,Progress,CurrentSize,TotalSize, Files.begin()+EndOfSource,Files.end()) == false) return false; - - // FIXME: move me to a better place - Gen.FinishCache(Progress); } else { @@ -1288,9 +1389,6 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress if (BuildCache(Gen,Progress,CurrentSize,TotalSize, Files.begin()+EndOfSource,Files.end()) == false) return false; - - // FIXME: move me to a better place - Gen.FinishCache(Progress); } if (Debug == true) std::clog << "Caches are ready for shipping" << std::endl; @@ -1341,9 +1439,6 @@ bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **O Files.begin()+EndOfSource,Files.end()) == false) return false; - // FIXME: move me to a better place - Gen.FinishCache(Progress); - if (_error->PendingError() == true) return false; *OutMap = Map.UnGuard(); @@ -1351,3 +1446,22 @@ bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **O return true; } /*}}}*/ +// IsDuplicateDescription /*{{{*/ +bool IsDuplicateDescription(pkgCache::DescIterator Desc, + MD5SumValue const &CurMd5, std::string const &CurLang) +{ + // Descriptions in the same link-list have all the same md5 + if (MD5SumValue(Desc.md5()) != CurMd5) + return false; + for (; Desc.end() == false; ++Desc) + if (Desc.LanguageCode() == CurLang) + return true; + return false; +} + /*}}}*/ +// CacheGenerator::FinishCache /*{{{*/ +bool pkgCacheGenerator::FinishCache(OpProgress *Progress) +{ + return true; +} + /*}}}*/ diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index c26051182..b6259b433 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -22,6 +22,7 @@ #include <apt-pkg/pkgcache.h> #include <apt-pkg/md5.h> +#include <apt-pkg/macros.h> #include <vector> @@ -63,29 +64,29 @@ class pkgCacheGenerator /*{{{*/ pkgCache Cache; OpProgress *Progress; - string PkgFileName; + std::string PkgFileName; pkgCache::PackageFile *CurrentFile; // Flag file dependencies bool FoundFileDeps; - bool NewGroup(pkgCache::GrpIterator &Grp,const string &Name); - bool NewPackage(pkgCache::PkgIterator &Pkg,const string &Name, const string &Arch); + bool NewGroup(pkgCache::GrpIterator &Grp,const std::string &Name); + bool NewPackage(pkgCache::PkgIterator &Pkg,const std::string &Name, const std::string &Arch); bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List); bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List); bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver, - string const &Version, unsigned int const &Op, + std::string const &Version, unsigned int const &Op, unsigned int const &Type, map_ptrloc* &OldDepLast); - unsigned long NewVersion(pkgCache::VerIterator &Ver,const string &VerStr,unsigned long Next); - map_ptrloc NewDescription(pkgCache::DescIterator &Desc,const string &Lang,const MD5SumValue &md5sum,map_ptrloc Next); + unsigned long NewVersion(pkgCache::VerIterator &Ver,const std::string &VerStr,unsigned long Next); + map_ptrloc NewDescription(pkgCache::DescIterator &Desc,const std::string &Lang,const MD5SumValue &md5sum,map_ptrloc Next); public: unsigned long WriteUniqString(const char *S,unsigned int Size); - inline unsigned long WriteUniqString(const string &S) {return WriteUniqString(S.c_str(),S.length());}; + inline unsigned long WriteUniqString(const std::string &S) {return WriteUniqString(S.c_str(),S.length());}; void DropProgress() {Progress = 0;}; - bool SelectFile(const string &File,const string &Site,pkgIndexFile const &Index, + bool SelectFile(const std::string &File,const std::string &Site,pkgIndexFile const &Index, unsigned long Flags = 0); bool MergeList(ListParser &List,pkgCache::VerIterator *Ver = 0); inline pkgCache &GetCache() {return Cache;}; @@ -94,7 +95,7 @@ class pkgCacheGenerator /*{{{*/ bool HasFileDeps() {return FoundFileDeps;}; bool MergeFileProvides(ListParser &List); - bool FinishCache(OpProgress *Progress); + __deprecated bool FinishCache(OpProgress *Progress); static bool MakeStatusCache(pkgSourceList &List,OpProgress *Progress, MMap **OutMap = 0,bool AllowMem = false); @@ -105,6 +106,16 @@ class pkgCacheGenerator /*{{{*/ pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress); ~pkgCacheGenerator(); + + private: + bool MergeListGroup(ListParser &List, std::string const &GrpName); + bool MergeListPackage(ListParser &List, pkgCache::PkgIterator &Pkg); + bool MergeListVersion(ListParser &List, pkgCache::PkgIterator &Pkg, + std::string const &Version, pkgCache::VerIterator* &OutVer); + + bool AddImplicitDepends(pkgCache::GrpIterator &G, pkgCache::PkgIterator &P, + pkgCache::VerIterator &V); + bool AddImplicitDepends(pkgCache::VerIterator &V, pkgCache::PkgIterator &D); }; /*}}}*/ // This is the abstract package list parser class. /*{{{*/ @@ -122,26 +133,26 @@ class pkgCacheGenerator::ListParser protected: - inline unsigned long WriteUniqString(string S) {return Owner->WriteUniqString(S);}; + inline unsigned long WriteUniqString(std::string S) {return Owner->WriteUniqString(S);}; inline unsigned long WriteUniqString(const char *S,unsigned int Size) {return Owner->WriteUniqString(S,Size);}; - inline unsigned long WriteString(const string &S) {return Owner->WriteStringInMap(S);}; + inline unsigned long WriteString(const std::string &S) {return Owner->WriteStringInMap(S);}; inline unsigned long WriteString(const char *S,unsigned int Size) {return Owner->WriteStringInMap(S,Size);}; - bool NewDepends(pkgCache::VerIterator &Ver,const string &Package, const string &Arch, - const string &Version,unsigned int Op, + bool NewDepends(pkgCache::VerIterator &Ver,const std::string &Package, const std::string &Arch, + const std::string &Version,unsigned int Op, unsigned int Type); - bool NewProvides(pkgCache::VerIterator &Ver,const string &PkgName, - const string &PkgArch, const string &Version); + bool NewProvides(pkgCache::VerIterator &Ver,const std::string &PkgName, + const std::string &PkgArch, const std::string &Version); public: // These all operate against the current section - virtual string Package() = 0; - virtual string Architecture() = 0; + virtual std::string Package() = 0; + virtual std::string Architecture() = 0; virtual bool ArchitectureAll() = 0; - virtual string Version() = 0; + virtual std::string Version() = 0; virtual bool NewVersion(pkgCache::VerIterator &Ver) = 0; - virtual string Description() = 0; - virtual string DescriptionLanguage() = 0; + virtual std::string Description() = 0; + virtual std::string DescriptionLanguage() = 0; virtual MD5SumValue Description_md5() = 0; virtual unsigned short VersionHash() = 0; virtual bool UsePackage(pkgCache::PkgIterator &Pkg, @@ -164,18 +175,4 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, MMap **OutMap = 0,bool AllowMem = false); bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap); - -#ifdef APT_COMPATIBILITY -#if APT_COMPATIBILITY != 986 -#warning "Using APT_COMPATIBILITY" -#endif -MMap *pkgMakeStatusCacheMem(pkgSourceList &List,OpProgress &Progress) -{ - MMap *Map = 0; - if (pkgCacheGenerator::MakeStatusCache(List,&Progress,&Map,true) == false) - return 0; - return Map; -} -#endif - #endif diff --git a/apt-pkg/pkgrecords.cc b/apt-pkg/pkgrecords.cc index e506de73a..c5b3bebd7 100644 --- a/apt-pkg/pkgrecords.cc +++ b/apt-pkg/pkgrecords.cc @@ -9,12 +9,14 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/pkgrecords.h> #include <apt-pkg/indexfile.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> - -#include <apti18n.h> + +#include <apti18n.h> /*}}}*/ // Records::pkgRecords - Constructor /*{{{*/ @@ -24,7 +26,7 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(Cache.HeaderP->PackageFileCount) { for (pkgCache::PkgFileIterator I = Cache.FileBegin(); - I.end() == false; I++) + I.end() == false; ++I) { const pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(I.IndexType()); if (Type == 0) @@ -44,7 +46,7 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), /* */ pkgRecords::~pkgRecords() { - for ( vector<Parser*>::iterator it = Files.begin(); + for ( std::vector<Parser*>::iterator it = Files.begin(); it != Files.end(); ++it) { diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index ce92cacc4..3658435e8 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -19,7 +19,6 @@ #include <apt-pkg/pkgcache.h> -#include <apt-pkg/fileutl.h> #include <vector> class pkgRecords /*{{{*/ @@ -55,23 +54,23 @@ class pkgRecords::Parser /*{{{*/ friend class pkgRecords; // These refer to the archive file for the Version - virtual string FileName() {return string();}; - virtual string MD5Hash() {return string();}; - virtual string SHA1Hash() {return string();}; - virtual string SHA256Hash() {return string();}; - virtual string SHA512Hash() {return string();}; - virtual string SourcePkg() {return string();}; - virtual string SourceVer() {return string();}; + virtual std::string FileName() {return std::string();}; + virtual std::string MD5Hash() {return std::string();}; + virtual std::string SHA1Hash() {return std::string();}; + virtual std::string SHA256Hash() {return std::string();}; + virtual std::string SHA512Hash() {return std::string();}; + virtual std::string SourcePkg() {return std::string();}; + virtual std::string SourceVer() {return std::string();}; // These are some general stats about the package - virtual string Maintainer() {return string();}; - virtual string ShortDesc() {return string();}; - virtual string LongDesc() {return string();}; - virtual string Name() {return string();}; - virtual string Homepage() {return string();} + virtual std::string Maintainer() {return std::string();}; + virtual std::string ShortDesc() {return std::string();}; + virtual std::string LongDesc() {return std::string();}; + virtual std::string Name() {return std::string();}; + virtual std::string Homepage() {return std::string();} // An arbitrary custom field - virtual string RecordField(const char *fieldName) { return string();}; + virtual std::string RecordField(const char *fieldName) { return std::string();}; // The record in binary form virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;}; diff --git a/apt-pkg/pkgsystem.cc b/apt-pkg/pkgsystem.cc index 6dd2d3ee4..f61c140fa 100644 --- a/apt-pkg/pkgsystem.cc +++ b/apt-pkg/pkgsystem.cc @@ -10,6 +10,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/pkgsystem.h> #include <apt-pkg/policy.h> #include <cassert> diff --git a/apt-pkg/pkgsystem.h b/apt-pkg/pkgsystem.h index 246762e0b..211fd0d56 100644 --- a/apt-pkg/pkgsystem.h +++ b/apt-pkg/pkgsystem.h @@ -37,14 +37,16 @@ #ifndef PKGLIB_PKGSYSTEM_H #define PKGLIB_PKGSYSTEM_H +#include <apt-pkg/pkgcache.h> -#include <apt-pkg/depcache.h> #include <vector> - + +class pkgDepCache; class pkgPackageManager; class pkgVersioningSystem; class Configuration; class pkgIndexFile; +class PkgFileIterator; class pkgSystem { diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 2c22fe0da..b47dab90c 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -23,6 +23,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/policy.h> #include <apt-pkg/configuration.h> #include <apt-pkg/tagfile.h> @@ -31,10 +33,10 @@ #include <apt-pkg/error.h> #include <apt-pkg/sptr.h> -#include <apti18n.h> - #include <iostream> #include <sstream> + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -64,7 +66,8 @@ pkgPolicy::pkgPolicy(pkgCache *Owner) : Pins(0), PFPriority(0), Cache(Owner) { if ((F->Archive != 0 && vm.ExpressionMatches(DefRel, F.Archive()) == true) || (F->Codename != 0 && vm.ExpressionMatches(DefRel, F.Codename()) == true) || - (F->Version != 0 && vm.ExpressionMatches(DefRel, F.Version()) == true)) + (F->Version != 0 && vm.ExpressionMatches(DefRel, F.Version()) == true) || + (DefRel.length() > 2 && DefRel[1] == '=')) found = true; } if (found == false) @@ -81,7 +84,7 @@ pkgPolicy::pkgPolicy(pkgCache *Owner) : Pins(0), PFPriority(0), Cache(Owner) bool pkgPolicy::InitDefaults() { // Initialize the priorities based on the status of the package file - for (pkgCache::PkgFileIterator I = Cache->FileBegin(); I != Cache->FileEnd(); I++) + for (pkgCache::PkgFileIterator I = Cache->FileBegin(); I != Cache->FileEnd(); ++I) { PFPriority[I->ID] = 500; if ((I->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource) @@ -98,10 +101,10 @@ bool pkgPolicy::InitDefaults() signed Cur = 989; StatusOverride = false; for (vector<Pin>::const_iterator I = Defaults.begin(); I != Defaults.end(); - I++, Cur--) + ++I, --Cur) { pkgVersionMatch Match(I->Data,I->Type); - for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); F++) + for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); ++F) { if (Match.FileMatch(F) == true && Fixed[F->ID] == false) { @@ -122,7 +125,7 @@ bool pkgPolicy::InitDefaults() } if (_config->FindB("Debug::pkgPolicy",false) == true) - for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); F++) + for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); ++F) std::clog << "Prio of " << F.FileName() << ' ' << PFPriority[F->ID] << std::endl; return true; @@ -162,12 +165,12 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVer(pkgCache::PkgIterator const &Pk tracks the default when the default is taken away, and a permanent pin that stays at that setting. */ - for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; Ver++) + for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver) { /* Lets see if this version is the installed version */ bool instVer = (Pkg.CurrentVer() == Ver); - for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; VF++) + for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; ++VF) { /* If this is the status file, and the current version is not the version in the status file (ie it is not installed, or somesuch) @@ -360,7 +363,7 @@ bool ReadPinDir(pkgPolicy &Plcy,string Dir) vector<string> const List = GetListOfFilesInDir(Dir, "pref", true, true); // Read the files - for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::const_iterator I = List.begin(); I != List.end(); ++I) if (ReadPinFile(Plcy, *I) == false) return false; return true; diff --git a/apt-pkg/policy.h b/apt-pkg/policy.h index 92d32728f..3c8246e3b 100644 --- a/apt-pkg/policy.h +++ b/apt-pkg/policy.h @@ -38,8 +38,6 @@ #include <apt-pkg/versionmatch.h> #include <vector> -using std::vector; - class pkgPolicy : public pkgDepCache::Policy { protected: @@ -47,29 +45,29 @@ class pkgPolicy : public pkgDepCache::Policy struct Pin { pkgVersionMatch::MatchType Type; - string Data; + std::string Data; signed short Priority; Pin() : Type(pkgVersionMatch::None), Priority(0) {}; }; struct PkgPin : Pin { - string Pkg; - PkgPin(string const &Pkg) : Pin(), Pkg(Pkg) {}; + std::string Pkg; + PkgPin(std::string const &Pkg) : Pin(), Pkg(Pkg) {}; }; Pin *Pins; signed short *PFPriority; - vector<Pin> Defaults; - vector<PkgPin> Unmatched; + std::vector<Pin> Defaults; + std::vector<PkgPin> Unmatched; pkgCache *Cache; bool StatusOverride; public: // Things for manipulating pins - void CreatePin(pkgVersionMatch::MatchType Type,string Pkg, - string Data,signed short Priority); + void CreatePin(pkgVersionMatch::MatchType Type,std::string Pkg, + std::string Data,signed short Priority); pkgCache::VerIterator GetMatch(pkgCache::PkgIterator const &Pkg); // Things for the cache interface. @@ -83,7 +81,7 @@ class pkgPolicy : public pkgDepCache::Policy virtual ~pkgPolicy() {delete [] PFPriority; delete [] Pins;}; }; -bool ReadPinFile(pkgPolicy &Plcy,string File = ""); -bool ReadPinDir(pkgPolicy &Plcy,string Dir = ""); +bool ReadPinFile(pkgPolicy &Plcy, std::string File = ""); +bool ReadPinDir(pkgPolicy &Plcy, std::string Dir = ""); #endif diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index aaff16316..f5f458099 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -8,15 +8,19 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/sourcelist.h> #include <apt-pkg/error.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/strutl.h> #include <apt-pkg/configuration.h> - -#include <apti18n.h> +#include <apt-pkg/metaindex.h> +#include <apt-pkg/indexfile.h> #include <fstream> + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -173,7 +177,7 @@ pkgSourceList::pkgSourceList(string File) /* */ pkgSourceList::~pkgSourceList() { - for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) + for (const_iterator I = SrcList.begin(); I != SrcList.end(); ++I) delete *I; } /*}}}*/ @@ -218,7 +222,7 @@ bool pkgSourceList::ReadMainList() /* */ void pkgSourceList::Reset() { - for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) + for (const_iterator I = SrcList.begin(); I != SrcList.end(); ++I) delete *I; SrcList.erase(SrcList.begin(),SrcList.end()); } @@ -266,7 +270,7 @@ bool pkgSourceList::ReadAppend(string File) // CNC:2003-02-20 - Do not break if '#' is inside []. for (I = Buffer; *I != 0 && *I != '#'; I++) if (*I == '[') - for (I++; *I != 0 && *I != ']'; I++); + I = strchr(I + 1, ']'); *I = 0; const char *C = _strstrip(Buffer); @@ -296,11 +300,11 @@ bool pkgSourceList::ReadAppend(string File) bool pkgSourceList::FindIndex(pkgCache::PkgFileIterator File, pkgIndexFile *&Found) const { - for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) + for (const_iterator I = SrcList.begin(); I != SrcList.end(); ++I) { vector<pkgIndexFile *> *Indexes = (*I)->GetIndexFiles(); for (vector<pkgIndexFile *>::const_iterator J = Indexes->begin(); - J != Indexes->end(); J++) + J != Indexes->end(); ++J) { if ((*J)->FindInCache(*File.Cache()) == File) { @@ -318,7 +322,7 @@ bool pkgSourceList::FindIndex(pkgCache::PkgFileIterator File, /* */ bool pkgSourceList::GetIndexes(pkgAcquire *Owner, bool GetAll) const { - for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) + for (const_iterator I = SrcList.begin(); I != SrcList.end(); ++I) if ((*I)->GetIndexes(Owner,GetAll) == false) return false; return true; @@ -334,7 +338,7 @@ bool pkgSourceList::ReadSourceDir(string Dir) vector<string> const List = GetListOfFilesInDir(Dir, "list", true); // Read the files - for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::const_iterator I = List.begin(); I != List.end(); ++I) if (ReadAppend(*I) == false) return false; return true; @@ -357,7 +361,7 @@ time_t pkgSourceList::GetLastModifiedTime() // calculate the time time_t mtime_sources = GetModificationTime(Main); - for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++) + for (vector<string>::const_iterator I = List.begin(); I != List.end(); ++I) mtime_sources = std::max(mtime_sources, GetModificationTime(*I)); return mtime_sources; diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h index 7b473ee64..4509e54b9 100644 --- a/apt-pkg/sourcelist.h +++ b/apt-pkg/sourcelist.h @@ -31,13 +31,15 @@ #include <vector> #include <map> #include <apt-pkg/pkgcache.h> -#include <apt-pkg/metaindex.h> using std::string; using std::vector; -class pkgAquire; +class pkgAcquire; +class pkgIndexFile; +class metaIndex; + class pkgSourceList { public: diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc index 46a02b55c..f6d2d5158 100644 --- a/apt-pkg/srcrecords.cc +++ b/apt-pkg/srcrecords.cc @@ -11,12 +11,15 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/srcrecords.h> #include <apt-pkg/error.h> #include <apt-pkg/sourcelist.h> #include <apt-pkg/strutl.h> - -#include <apti18n.h> +#include <apt-pkg/metaindex.h> + +#include <apti18n.h> /*}}}*/ // SrcRecords::pkgSrcRecords - Constructor /*{{{*/ @@ -24,11 +27,11 @@ /* Open all the source index files */ pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : Files(0), Current(0) { - for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++) + for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); ++I) { vector<pkgIndexFile *> *Indexes = (*I)->GetIndexFiles(); for (vector<pkgIndexFile *>::const_iterator J = Indexes->begin(); - J != Indexes->end(); J++) + J != Indexes->end(); ++J) { Parser* P = (*J)->CreateSrcParser(); if (_error->PendingError() == true) @@ -66,7 +69,7 @@ bool pkgSrcRecords::Restart() { Current = Files.begin(); for (vector<Parser*>::iterator I = Files.begin(); - I != Files.end(); I++) + I != Files.end(); ++I) (*I)->Restart(); return true; @@ -89,7 +92,7 @@ pkgSrcRecords::Parser *pkgSrcRecords::Find(const char *Package,bool const &SrcOn { if (_error->PendingError() == true) return 0; - Current++; + ++Current; if (Current == Files.end()) return 0; } @@ -107,7 +110,7 @@ pkgSrcRecords::Parser *pkgSrcRecords::Find(const char *Package,bool const &SrcOn // Check for a binary hit const char **I = (*Current)->Binaries(); - for (; I != 0 && *I != 0; I++) + for (; I != 0 && *I != 0; ++I) if (strcmp(Package,*I) == 0) return *Current; } diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h index 8a78d7711..a55bc74fa 100644 --- a/apt-pkg/srcrecords.h +++ b/apt-pkg/srcrecords.h @@ -15,10 +15,7 @@ #include <string> -#include <vector> - -using std::string; -using std::vector; +#include <vector> class pkgSourceList; class pkgIndexFile; @@ -29,10 +26,10 @@ class pkgSrcRecords // Describes a single file struct File { - string MD5Hash; + std::string MD5Hash; unsigned long Size; - string Path; - string Type; + std::string Path; + std::string Type; }; // Abstract parser for each source record @@ -49,8 +46,8 @@ class pkgSrcRecords struct BuildDepRec { - string Package; - string Version; + std::string Package; + std::string Version; unsigned int Op; unsigned char Type; }; @@ -61,18 +58,18 @@ class pkgSrcRecords virtual bool Step() = 0; virtual bool Jump(unsigned long const &Off) = 0; virtual unsigned long Offset() = 0; - virtual string AsStr() = 0; + virtual std::string AsStr() = 0; - virtual string Package() const = 0; - virtual string Version() const = 0; - virtual string Maintainer() const = 0; - virtual string Section() const = 0; + virtual std::string Package() const = 0; + virtual std::string Version() const = 0; + virtual std::string Maintainer() const = 0; + virtual std::string Section() const = 0; virtual const char **Binaries() = 0; // Ownership does not transfer - virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) = 0; + virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) = 0; static const char *BuildDepType(unsigned char const &Type); - virtual bool Files(vector<pkgSrcRecords::File> &F) = 0; + virtual bool Files(std::vector<pkgSrcRecords::File> &F) = 0; Parser(const pkgIndexFile *Index) : iIndex(Index) {}; virtual ~Parser() {}; @@ -83,8 +80,8 @@ class pkgSrcRecords void *d; // The list of files and the current parser pointer - vector<Parser*> Files; - vector<Parser *>::iterator Current; + std::vector<Parser*> Files; + std::vector<Parser *>::iterator Current; public: diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index a8f04b23a..ec86173df 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -11,15 +11,18 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/tagfile.h> #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> -#include <apti18n.h> - #include <string> #include <stdio.h> #include <ctype.h> + +#include <apti18n.h> /*}}}*/ using std::string; @@ -27,7 +30,7 @@ using std::string; class pkgTagFilePrivate { public: - pkgTagFilePrivate(FileFd *pFd, unsigned long Size) : Fd(*pFd), Size(Size) + pkgTagFilePrivate(FileFd *pFd, unsigned long long Size) : Fd(*pFd), Size(Size) { } FileFd &Fd; @@ -35,14 +38,14 @@ public: char *Start; char *End; bool Done; - unsigned long iOffset; - unsigned long Size; + unsigned long long iOffset; + unsigned long long Size; }; // TagFile::pkgTagFile - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) +pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long long Size) { d = new pkgTagFilePrivate(pFd, Size); @@ -84,7 +87,7 @@ unsigned long pkgTagFile::Offset() bool pkgTagFile::Resize() { char *tmp; - unsigned long EndSize = d->End - d->Start; + unsigned long long EndSize = d->End - d->Start; // fail is the buffer grows too big if(d->Size > 1024*1024+1) @@ -136,8 +139,8 @@ bool pkgTagFile::Step(pkgTagSection &Tag) then fills the rest from the file */ bool pkgTagFile::Fill() { - unsigned long EndSize = d->End - d->Start; - unsigned long Actual = 0; + unsigned long long EndSize = d->End - d->Start; + unsigned long long Actual = 0; memmove(d->Buffer,d->Start,EndSize); d->Start = d->Buffer; @@ -178,12 +181,12 @@ bool pkgTagFile::Fill() // --------------------------------------------------------------------- /* This jumps to a pre-recorded file location and reads the record that is there */ -bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) +bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long long Offset) { // We are within a buffer space of the next hit.. if (Offset >= d->iOffset && d->iOffset + (d->End - d->Start) > Offset) { - unsigned long Dist = Offset - d->iOffset; + unsigned long long Dist = Offset - d->iOffset; d->Start += Dist; d->iOffset += Dist; return Step(Tag); diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 23f5c57e6..a5bf5ac90 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -20,10 +20,12 @@ #ifndef PKGLIB_TAGFILE_H #define PKGLIB_TAGFILE_H - -#include <apt-pkg/fileutl.h> #include <stdio.h> +#include <string> + +class FileFd; + class pkgTagSection { const char *Section; @@ -54,7 +56,7 @@ class pkgTagSection bool Find(const char *Tag,const char *&Start, const char *&End) const; bool Find(const char *Tag,unsigned &Pos) const; - string FindS(const char *Tag) const; + std::string FindS(const char *Tag) const; signed int FindI(const char *Tag,signed long Default = 0) const ; unsigned long long FindULL(const char *Tag, unsigned long long const &Default = 0) const; bool FindFlag(const char *Tag,unsigned long &Flags, @@ -78,7 +80,7 @@ class pkgTagSection Stop = this->Stop; }; - pkgTagSection() : Section(0), Stop(0) {}; + pkgTagSection() : Section(0), TagCount(0), Stop(0) {}; virtual ~pkgTagSection() {}; }; @@ -94,9 +96,9 @@ class pkgTagFile bool Step(pkgTagSection &Section); unsigned long Offset(); - bool Jump(pkgTagSection &Tag,unsigned long Offset); + bool Jump(pkgTagSection &Tag,unsigned long long Offset); - pkgTagFile(FileFd *F,unsigned long Size = 32*1024); + pkgTagFile(FileFd *F,unsigned long long Size = 32*1024); virtual ~pkgTagFile(); }; diff --git a/apt-pkg/vendor.cc b/apt-pkg/vendor.cc index 2350afe69..36fc25957 100644 --- a/apt-pkg/vendor.cc +++ b/apt-pkg/vendor.cc @@ -1,3 +1,5 @@ +#include<config.h> + #include <iostream> #include <apt-pkg/error.h> #include <apt-pkg/vendor.h> @@ -20,16 +22,16 @@ Vendor::Vendor(std::string VendorID, delete FingerprintList; } -const string Vendor::LookupFingerprint(string Print) const +const std::string Vendor::LookupFingerprint(std::string Print) const { - std::map<string,string>::const_iterator Elt = Fingerprints.find(Print); + std::map<std::string,std::string>::const_iterator Elt = Fingerprints.find(Print); if (Elt == Fingerprints.end()) return ""; else return (*Elt).second; } -bool Vendor::CheckDist(string Dist) +bool Vendor::CheckDist(std::string Dist) { return true; } diff --git a/apt-pkg/vendor.h b/apt-pkg/vendor.h index df229737a..9b157378c 100644 --- a/apt-pkg/vendor.h +++ b/apt-pkg/vendor.h @@ -6,29 +6,27 @@ #include <apt-pkg/macros.h> -using std::string; - -// A class representing a particular software provider. +// A class representing a particular software provider. class __deprecated Vendor { public: struct Fingerprint { - string Print; - string Description; + std::string Print; + std::string Description; }; protected: - string VendorID; - string Origin; - std::map<string, string> Fingerprints; + std::string VendorID; + std::string Origin; + std::map<std::string, std::string> Fingerprints; public: - Vendor(string VendorID, string Origin, + Vendor(std::string VendorID, std::string Origin, std::vector<struct Fingerprint *> *FingerprintList); - virtual const string& GetVendorID() const { return VendorID; }; - virtual const string LookupFingerprint(string Print) const; - virtual bool CheckDist(string Dist); + virtual const std::string& GetVendorID() const { return VendorID; }; + virtual const std::string LookupFingerprint(std::string Print) const; + virtual bool CheckDist(std::string Dist); virtual ~Vendor(){}; }; diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc index 48ac12cee..ecfc7db87 100644 --- a/apt-pkg/vendorlist.cc +++ b/apt-pkg/vendorlist.cc @@ -1,17 +1,24 @@ +#include<config.h> + #include <apt-pkg/fileutl.h> #include <apt-pkg/error.h> +#include <apt-pkg/configuration.h> #include <apti18n.h> #if __GNUC__ >= 4 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif +#include <apt-pkg/vendor.h> #include <apt-pkg/vendorlist.h> +using std::string; +using std::vector; + pkgVendorList::~pkgVendorList() { for (vector<const Vendor *>::const_iterator I = VendorList.begin(); - I != VendorList.end(); I++) + I != VendorList.end(); ++I) delete *I; } @@ -49,7 +56,7 @@ bool pkgVendorList::Read(string File) /*{{{*/ bool pkgVendorList::CreateList(Configuration& Cnf) /*{{{*/ { for (vector<const Vendor *>::const_iterator I = VendorList.begin(); - I != VendorList.end(); I++) + I != VendorList.end(); ++I) delete *I; VendorList.erase(VendorList.begin(),VendorList.end()); @@ -129,7 +136,7 @@ const Vendor* pkgVendorList::LookupFingerprint(string Fingerprint) /*{{{*/ /*}}}*/ const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput) /*{{{*/ { - for (std::vector<string>::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); I++) + for (std::vector<string>::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); ++I) { string::size_type pos = (*I).find("VALIDSIG "); if (_config->FindB("Debug::Vendor", false)) diff --git a/apt-pkg/vendorlist.h b/apt-pkg/vendorlist.h index eaeecb173..733d23a32 100644 --- a/apt-pkg/vendorlist.h +++ b/apt-pkg/vendorlist.h @@ -15,26 +15,23 @@ #include <string> #include <vector> -#include <apt-pkg/vendor.h> -#include <apt-pkg/configuration.h> #include <apt-pkg/macros.h> -using std::string; -using std::vector; - +class Vendor; +class Configuration; class __deprecated pkgVendorList { protected: - vector<Vendor const *> VendorList; + std::vector<Vendor const *> VendorList; bool CreateList(Configuration& Cnf); - const Vendor* LookupFingerprint(string Fingerprint); + const Vendor* LookupFingerprint(std::string Fingerprint); public: - typedef vector<Vendor const *>::const_iterator const_iterator; + typedef std::vector<Vendor const *>::const_iterator const_iterator; bool ReadMainList(); - bool Read(string File); + bool Read(std::string File); // List accessors inline const_iterator begin() const {return VendorList.begin();}; @@ -42,7 +39,7 @@ class __deprecated pkgVendorList inline unsigned int size() const {return VendorList.size();}; inline bool empty() const {return VendorList.empty();}; - const Vendor* FindVendor(const vector<string> GPGVOutput); + const Vendor* FindVendor(const std::vector<std::string> GPGVOutput); ~pkgVendorList(); }; diff --git a/apt-pkg/version.cc b/apt-pkg/version.cc index 42e449d36..a9d4fb763 100644 --- a/apt-pkg/version.cc +++ b/apt-pkg/version.cc @@ -8,6 +8,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/version.h> #include <apt-pkg/pkgcache.h> diff --git a/apt-pkg/version.h b/apt-pkg/version.h index 49c53a93a..92dbc2576 100644 --- a/apt-pkg/version.h +++ b/apt-pkg/version.h @@ -20,12 +20,9 @@ #ifndef PKGLIB_VERSION_H #define PKGLIB_VERSION_H - -#include <apt-pkg/strutl.h> +#include <apt-pkg/strutl.h> #include <string> -using std::string; - class pkgVersioningSystem { public: @@ -43,7 +40,7 @@ class pkgVersioningSystem virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) = 0; virtual int DoCmpReleaseVer(const char *A,const char *Aend, const char *B,const char *Bend) = 0; - virtual string UpstreamVersion(const char *A) = 0; + virtual std::string UpstreamVersion(const char *A) = 0; // See if the given VS is compatible with this one.. virtual bool TestCompatibility(pkgVersioningSystem const &Against) @@ -57,8 +54,4 @@ class pkgVersioningSystem virtual ~pkgVersioningSystem() {}; }; -#ifdef APT_COMPATIBILITY -#include <apt-pkg/debversion.h> -#endif - #endif diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index c40b1fdbc..e4fa0ea65 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -11,8 +11,9 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include <apt-pkg/versionmatch.h> +#include<config.h> +#include <apt-pkg/versionmatch.h> #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> @@ -21,9 +22,10 @@ #include <fnmatch.h> #include <sys/types.h> #include <regex.h> - /*}}}*/ +using std::string; + // VersionMatch::pkgVersionMatch - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Break up the data string according to the selected type */ @@ -60,7 +62,7 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type) // Are we a simple specification? string::const_iterator I = Data.begin(); - for (; I != Data.end() && *I != '='; I++); + for (; I != Data.end() && *I != '='; ++I); if (I == Data.end()) { // Temporary @@ -152,7 +154,7 @@ bool pkgVersionMatch::MatchVer(const char *A,string B,bool Prefix) pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg) { pkgCache::VerIterator Ver = Pkg.VersionList(); - for (; Ver.end() == false; Ver++) + for (; Ver.end() == false; ++Ver) { if (Type == Version) { @@ -163,7 +165,7 @@ pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg) continue; } - for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; VF++) + for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; ++VF) if (FileMatch(VF.File()) == true) return Ver; } diff --git a/apt-pkg/versionmatch.h b/apt-pkg/versionmatch.h index 39639a23d..da103fc5b 100644 --- a/apt-pkg/versionmatch.h +++ b/apt-pkg/versionmatch.h @@ -39,40 +39,38 @@ #include <string> #include <apt-pkg/pkgcache.h> -using std::string; - class pkgVersionMatch { // Version Matching - string VerStr; + std::string VerStr; bool VerPrefixMatch; // Release Matching - string RelVerStr; + std::string RelVerStr; bool RelVerPrefixMatch; - string RelOrigin; - string RelRelease; - string RelCodename; - string RelArchive; - string RelLabel; - string RelComponent; - string RelArchitecture; + std::string RelOrigin; + std::string RelRelease; + std::string RelCodename; + std::string RelArchive; + std::string RelLabel; + std::string RelComponent; + std::string RelArchitecture; bool MatchAll; // Origin Matching - string OrSite; + std::string OrSite; public: enum MatchType {None = 0,Version,Release,Origin} Type; - bool MatchVer(const char *A,string B,bool Prefix); + bool MatchVer(const char *A,std::string B,bool Prefix); bool ExpressionMatches(const char *pattern, const char *string); bool ExpressionMatches(const std::string& pattern, const char *string); bool FileMatch(pkgCache::PkgFileIterator File); pkgCache::VerIterator Find(pkgCache::PkgIterator Pkg); - pkgVersionMatch(string Data,MatchType Type); + pkgVersionMatch(std::string Data,MatchType Type); }; #endif diff --git a/buildlib/config.h.in b/buildlib/config.h.in index b3609a700..256911231 100644 --- a/buildlib/config.h.in +++ b/buildlib/config.h.in @@ -33,6 +33,9 @@ /* If there is no socklen_t, define this for the netdb shim */ #undef NEED_SOCKLEN_T_DEFINE +/* Define to the size of the filesize containing structures */ +#undef _FILE_OFFSET_BITS + /* Define the arch name string */ #undef COMMON_ARCH diff --git a/buildlib/defaults.mak b/buildlib/defaults.mak index bf93bd2ee..edb089160 100644 --- a/buildlib/defaults.mak +++ b/buildlib/defaults.mak @@ -118,10 +118,10 @@ MKDIRS := $(BIN) # list .PHONY: headers library clean veryclean all binary program doc dirs .PHONY: maintainer-clean dist-clean distclean pristine sanity -all: binary doc +all: dirs binary doc binary: library program maintainer-clean dist-clean distclean pristine sanity: veryclean -headers library clean veryclean program: +headers library clean veryclean program test: veryclean: echo Very Clean done for $(SUBDIR) diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc index d2db949ea..1ccb08804 100644 --- a/cmdline/acqprogress.cc +++ b/cmdline/acqprogress.cc @@ -8,19 +8,21 @@ ##################################################################### */ /*}}}*/ // Include files /*{{{*/ -#include "acqprogress.h" +#include<config.h> + #include <apt-pkg/acquire-item.h> #include <apt-pkg/acquire-worker.h> #include <apt-pkg/configuration.h> #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> -#include <apti18n.h> - #include <stdio.h> #include <signal.h> #include <iostream> #include <unistd.h> + +#include "acqprogress.h" +#include <apti18n.h> /*}}}*/ using namespace std; @@ -161,7 +163,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) ScreenWidth = sizeof(Buffer)-1; // Put in the percent done - sprintf(S,"%ld%%",long(double((CurrentBytes + CurrentItems)*100.0)/double(TotalBytes+TotalItems))); + sprintf(S,"%.0f%%",((CurrentBytes + CurrentItems)*100.0)/(TotalBytes+TotalItems)); bool Shown = false; for (pkgAcquire::Worker *I = Owner->WorkersBegin(); I != 0; @@ -212,11 +214,11 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) if (I->TotalSize > 0 && I->CurrentItem->Owner->Complete == false) { if (Mode == Short) - snprintf(S,End-S," %lu%%", - long(double(I->CurrentSize*100.0)/double(I->TotalSize))); + snprintf(S,End-S," %.0f%%", + (I->CurrentSize*100.0)/I->TotalSize); else - snprintf(S,End-S,"/%sB %lu%%",SizeToStr(I->TotalSize).c_str(), - long(double(I->CurrentSize*100.0)/double(I->TotalSize))); + snprintf(S,End-S,"/%sB %.0f%%",SizeToStr(I->TotalSize).c_str(), + (I->CurrentSize*100.0)/I->TotalSize); } S += strlen(S); snprintf(S,End-S,"]"); @@ -236,7 +238,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) if (CurrentCPS != 0) { char Tmp[300]; - unsigned long ETA = (unsigned long)((TotalBytes - CurrentBytes)/CurrentCPS); + unsigned long long ETA = (TotalBytes - CurrentBytes)/CurrentCPS; sprintf(Tmp," %sB/s %s",SizeToStr(CurrentCPS).c_str(),TimeToStr(ETA).c_str()); unsigned int Len = strlen(Buffer); unsigned int LenT = strlen(Tmp); diff --git a/cmdline/acqprogress.h b/cmdline/acqprogress.h index 48f90ae59..8f0903923 100644 --- a/cmdline/acqprogress.h +++ b/cmdline/acqprogress.h @@ -12,6 +12,8 @@ #include <apt-pkg/acquire.h> +#include <string> + class AcqTextStatus : public pkgAcquireStatus { unsigned int &ScreenWidth; @@ -21,7 +23,7 @@ class AcqTextStatus : public pkgAcquireStatus public: - virtual bool MediaChange(string Media,string Drive); + virtual bool MediaChange(std::string Media,std::string Drive); virtual void IMSHit(pkgAcquire::ItemDesc &Itm); virtual void Fetch(pkgAcquire::ItemDesc &Itm); virtual void Done(pkgAcquire::ItemDesc &Itm); diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 232bb93ec..82a31c9b1 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -13,9 +13,9 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/error.h> -#include <cassert> -#include <apt-pkg/pkgcachegen.h> #include <apt-pkg/cachefile.h> #include <apt-pkg/cacheset.h> #include <apt-pkg/init.h> @@ -23,6 +23,7 @@ #include <apt-pkg/sourcelist.h> #include <apt-pkg/cmndline.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> #include <apt-pkg/pkgrecords.h> #include <apt-pkg/srcrecords.h> #include <apt-pkg/version.h> @@ -30,18 +31,21 @@ #include <apt-pkg/tagfile.h> #include <apt-pkg/algorithms.h> #include <apt-pkg/sptr.h> +#include <apt-pkg/pkgsystem.h> +#include <apt-pkg/indexfile.h> +#include <apt-pkg/metaindex.h> -#include <config.h> -#include <apti18n.h> - +#include <cassert> #include <locale.h> #include <iostream> #include <unistd.h> #include <errno.h> #include <regex.h> #include <stdio.h> - #include <iomanip> +#include <algorithm> + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -141,7 +145,7 @@ bool ShowUnMet(pkgCache::VerIterator const &V, bool const &Important) if (Start == End) break; - Start++; + ++Start; } while (1); @@ -169,7 +173,7 @@ bool ShowUnMet(pkgCache::VerIterator const &V, bool const &Important) if (Start == End) break; cout << " | "; - Start++; + ++Start; } while (1); @@ -187,7 +191,7 @@ bool UnMet(CommandLine &CmdL) if (CmdL.FileSize() <= 1) { - for (pkgCache::PkgIterator P = CacheFile.GetPkgCache()->PkgBegin(); P.end() == false; P++) + for (pkgCache::PkgIterator P = CacheFile.GetPkgCache()->PkgBegin(); P.end() == false; ++P) for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; ++V) if (ShowUnMet(V, Important) == false) return false; @@ -217,13 +221,13 @@ bool DumpPackage(CommandLine &CmdL) { cout << "Package: " << Pkg.FullName(true) << endl; cout << "Versions: " << endl; - for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; Cur++) + for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; ++Cur) { cout << Cur.VerStr(); - for (pkgCache::VerFileIterator Vf = Cur.FileList(); Vf.end() == false; Vf++) + for (pkgCache::VerFileIterator Vf = Cur.FileList(); Vf.end() == false; ++Vf) cout << " (" << Vf.File().FileName() << ")"; cout << endl; - for (pkgCache::DescIterator D = Cur.DescriptionList(); D.end() == false; D++) + for (pkgCache::DescIterator D = Cur.DescriptionList(); D.end() == false; ++D) { cout << " Description Language: " << D.LanguageCode() << endl << " File: " << D.FileList().File().FileName() << endl @@ -235,7 +239,7 @@ bool DumpPackage(CommandLine &CmdL) cout << endl; cout << "Reverse Depends: " << endl; - for (pkgCache::DepIterator D = Pkg.RevDependsList(); D.end() != true; D++) + for (pkgCache::DepIterator D = Pkg.RevDependsList(); D.end() != true; ++D) { cout << " " << D.ParentPkg().FullName(true) << ',' << D.TargetPkg().FullName(true); if (D->Version != 0) @@ -245,24 +249,24 @@ bool DumpPackage(CommandLine &CmdL) } cout << "Dependencies: " << endl; - for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; Cur++) + for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; ++Cur) { cout << Cur.VerStr() << " - "; - for (pkgCache::DepIterator Dep = Cur.DependsList(); Dep.end() != true; Dep++) + for (pkgCache::DepIterator Dep = Cur.DependsList(); Dep.end() != true; ++Dep) cout << Dep.TargetPkg().FullName(true) << " (" << (int)Dep->CompareOp << " " << DeNull(Dep.TargetVer()) << ") "; cout << endl; } cout << "Provides: " << endl; - for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; Cur++) + for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; ++Cur) { cout << Cur.VerStr() << " - "; - for (pkgCache::PrvIterator Prv = Cur.ProvidesList(); Prv.end() != true; Prv++) + for (pkgCache::PrvIterator Prv = Cur.ProvidesList(); Prv.end() != true; ++Prv) cout << Prv.ParentPkg().FullName(true) << " "; cout << endl; } cout << "Reverse Provides: " << endl; - for (pkgCache::PrvIterator Prv = Pkg.ProvidesList(); Prv.end() != true; Prv++) + for (pkgCache::PrvIterator Prv = Pkg.ProvidesList(); Prv.end() != true; ++Prv) cout << Prv.OwnerPkg().FullName(true) << " " << Prv.OwnerVer().VerStr() << endl; } @@ -290,7 +294,7 @@ bool Stats(CommandLine &Cmd) int DVirt = 0; int Missing = 0; pkgCache::PkgIterator I = Cache->PkgBegin(); - for (;I.end() != true; I++) + for (;I.end() != true; ++I) { if (I->VersionList != 0 && I->ProvidesList == 0) { @@ -353,11 +357,11 @@ bool Stats(CommandLine &Cmd) cout << _("Total globbed strings: ") << Count << " (" << SizeToStr(Size) << ')' << endl; unsigned long DepVerSize = 0; - for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; P++) + for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; ++P) { - for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; V++) + for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; ++V) { - for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; ++D) { if (D->Version != 0) DepVerSize += strlen(D.TargetVer()) + 1; @@ -394,17 +398,17 @@ bool Dump(CommandLine &Cmd) cout << "Using Versioning System: " << Cache->VS->Label << endl; - for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; P++) + for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; ++P) { cout << "Package: " << P.FullName(true) << endl; - for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; V++) + for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; ++V) { cout << " Version: " << V.VerStr() << endl; cout << " File: " << V.FileList().File().FileName() << endl; - for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; ++D) cout << " Depends: " << D.TargetPkg().FullName(true) << ' ' << DeNull(D.TargetVer()) << endl; - for (pkgCache::DescIterator D = V.DescriptionList(); D.end() == false; D++) + for (pkgCache::DescIterator D = V.DescriptionList(); D.end() == false; ++D) { cout << " Description Language: " << D.LanguageCode() << endl << " File: " << D.FileList().File().FileName() << endl @@ -413,7 +417,7 @@ bool Dump(CommandLine &Cmd) } } - for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F.end() == false; F++) + for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F.end() == false; ++F) { cout << "File: " << F.FileName() << endl; cout << " Type: " << F.IndexType() << endl; @@ -449,7 +453,7 @@ bool DumpAvail(CommandLine &Cmd) memset(VFList,0,sizeof(*VFList)*Count); // Map versions that we want to write out onto the VerList array. - for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; P++) + for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; ++P) { if (P->VersionList == 0) continue; @@ -466,7 +470,7 @@ bool DumpAvail(CommandLine &Cmd) } pkgCache::VerFileIterator VF = V.FileList(); - for (; VF.end() == false ; VF++) + for (; VF.end() == false ; ++VF) if ((VF.File()->Flags & pkgCache::Flag::NotSource) == 0) break; @@ -480,9 +484,9 @@ bool DumpAvail(CommandLine &Cmd) handling works OK. */ if (VF.end() == true) { - for (pkgCache::VerIterator Cur = P.VersionList(); Cur.end() != true; Cur++) + for (pkgCache::VerIterator Cur = P.VersionList(); Cur.end() != true; ++Cur) { - for (VF = Cur.FileList(); VF.end() == false; VF++) + for (VF = Cur.FileList(); VF.end() == false; ++VF) { if ((VF.File()->Flags & pkgCache::Flag::NotSource) == 0) { @@ -615,7 +619,7 @@ bool ShowDepends(CommandLine &CmdL, bool const RevDepends) if (RevDepends == true) cout << "Reverse Depends:" << endl; for (pkgCache::DepIterator D = RevDepends ? Pkg.RevDependsList() : Ver.DependsList(); - D.end() == false; D++) + D.end() == false; ++D) { switch (D->Type) { case pkgCache::Dep::PreDepends: if (!ShowPreDepends) continue; break; @@ -741,7 +745,7 @@ bool XVcg(CommandLine &CmdL) memset(Flags,0,sizeof(*Flags)*Cache->Head().PackageCount); // Map the shapes - for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++) + for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg) { if (Pkg->VersionList == 0) { @@ -788,7 +792,7 @@ bool XVcg(CommandLine &CmdL) while (Act == true) { Act = false; - for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++) + for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg) { // See we need to show this package if (Show[Pkg->ID] == None || Show[Pkg->ID] >= DoneNR) @@ -814,14 +818,14 @@ bool XVcg(CommandLine &CmdL) continue; pkgCache::VerIterator Ver = Pkg.VersionList(); - for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; ++D) { // See if anything can meet this dep // Walk along the actual package providing versions bool Hit = false; pkgCache::PkgIterator DPkg = D.TargetPkg(); for (pkgCache::VerIterator I = DPkg.VersionList(); - I.end() == false && Hit == false; I++) + I.end() == false && Hit == false; ++I) { if (Cache->VS->CheckDep(I.VerStr(),D->CompareOp,D.TargetVer()) == true) Hit = true; @@ -829,7 +833,7 @@ bool XVcg(CommandLine &CmdL) // Follow all provides for (pkgCache::PrvIterator I = DPkg.ProvidesList(); - I.end() == false && Hit == false; I++) + I.end() == false && Hit == false; ++I) { if (Cache->VS->CheckDep(I.ProvideVersion(),D->CompareOp,D.TargetVer()) == false) Hit = true; @@ -889,7 +893,7 @@ bool XVcg(CommandLine &CmdL) /* Draw the box colours after the fact since we can not tell what colour they should be until everything is finished drawing */ - for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++) + for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg) { if (Show[Pkg->ID] < DoneNR) continue; @@ -953,7 +957,7 @@ bool Dotty(CommandLine &CmdL) memset(Flags,0,sizeof(*Flags)*Cache->Head().PackageCount); // Map the shapes - for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++) + for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg) { if (Pkg->VersionList == 0) { @@ -1000,7 +1004,7 @@ bool Dotty(CommandLine &CmdL) while (Act == true) { Act = false; - for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++) + for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg) { // See we need to show this package if (Show[Pkg->ID] == None || Show[Pkg->ID] >= DoneNR) @@ -1024,14 +1028,14 @@ bool Dotty(CommandLine &CmdL) continue; pkgCache::VerIterator Ver = Pkg.VersionList(); - for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; ++D) { // See if anything can meet this dep // Walk along the actual package providing versions bool Hit = false; pkgCache::PkgIterator DPkg = D.TargetPkg(); for (pkgCache::VerIterator I = DPkg.VersionList(); - I.end() == false && Hit == false; I++) + I.end() == false && Hit == false; ++I) { if (Cache->VS->CheckDep(I.VerStr(),D->CompareOp,D.TargetVer()) == true) Hit = true; @@ -1039,7 +1043,7 @@ bool Dotty(CommandLine &CmdL) // Follow all provides for (pkgCache::PrvIterator I = DPkg.ProvidesList(); - I.end() == false && Hit == false; I++) + I.end() == false && Hit == false; ++I) { if (Cache->VS->CheckDep(I.ProvideVersion(),D->CompareOp,D.TargetVer()) == false) Hit = true; @@ -1094,7 +1098,7 @@ bool Dotty(CommandLine &CmdL) /* Draw the box colours after the fact since we can not tell what colour they should be until everything is finished drawing */ - for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++) + for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg) { if (Show[Pkg->ID] < DoneNR) continue; @@ -1127,7 +1131,7 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V) // Find an appropriate file pkgCache::VerFileIterator Vf = V.FileList(); - for (; Vf.end() == false; Vf++) + for (; Vf.end() == false; ++Vf) if ((Vf.File()->Flags & pkgCache::Flag::NotSource) == 0) break; if (Vf.end() == true) @@ -1272,7 +1276,7 @@ bool Search(CommandLine &CmdL) continue; // Include all the packages that provide matching names too - for (pkgCache::PrvIterator Prv = P.ProvidesList() ; Prv.end() == false; Prv++) + for (pkgCache::PrvIterator Prv = P.ProvidesList() ; Prv.end() == false; ++Prv) { pkgCache::VerIterator V = Plcy->GetCandidateVer(Prv.OwnerPkg()); if (V.end() == true) @@ -1341,13 +1345,13 @@ bool ShowAuto(CommandLine &CmdL) std::vector<string> packages; packages.reserve(Cache->HeaderP->PackageCount / 3); - for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; P++) + for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; ++P) if ((*DepCache)[P].Flags & pkgCache::Flag::Auto) packages.push_back(P.Name()); std::sort(packages.begin(), packages.end()); - for (vector<string>::iterator I = packages.begin(); I != packages.end(); I++) + for (vector<string>::iterator I = packages.begin(); I != packages.end(); ++I) cout << *I << "\n"; _error->Notice(_("This command is deprecated. Please use 'apt-mark showauto' instead.")); @@ -1391,7 +1395,7 @@ bool ShowPkgNames(CommandLine &CmdL) if (CmdL.FileList[1] != 0) { - for (;I.end() != true; I++) + for (;I.end() != true; ++I) { if (All == false && I->FirstPackage == 0) continue; @@ -1405,7 +1409,7 @@ bool ShowPkgNames(CommandLine &CmdL) } // Show all pkgs - for (;I.end() != true; I++) + for (;I.end() != true; ++I) { if (All == false && I->FirstPackage == 0) continue; @@ -1476,7 +1480,7 @@ bool Policy(CommandLine &CmdL) if (CmdL.FileList[1] == 0) { cout << _("Package files:") << endl; - for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F.end() == false; F++) + for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F.end() == false; ++F) { // Locate the associated index files so we can derive a description pkgIndexFile *Indx; @@ -1498,7 +1502,7 @@ bool Policy(CommandLine &CmdL) // Show any packages have explicit pins cout << _("Pinned packages:") << endl; pkgCache::PkgIterator I = Cache->PkgBegin(); - for (;I.end() != true; I++) + for (;I.end() != true; ++I) { if (Plcy->GetPriority(I) == 0) continue; @@ -1560,14 +1564,14 @@ bool Policy(CommandLine &CmdL) // Show the priority tables cout << _(" Version table:") << endl; - for (V = Pkg.VersionList(); V.end() == false; V++) + for (V = Pkg.VersionList(); V.end() == false; ++V) { if (Pkg.CurrentVer() == V) cout << " *** " << V.VerStr(); else cout << " " << V.VerStr(); cout << " " << Plcy->GetPriority(Pkg) << endl; - for (pkgCache::VerFileIterator VF = V.FileList(); VF.end() == false; VF++) + for (pkgCache::VerFileIterator VF = V.FileList(); VF.end() == false; ++VF) { // Locate the associated index files so we can derive a description pkgIndexFile *Indx; @@ -1607,9 +1611,9 @@ bool Madison(CommandLine &CmdL) APT::PackageSet pkgset = APT::PackageSet::FromString(CacheFile, *I, helper); for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg) { - for (pkgCache::VerIterator V = Pkg.VersionList(); V.end() == false; V++) + for (pkgCache::VerIterator V = Pkg.VersionList(); V.end() == false; ++V) { - for (pkgCache::VerFileIterator VF = V.FileList(); VF.end() == false; VF++) + for (pkgCache::VerFileIterator VF = V.FileList(); VF.end() == false; ++VF) { // This might be nice, but wouldn't uniquely identify the source -mdz // if (VF.File().Archive() != 0) @@ -1619,11 +1623,11 @@ bool Madison(CommandLine &CmdL) // } // Locate the associated index files so we can derive a description - for (pkgSourceList::const_iterator S = SrcList->begin(); S != SrcList->end(); S++) + for (pkgSourceList::const_iterator S = SrcList->begin(); S != SrcList->end(); ++S) { vector<pkgIndexFile *> *Indexes = (*S)->GetIndexFiles(); for (vector<pkgIndexFile *>::const_iterator IF = Indexes->begin(); - IF != Indexes->end(); IF++) + IF != Indexes->end(); ++IF) { if ((*IF)->FindInCache(*(VF.File().Cache())) == VF.File()) { diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index d1268edf9..fa48debcd 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -11,6 +11,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/cmndline.h> #include <apt-pkg/error.h> #include <apt-pkg/init.h> @@ -21,10 +23,8 @@ #include <apt-pkg/acquire.h> #include <apt-pkg/acquire-item.h> #include <apt-pkg/cdrom.h> -#include <config.h> -#include <apti18n.h> - -//#include "indexcopy.h" +#include <apt-pkg/configuration.h> +#include <apt-pkg/pkgsystem.h> #include <locale.h> #include <iostream> @@ -36,6 +36,8 @@ #include <dirent.h> #include <unistd.h> #include <stdio.h> + +#include <apti18n.h> /*}}}*/ using namespace std; diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 589ee7ada..94f6ee9b0 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -16,20 +16,22 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/cmndline.h> #include <apt-pkg/error.h> #include <apt-pkg/init.h> #include <apt-pkg/strutl.h> #include <apt-pkg/configuration.h> #include <apt-pkg/aptconfiguration.h> - -#include <config.h> -#include <apti18n.h> +#include <apt-pkg/pkgsystem.h> #include <locale.h> #include <iostream> #include <string> #include <vector> + +#include <apti18n.h> /*}}}*/ using namespace std; diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc index dab0cc6fd..e82e15c6e 100644 --- a/cmdline/apt-dump-solver.cc +++ b/cmdline/apt-dump-solver.cc @@ -12,6 +12,7 @@ #include <config.h> #include <cstdio> +#include <iostream> /*}}}*/ // ShowHelp - Show a help screen /*{{{*/ diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index 07bc0c25d..d5c1a3208 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -13,6 +13,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include<config.h> + #include <apt-pkg/init.h> #include <apt-pkg/cmndline.h> #include <apt-pkg/pkgcache.h> @@ -28,7 +30,8 @@ #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> #include <apt-pkg/fileutl.h> - +#include <apt-pkg/pkgsystem.h> + #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -36,7 +39,6 @@ #include <fstream> #include <locale.h> -#include <config.h> #include <apti18n.h> #include "apt-extracttemplates.h" /*}}}*/ diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index a81e829e8..1925dea87 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -25,8 +25,7 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE +#include <config.h> #include <apt-pkg/aptconfiguration.h> #include <apt-pkg/error.h> @@ -37,6 +36,7 @@ #include <apt-pkg/algorithms.h> #include <apt-pkg/acquire-item.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> #include <apt-pkg/clean.h> #include <apt-pkg/srcrecords.h> #include <apt-pkg/version.h> @@ -45,9 +45,10 @@ #include <apt-pkg/sptr.h> #include <apt-pkg/md5.h> #include <apt-pkg/versionmatch.h> - -#include <config.h> -#include <apti18n.h> +#include <apt-pkg/progress.h> +#include <apt-pkg/pkgsystem.h> +#include <apt-pkg/pkgrecords.h> +#include <apt-pkg/indexfile.h> #include "acqprogress.h" @@ -68,8 +69,7 @@ #include <sys/wait.h> #include <sstream> -#define statfs statfs64 -#define statvfs statvfs64 +#include <apti18n.h> /*}}}*/ #define RAMFS_MAGIC 0x858458f6 @@ -368,7 +368,7 @@ void ShowBroken(ostream &out,CacheFile &Cache,bool Now) if (Start == End) break; - Start++; + ++Start; } } } @@ -542,7 +542,7 @@ bool ShowEssential(ostream &out,CacheFile &Cache) continue; // Print out any essential package depenendents that are to be removed - for (pkgCache::DepIterator D = I.CurrentVer().DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = I.CurrentVer().DependsList(); D.end() == false; ++D) { // Skip everything but depends if (D->Type != pkgCache::Dep::PreDepends && @@ -579,7 +579,7 @@ void Stats(ostream &out,pkgDepCache &Dep) unsigned long Downgrade = 0; unsigned long Install = 0; unsigned long ReInstall = 0; - for (pkgCache::PkgIterator I = Dep.PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Dep.PkgBegin(); I.end() == false; ++I) { if (Dep[I].NewInstall() == true) Install++; @@ -662,22 +662,22 @@ public: pkgCache::PkgIterator Pkg = I.OwnerPkg(); if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer()) { - out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr(); + c1out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr(); if (Cache[Pkg].Install() == true && Cache[Pkg].NewInstall() == false) - out << _(" [Installed]"); - out << endl; + c1out << _(" [Installed]"); + c1out << endl; ++provider; } } // if we found no candidate which provide this package, show non-candidates if (provider == 0) - for (I = Pkg.ProvidesList(); I.end() == false; I++) - out << " " << I.OwnerPkg().FullName(true) << " " << I.OwnerVer().VerStr() + for (I = Pkg.ProvidesList(); I.end() == false; ++I) + c1out << " " << I.OwnerPkg().FullName(true) << " " << I.OwnerVer().VerStr() << _(" [Not candidate version]") << endl; else out << _("You should explicitly select one to install.") << endl; } else { - ioprintf(out, + ioprintf(c1out, _("Package %s is not available, but is referred to by another package.\n" "This may mean that the package is missing, has been obsoleted, or\n" "is only available from another source\n"),Pkg.FullName(true).c_str()); @@ -687,7 +687,7 @@ public: SPtrArray<bool> Seen = new bool[Cache.GetPkgCache()->Head().PackageCount]; memset(Seen,0,Cache.GetPkgCache()->Head().PackageCount*sizeof(*Seen)); for (pkgCache::DepIterator Dep = Pkg.RevDependsList(); - Dep.end() == false; Dep++) { + Dep.end() == false; ++Dep) { if (Dep->Type != pkgCache::Dep::Replaces) continue; if (Seen[Dep.ParentPkg()->ID] == true) @@ -696,9 +696,9 @@ public: List += Dep.ParentPkg().FullName(true) + " "; //VersionsList += string(Dep.ParentPkg().CurVersion) + "\n"; ??? } - ShowList(out,_("However the following packages replace it:"),List,VersionsList); + ShowList(c1out,_("However the following packages replace it:"),List,VersionsList); } - out << std::endl; + c1out << std::endl; } return false; } @@ -874,9 +874,7 @@ struct TryToInstall { struct TryToRemove { pkgCacheFile* Cache; pkgProblemResolver* Fix; - bool FixBroken; bool PurgePkgs; - unsigned long AutoMarkChanged; TryToRemove(pkgCacheFile &Cache, pkgProblemResolver *PM) : Cache(&Cache), Fix(PM), PurgePkgs(_config->FindB("APT::Get::Purge", false)) {}; @@ -928,7 +926,7 @@ void CacheFile::Sort() List = new pkgCache::Package *[Cache->Head().PackageCount]; memset(List,0,sizeof(*List)*Cache->Head().PackageCount); pkgCache::PkgIterator I = Cache->PkgBegin(); - for (;I.end() != true; I++) + for (;I.end() != true; ++I) List[I->ID] = I; SortCache = *this; @@ -960,7 +958,7 @@ bool CacheFile::CheckDeps(bool AllowBroken) if ((DCache->PolicyBrokenCount() > 0)) { // upgrade all policy-broken packages with ForceImportantDeps=True - for (pkgCache::PkgIterator I = Cache->PkgBegin(); !I.end(); I++) + for (pkgCache::PkgIterator I = Cache->PkgBegin(); !I.end(); ++I) if ((*DCache)[I].NowPolicyBroken() == true) DCache->MarkInstall(I,true,0, false, true); } @@ -1051,7 +1049,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, if (_config->FindB("APT::Get::Purge",false) == true) { pkgCache::PkgIterator I = Cache->PkgBegin(); - for (; I.end() == false; I++) + for (; I.end() == false; ++I) { if (I.Purge() == false && Cache[I].Mode == pkgDepCache::ModeDelete) Cache->MarkDelete(I,true); @@ -1245,7 +1243,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, if (_config->FindB("APT::Get::Print-URIs") == true) { pkgAcquire::UriIterator I = Fetcher.UriBegin(); - for (; I != Fetcher.UriEnd(); I++) + for (; I != Fetcher.UriEnd(); ++I) cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; return true; @@ -1269,7 +1267,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, { if ((*I)->Local == true) { - I++; + ++I; continue; } @@ -1289,7 +1287,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, // Print out errors bool Failed = false; - for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) + for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); ++I) { if ((*I)->Status == pkgAcquire::Item::StatDone && (*I)->Complete == true) @@ -1449,7 +1447,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, // we have a default release, try to locate the pkg. we do it like // this because GetCandidateVer() will not "downgrade", that means // "apt-get source -t stable apt" won't work on a unstable system - for (pkgCache::VerIterator Ver = Pkg.VersionList();; Ver++) + for (pkgCache::VerIterator Ver = Pkg.VersionList();; ++Ver) { // try first only exact matches, later fuzzy matches if (Ver.end() == true) @@ -1470,7 +1468,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, continue; for (pkgCache::VerFileIterator VF = Ver.FileList(); - VF.end() == false; VF++) + VF.end() == false; ++VF) { /* If this is the status file, and the current version is not the version in the status file (ie it is not installed, or somesuch) @@ -1622,7 +1620,7 @@ bool DoUpdate(CommandLine &CmdL) return false; pkgAcquire::UriIterator I = Fetcher.UriBegin(); - for (; I != Fetcher.UriEnd(); I++) + for (; I != Fetcher.UriEnd(); ++I) cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; return true; @@ -1632,7 +1630,8 @@ bool DoUpdate(CommandLine &CmdL) if (_config->FindB("APT::Get::Download",true) == true) ListUpdate(Stat, *List); - // Rebuild the cache. + // Rebuild the cache. + pkgCacheFile::RemoveCaches(); if (Cache.BuildCaches() == false) return false; @@ -1690,8 +1689,9 @@ bool DoAutomaticRemove(CacheFile &Cache) // install it in the first place, so nuke it instead of show it if (Cache[Pkg].Install() == true && Pkg.CurrentVer() == 0) { + if (Pkg.CandVersion() != 0) + tooMuch.insert(Pkg); Cache->MarkDelete(Pkg, false); - tooMuch.insert(Pkg); } // only show stuff in the list that is not yet marked for removal else if(hideAutoRemove == false && Cache[Pkg].Delete() == false) @@ -1715,33 +1715,41 @@ bool DoAutomaticRemove(CacheFile &Cache) bool Changed; do { Changed = false; - for (APT::PackageSet::const_iterator P = tooMuch.begin(); - P != tooMuch.end() && Changed == false; ++P) + for (APT::PackageSet::const_iterator Pkg = tooMuch.begin(); + Pkg != tooMuch.end() && Changed == false; ++Pkg) { - for (pkgCache::DepIterator R = P.RevDependsList(); - R.end() == false; ++R) - { - if (R.IsNegative() == true || - Cache->IsImportantDep(R) == false) - continue; - pkgCache::PkgIterator N = R.ParentPkg(); - if (N.end() == true || (N->CurrentVer == 0 && (*Cache)[N].Install() == false)) - continue; - if (Debug == true) - std::clog << "Save " << P << " as another installed garbage package depends on it" << std::endl; - Cache->MarkInstall(P, false); - if(hideAutoRemove == false) + APT::PackageSet too; + too.insert(Pkg); + for (pkgCache::PrvIterator Prv = Cache[Pkg].CandidateVerIter(Cache).ProvidesList(); + Prv.end() == false; ++Prv) + too.insert(Prv.ParentPkg()); + for (APT::PackageSet::const_iterator P = too.begin(); + P != too.end() && Changed == false; ++P) { + for (pkgCache::DepIterator R = P.RevDependsList(); + R.end() == false; ++R) { - ++autoRemoveCount; - if (smallList == false) - { - autoremovelist += P.FullName(true) + " "; - autoremoveversions += string(Cache[P].CandVersion) + "\n"; - } + if (R.IsNegative() == true || + Cache->IsImportantDep(R) == false) + continue; + pkgCache::PkgIterator N = R.ParentPkg(); + if (N.end() == true || (N->CurrentVer == 0 && (*Cache)[N].Install() == false)) + continue; + if (Debug == true) + std::clog << "Save " << Pkg << " as another installed garbage package depends on it" << std::endl; + Cache->MarkInstall(Pkg, false); + if (hideAutoRemove == false) + { + ++autoRemoveCount; + if (smallList == false) + { + autoremovelist += Pkg.FullName(true) + " "; + autoremoveversions += string(Cache[Pkg].CandVersion) + "\n"; + } + } + tooMuch.erase(Pkg); + Changed = true; + break; } - tooMuch.erase(P); - Changed = true; - break; } } } while (Changed == true); @@ -2007,7 +2015,7 @@ bool DoInstall(CommandLine &CmdL) if(Start.TargetPkg().ProvidesList() != 0) { pkgCache::PrvIterator I = Start.TargetPkg().ProvidesList(); - for (; I.end() == false; I++) + for (; I.end() == false; ++I) { pkgCache::PkgIterator Pkg = I.OwnerPkg(); if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer() && @@ -2030,7 +2038,7 @@ bool DoInstall(CommandLine &CmdL) if (Start >= End) break; - Start++; + ++Start; } if(foundInstalledInOrGroup == false) @@ -2144,7 +2152,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL) // Install everything with the install flag set pkgCache::PkgIterator I = Cache->PkgBegin(); - for (;I.end() != true; I++) + for (;I.end() != true; ++I) { /* Install the package only if it is a new install, the autoupgrader will deal with the rest */ @@ -2154,7 +2162,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL) /* Now install their deps too, if we do this above then order of the status file is significant for | groups */ - for (I = Cache->PkgBegin();I.end() != true; I++) + for (I = Cache->PkgBegin();I.end() != true; ++I) { /* Install the package only if it is a new install, the autoupgrader will deal with the rest */ @@ -2163,7 +2171,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL) } // Apply erasures now, they override everything else. - for (I = Cache->PkgBegin();I.end() != true; I++) + for (I = Cache->PkgBegin();I.end() != true; ++I) { // Remove packages if (I->SelectedState == pkgCache::State::DeInstall || @@ -2180,7 +2188,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL) // Hold back held packages. if (_config->FindB("APT::Ignore-Hold",false) == false) { - for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() == false; I++) + for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() == false; ++I) { if (I->SelectedState == pkgCache::State::Hold) { @@ -2212,10 +2220,14 @@ bool DoDSelectUpgrade(CommandLine &CmdL) /* */ bool DoClean(CommandLine &CmdL) { + std::string const archivedir = _config->FindDir("Dir::Cache::archives"); + std::string const pkgcache = _config->FindFile("Dir::cache::pkgcache"); + std::string const srcpkgcache = _config->FindFile("Dir::cache::srcpkgcache"); + if (_config->FindB("APT::Get::Simulate") == true) { - cout << "Del " << _config->FindDir("Dir::Cache::archives") << "* " << - _config->FindDir("Dir::Cache::archives") << "partial/*" << endl; + cout << "Del " << archivedir << "* " << archivedir << "partial/*"<< endl + << "Del " << pkgcache << " " << srcpkgcache << endl; return true; } @@ -2223,14 +2235,17 @@ bool DoClean(CommandLine &CmdL) FileFd Lock; if (_config->FindB("Debug::NoLocking",false) == false) { - Lock.Fd(GetLock(_config->FindDir("Dir::Cache::Archives") + "lock")); + Lock.Fd(GetLock(archivedir + "lock")); if (_error->PendingError() == true) return _error->Error(_("Unable to lock the download directory")); } pkgAcquire Fetcher; - Fetcher.Clean(_config->FindDir("Dir::Cache::archives")); - Fetcher.Clean(_config->FindDir("Dir::Cache::archives") + "partial/"); + Fetcher.Clean(archivedir); + Fetcher.Clean(archivedir + "partial/"); + + pkgCacheFile::RemoveCaches(); + return true; } /*}}}*/ @@ -2328,7 +2343,7 @@ bool DoDownload(CommandLine &CmdL) if (_config->FindB("APT::Get::Print-URIs") == true) { pkgAcquire::UriIterator I = Fetcher.UriBegin(); - for (; I != Fetcher.UriEnd(); I++) + for (; I != Fetcher.UriEnd(); ++I) cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; return true; @@ -2446,7 +2461,7 @@ bool DoSource(CommandLine &CmdL) // Load them into the fetcher for (vector<pkgSrcRecords::File>::const_iterator I = Lst.begin(); - I != Lst.end(); I++) + I != Lst.end(); ++I) { // Try to guess what sort of file it is we are getting. if (I->Type == "dsc") @@ -2548,7 +2563,7 @@ bool DoSource(CommandLine &CmdL) if (_config->FindB("APT::Get::Print-URIs") == true) { pkgAcquire::UriIterator I = Fetcher.UriBegin(); - for (; I != Fetcher.UriEnd(); I++) + for (; I != Fetcher.UriEnd(); ++I) cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; delete[] Dsc; @@ -2564,7 +2579,7 @@ bool DoSource(CommandLine &CmdL) // Print error messages bool Failed = false; - for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) + for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); ++I) { if ((*I)->Status == pkgAcquire::Item::StatDone && (*I)->Complete == true) @@ -2593,7 +2608,7 @@ bool DoSource(CommandLine &CmdL) if (Process == 0) { bool const fixBroken = _config->FindB("APT::Get::Fix-Broken", false); - for (unsigned I = 0; I != J; I++) + for (unsigned I = 0; I != J; ++I) { string Dir = Dsc[I].Package + '-' + Cache->VS().UpstreamVersion(Dsc[I].Version.c_str()); @@ -2742,7 +2757,7 @@ bool DoBuildDep(CommandLine &CmdL) BuildDeps.push_back(rec); } - if (BuildDeps.size() == 0) + if (BuildDeps.empty() == true) { ioprintf(c1out,_("%s has no build depends.\n"),Src.c_str()); continue; @@ -2752,7 +2767,7 @@ bool DoBuildDep(CommandLine &CmdL) vector <pkgSrcRecords::Parser::BuildDepRec>::iterator D; pkgProblemResolver Fix(Cache); bool skipAlternatives = false; // skip remaining alternatives in an or group - for (D = BuildDeps.begin(); D != BuildDeps.end(); D++) + for (D = BuildDeps.begin(); D != BuildDeps.end(); ++D) { bool hasAlternatives = (((*D).Op & pkgCache::Dep::Or) == pkgCache::Dep::Or); @@ -2931,7 +2946,7 @@ bool DoBuildDep(CommandLine &CmdL) * installed */ pkgCache::PrvIterator Prv = Pkg.ProvidesList(); - for (; Prv.end() != true; Prv++) + for (; Prv.end() != true; ++Prv) { if (_config->FindB("Debug::BuildDeps",false) == true) cout << " Checking provider " << Prv.OwnerPkg().FullName() << endl; diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc index ef6c688fe..1b636e4d5 100644 --- a/cmdline/apt-internal-solver.cc +++ b/cmdline/apt-internal-solver.cc @@ -11,10 +11,12 @@ #include <apt-pkg/cmndline.h> #include <apt-pkg/init.h> #include <apt-pkg/cachefile.h> +#include <apt-pkg/cacheset.h> #include <apt-pkg/strutl.h> #include <apt-pkg/edsp.h> #include <apt-pkg/algorithms.h> #include <apt-pkg/fileutl.h> +#include <apt-pkg/pkgsystem.h> #include <config.h> #include <apti18n.h> diff --git a/cmdline/apt-key b/cmdline/apt-key index e632be706..97d6e0323 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -152,7 +152,7 @@ if [ "$1" = "--keyring" ]; then #echo "keyfile given" shift TRUSTEDFILE="$1" - if [ -r "$TRUSTEDFILE" ]; then + if [ -r "$TRUSTEDFILE" ] || [ "$2" = 'add' ]; then GPG="$GPG --keyring $TRUSTEDFILE --primary-keyring $TRUSTEDFILE" else echo >&2 "Error: The specified keyring »$TRUSTEDFILE« is missing or not readable" diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc index b2c664979..339cbdf44 100644 --- a/cmdline/apt-mark.cc +++ b/cmdline/apt-mark.cc @@ -5,17 +5,19 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/cachefile.h> #include <apt-pkg/cacheset.h> #include <apt-pkg/cmndline.h> #include <apt-pkg/error.h> #include <apt-pkg/init.h> #include <apt-pkg/strutl.h> - -#include <config.h> -#include <apti18n.h> +#include <apt-pkg/pkgsystem.h> #include <algorithm> + +#include <apti18n.h> /*}}}*/ using namespace std; diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 171b0ba13..20ae14f2a 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -12,21 +12,24 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/tagfile.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> #include <apt-pkg/cmndline.h> #include <apt-pkg/init.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> +#include <apt-pkg/pkgsystem.h> -#include <config.h> -#include <apti18n.h> - #include <vector> #include <algorithm> #include <locale.h> #include <unistd.h> + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -106,7 +109,7 @@ bool DoIt(string InFile) // Emit unsigned char *Buffer = new unsigned char[Largest+1]; - for (vector<PkgName>::iterator I = List.begin(); I != List.end(); I++) + for (vector<PkgName>::iterator I = List.begin(); I != List.end(); ++I) { // Read in the Record. if (Fd.Seek(I->Offset) == false || Fd.Read(Buffer,I->Length) == false) diff --git a/configure.in b/configure.in index 89c4b240c..c2602cf36 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.8.16~exp5") +AC_DEFINE_UNQUOTED(VERSION,"0.8.16~exp6") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) @@ -31,6 +31,10 @@ AC_CHECK_TOOL_PREFIX AC_PROG_CC AC_ISC_POSIX +dnl check for large file support and enable it if possible +dnl do this early as other stuff might depend on it +AC_SYS_LARGEFILE + dnl Check for other programs AC_PROG_CXX AC_PROG_CPP @@ -151,7 +155,7 @@ if test "$cross_compiling" = "yes" -a "x$archline" = "x"; then AC_MSG_ERROR(When cross compiling, architecture must be present in sizetable) fi AC_C_BIGENDIAN - + dnl We do not need this if we have inttypes! HAVE_C9X=yes if test x"$apt_cv_c9x_ints" = x"no"; then diff --git a/debian/changelog b/debian/changelog index 4ca81c329..df50eefbd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,87 @@ -apt (0.8.16~exp5) experimental; urgency=low +apt (0.8.16~exp8) experimental; urgency=low + + [ David Kalnischkies ] + * apt-pkg/packagemanager.cc: + - do not fail on unpacked packages in SmartUnPack, just don't + shedule them for unpack, but do all checks and configure them + - do not enter an endless loop for (essential) pre-dependency loops + * apt-pkg/contrib/sha2_internal.cc: + - use a pointer-union to peace gcc strict-aliasing warning + * apt-pkg/deb/deblistparser.cc: + - M-A: foreign packages provide for other archs, too + + -- David Kalnischkies <kalnischkies@gmail.com> Thu, 03 Nov 2011 09:40:29 -0500 + +apt (0.8.16~exp7) experimental; urgency=low + + [ David Kalnischkies ] + * do not pollute namespace in the headers with using (Closes: #500198) + * use forward declaration in headers if possible instead of includes + * remove old APT_COMPATIBILITY ifdef's + * apt-pkg/deb/dpkgpm.cc: + - use std::vector instead of fixed size arrays to store args and + multiarch-packagename strings + - load the dpkg base arguments only one time and reuse them later + * cmdline/apt-get.cc: + - follow Provides in the evaluation of saving candidates, too, for + statisfying garbage package dependencies (Closes: #640590) + * apt-pkg/algorithms.cc: + - if a package is garbage, don't try to save it with FixByInstall + * apt-pkg/deb/debsrcrecords.cc: + - remove the limit of 400 Binaries for a source package (Closes: #622110) + * apt-pkg/deb/deblistparser.cc: + - fix crash when the dynamic mmap needs to be grown in + LoadReleaseInfo (LP: #854090) + * apt-pkg/deb/debmetaindex.cc: + - none is a separator, not a language: no need for Index (Closes: #624218) + * apt-pkg/aptconfiguration.cc: + - do not builtin languages only if none is forced (Closes: #643787) + * apt-pkg/pkgcachegen.cc: + - refactor MergeList by creating -Group, -Package and -Version specialist + - share description list between "same" versions (LP: #868977) + This also means that descriptions are shared across archives now. + - add implicit dependencies needed for Multi-Arch at the time a Version + struct is created and not at the end of the cache generation + * apt-pkg/pkgcache.cc: + - always prefer "en" over "" for "en"-language regardless of cache-order [ Michael Vogt ] + * apt-pkg/contrib/configuration.cc: + - fix double delete (LP: #848907) + - ignore only the invalid regexp instead of all options + * apt-pkg/acquire-item.h, apt-pkg/deb/debmetaindex.cc: + - fix fetching language information by adding OptionalSubIndexTarget + * methods/https.cc: + - cleanup broken downloads properly + + [ Colin Watson ] + * ftparchive/cachedb.cc: + - fix buffersize in bytes2hex + + -- Michael Vogt <mvo@debian.org> Fri, 14 Oct 2011 13:51:35 +0200 + +apt (0.8.16~exp6) experimental; urgency=low + + [ Christopher Baines ] + * enable APT in unpack/configure ordering to handle loops as well + as tight dependencies between immediate packages better + enabling also the possibility to mark all packages as immediate + (at least Closes: #353290, #540227, #559733, #621836, #639290) + + [ David Kalnischkies ] + * [abi-break] Support large files in the complete toolset. Indexes of this + size are pretty unlikely for now, but we need it for deb + packages which could become bigger than 4GB now (LP: #815895) + * merged the debian-sid branch + + [ Michael Vogt ] + * bump ABI version + + -- Michael Vogt <mvo@debian.org> Wed, 14 Sep 2011 21:06:51 +0200 + +apt (0.8.16~exp5) experimental; urgency=low + + * merged the latest debian-sid fixes * apt-pkg/makefile: - install sha256.h compat header * apt-pkg/pkgcachegen.{cc,h}: @@ -16,24 +97,8 @@ apt (0.8.16~exp5) experimental; urgency=low * methods/mirror.cc: - include the architecture(s) in the query string as well so that the server can make better decisions - * apt-pkg/contrib/configuration.cc: - - fix double delete (LP: #848907) - - ignore only the invalid regexp instead of all options - * apt-pkg/acquire-item.h, apt-pkg/deb/debmetaindex.cc: - - fix fetching language information by adding OptionalSubIndexTarget - * methods/https.cc: - - cleanup broken downloads properly - - [ Colin Watson ] - * ftparchive/cachedb.cc: - - fix buffersize in bytes2hex - [ David Kalnischkies ] - * apt-pkg/deb/deblistparser.cc: - - fix crash when the dynamic mmap needs to be grown in - LoadReleaseInfo (LP: #854090) - - -- Michael Vogt <mvo@debian.org> Fri, 05 Aug 2011 10:57:08 +0200 + -- Michael Vogt <mvo@debian.org> Mon, 15 Aug 2011 14:52:54 +0200 apt (0.8.16~exp4) experimental; urgency=low @@ -131,8 +196,114 @@ apt (0.8.16~exp1) experimental; urgency=low -- Michael Vogt <mvo@debian.org> Wed, 29 Jun 2011 12:40:31 +0200 -apt (0.8.15.5.6) UNRELEASED; urgency=low +apt (1.8.15.9+nmu1) unstable; urgency=low + + [ David Kalnischkies ] + * algorithms.cc: + - show a debug why a package was kept by ResolveByKeep() + + -- David Kalnischkies <kalnischkies@gmail.com> Mon, 17 Oct 2011 16:36:22 +0200 + +apt (0.8.15.9) unstable; urgency=low + + [ David Kalnischkies ] + * Symbol file update + * doc/apt-get.8.xml: + - change wording of autoremove description as suggested + by Robert Simmons, thanks! (Closes: #641490) + * apt-pkg/deb/dpkgpm.cc: + - use std::vector instead of fixed size arrays to store args and + multiarch-packagename strings + - load the dpkg base arguments only one time and reuse them later + * cmdline/apt-get.cc: + - follow Provides in the evaluation of saving candidates, too, for + statisfying garbage package dependencies (Closes: #640590) + * apt-pkg/algorithms.cc: + - if a package is garbage, don't try to save it with FixByInstall + * apt-pkg/init.cc: + - silently ignore *.orig and *.save files by default + * apt-pkg/policy.cc: + - accept generic release pin expressions again in -t (Closes: #644166) + * apt-pkg/deb/debmetaindex.cc: + - none is a separator, not a language: no need for Index (Closes: #624218) + * apt-pkg/aptconfiguration.cc: + - do not builtin languages only if none is forced (Closes: #643787) + * doc/apt.conf.5.xml: + - apply spelling fix by Kevin Lyda, thanks! (Closes: #644104) + + [ Christian Perrier ] + * Fix spelling error (sensée) in French translation. Thanks + to Corentin Le Gall for spotting it. + + [ Colin Watson ] + * ftparchive/cachedb.cc: + - fix buffersize in bytes2hex + + [ Michael Vogt ] + * ftparchive/cachedb.cc: + - make buffer fully dynamic (thanks to Colin Watson) + + -- Michael Vogt <mvo@debian.org> Fri, 14 Oct 2011 12:00:09 +0200 +apt (0.8.15.8) unstable; urgency=low + + [ David Kalnischkies ] + * cmdline/apt-get.cc: + - output list of virtual package providers to c1out in -q=1 + instead of /dev/null to unbreak sbuild (LP: #816155) + + [ Michael Vogt ] + * apt-pkg/contrib/configuration.cc: + - fix double delete (LP: #848907) + - ignore only the invalid regexp instead of all options + + -- Michael Vogt <mvo@debian.org> Wed, 14 Sep 2011 12:08:25 +0200 + +apt (0.8.15.7) unstable; urgency=low + + [ David Kalnischkies ] + * apt-pkg/packagemanager.cc, apt-pkg/pkgcache.cc: + - ignore "self"-conflicts for all architectures of a package + instead of just for the architecture of the package look at + in the ordering of installations, too (LP: #802901) + - M-A:same lockstep unpack should operate on installed + packages first (LP: #835625) + * test/* + - reorganize the various testcases and helper we have and + integrate them better into the buildsystem + - run the test/libapt testcases at package build-time + * debian/apt.symbols: + - add the newly added symbols since 0.8.15.3 + * cmdline/apt-get.cc: + - remove the binary caches in 'apt-get clean' as it is the first + thing recommend by many supporters in case of APT segfaults + - remove the caches in 'apt-get update', too, as they will be + invalid in most cases anyway + * apt-pkg/acquire-item.cc: + - if no Release.gpg file is found try to verify with hashes, + but do not fail if a hash can't be found + * apt-pkg/acquire.cc: + - non-existing directories are by definition clean + * cmdline/apt-key: + - if command is 'add' do not error out if the specified + keyring doesn't exist, it will be created by gpg + * apt-pkg/orderlist.cc: + - prefer visiting packages marked for deletion in VisitProvides + if we are operating on a negative dependency so that we can + deal early with the fallout of this remove + * apt-pkg/indexrecords.cc: + - fix Acquire::Max-ValidTime option by interpreting it really + as seconds as specified in the manpage and not as days + - add an Acquire::Min-ValidTime option (Closes: #640122) + * doc/apt.conf.5.xml: + - reword Acquire::Max-ValidTime documentation to make clear + that it doesn't provide the new Min-ValidTime functionality + + -- Michael Vogt <mvo@debian.org> Mon, 12 Sep 2011 16:38:46 +0200 + +apt (0.8.15.6) unstable; urgency=low + + [ Michael Vogt ] * apt-pkg/contrib/fileutl.{cc,h}: - add GetModificationTime() helper * apt-pkg/pkgcachegen.cc: @@ -150,8 +321,11 @@ apt (0.8.15.5.6) UNRELEASED; urgency=low * apt-pkg/acquire-item.cc: - if no Release.gpg file is found, still load the hashes for verification (closes: #636314) and add test + + [ David Kalnischkies ] + * lots of cppcheck fixes - -- Michael Vogt <mvo@debian.org> Tue, 12 Jul 2011 11:54:47 +0200 + -- Michael Vogt <mvo@debian.org> Mon, 15 Aug 2011 09:20:35 +0200 apt (0.8.15.5) unstable; urgency=low diff --git a/debian/control b/debian/control index d014dfdab..7efb6ca8a 100644 --- a/debian/control +++ b/debian/control @@ -35,7 +35,7 @@ Description: APT's commandline package manager * apt-config as an interface to the configuration settings * apt-key as an interface to manage authentication keys -Package: libapt-pkg4.11 +Package: libapt-pkg4.12 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: APT's package managment runtime library @@ -54,7 +54,7 @@ Description: APT's package managment runtime library http, rsh as well as an interface to add more transports like https (apt-transport-https) and debtorrent (apt-transport-debtorrent). -Package: libapt-inst1.3 +Package: libapt-inst1.4 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: APT's deb package format runtime library diff --git a/debian/libapt-inst1.3.install b/debian/libapt-inst1.4.install index b7b63be81..b7b63be81 100644 --- a/debian/libapt-inst1.3.install +++ b/debian/libapt-inst1.4.install diff --git a/debian/libapt-inst1.3.symbols b/debian/libapt-inst1.4.symbols index 1a46ba1a9..bba2cb653 100644 --- a/debian/libapt-inst1.3.symbols +++ b/debian/libapt-inst1.4.symbols @@ -1,4 +1,4 @@ -libapt-inst.so.1.3 libapt-inst1.3 #MINVER# +libapt-inst.so.1.4 libapt-inst1.4 #MINVER# * Build-Depends-Package: libapt-pkg-dev (c++)"ExtractTar::Done(bool)@Base" 0.8.0 (c++)"ExtractTar::Go(pkgDirStream&)@Base" 0.8.0 diff --git a/debian/libapt-pkg4.11.install b/debian/libapt-pkg4.12.install index 91b39a31b..91b39a31b 100644 --- a/debian/libapt-pkg4.11.install +++ b/debian/libapt-pkg4.12.install diff --git a/debian/libapt-pkg4.11.symbols b/debian/libapt-pkg4.12.symbols index ce598e7b3..8d2bc4a54 100644 --- a/debian/libapt-pkg4.11.symbols +++ b/debian/libapt-pkg4.12.symbols @@ -1,4 +1,4 @@ -libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# +libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER# * Build-Depends-Package: libapt-pkg-dev TFRewritePackageOrder@Base 0.8.0 TFRewriteSourceOrder@Base 0.8.0 @@ -60,7 +60,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"WaitFd(int, bool, unsigned long)@Base" 0.8.0 (c++)"GetLock(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@Base" 0.8.0 (c++)"Hex2Num(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*, unsigned int)@Base" 0.8.0 - (c++)"AddCRC16(unsigned short, void const*, unsigned long)@Base" 0.8.0 (c++)"CopyFile(FileFd&, FileFd&)@Base" 0.8.0 (c++)"ExecFork()@Base" 0.8.0 (c++)"ExecWait(int, char const*, bool)@Base" 0.8.0 @@ -97,25 +96,18 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"HashString::HashString()@Base" 0.8.0 (c++)"HashString::~HashString()@Base" 0.8.0 (c++)"OpProgress::CheckChange(float)@Base" 0.8.0 - (c++)"OpProgress::SubProgress(unsigned long)@Base" 0.8.0 - (c++)"OpProgress::SubProgress(unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0 - (c++)"OpProgress::OverallProgress(unsigned long, unsigned long, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0 (c++)"OpProgress::Done()@Base" 0.8.0 (c++)"OpProgress::Update()@Base" 0.8.0 - (c++)"OpProgress::Progress(unsigned long)@Base" 0.8.0 (c++)"OpProgress::OpProgress()@Base" 0.8.0 (c++)"OpProgress::~OpProgress()@Base" 0.8.0 (c++)"SourceCopy::GetFileName()@Base" 0.8.0 (c++)"SourceCopy::RewriteEntry(_IO_FILE*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 (c++)"SourceCopy::Type()@Base" 0.8.0 - (c++)"SourceCopy::GetFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long&)@Base" 0.8.0 (c++)"SourceCopy::~SourceCopy()@Base" 0.8.0 (c++)"pkgAcqFile::Custom600Headers()@Base" 0.8.0 - (c++)"pkgAcqFile::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqFile::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqFile::DescURI()@Base" 0.8.0 (c++)"pkgAcqFile::HashSum()@Base" 0.8.0 - (c++)"pkgAcqFile::pkgAcqFile(pkgAcquire*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@Base" 0.8.0 (c++)"pkgAcqFile::~pkgAcqFile()@Base" 0.8.0 (c++)"pkgAcquire::WorkerStep(pkgAcquire::Worker*)@Base" 0.8.0 (c++)"pkgAcquire::FetchNeeded()@Base" 0.8.0 @@ -128,8 +120,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgAcquire::Bump()@Base" 0.8.0 (c++)"pkgAcquire::Item::Custom600Headers()@Base" 0.8.0 (c++)"pkgAcquire::Item::ReportMirrorFailure(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 - (c++)"pkgAcquire::Item::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 - (c++)"pkgAcquire::Item::Start(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long)@Base" 0.8.0 (c++)"pkgAcquire::Item::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcquire::Item::Rename(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 (c++)"pkgAcquire::Item::HashSum()@Base" 0.8.0 @@ -199,10 +189,8 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgRecords::pkgRecords(pkgCache&)@Base" 0.8.0 (c++)"pkgRecords::~pkgRecords()@Base" 0.8.0 (c++)"pkgTagFile::Fill()@Base" 0.8.0 - (c++)"pkgTagFile::Jump(pkgTagSection&, unsigned long)@Base" 0.8.0 (c++)"pkgTagFile::Step(pkgTagSection&)@Base" 0.8.0 (c++)"pkgTagFile::Resize()@Base" 0.8.0 - (c++)"pkgTagFile::pkgTagFile(FileFd*, unsigned long)@Base" 0.8.0 (c++)"pkgTagFile::~pkgTagFile()@Base" 0.8.0 (c++)"CdromDevice::~CdromDevice()@Base" 0.8.0 (c++)"CommandLine::DispatchArg(CommandLine::Dispatch*, bool)@Base" 0.8.0 @@ -211,7 +199,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"CommandLine::HandleOpt(int&, int, char const**, char const*&, CommandLine::Args*, bool)@Base" 0.8.0 (c++)"CommandLine::CommandLine(CommandLine::Args*, Configuration*)@Base" 0.8.0 (c++)"CommandLine::~CommandLine()@Base" 0.8.0 - (c++)"DynamicMMap::RawAllocate(unsigned long, unsigned long)@Base" 0.8.0 (c++)"DynamicMMap::WriteString(char const*, unsigned long)@Base" 0.8.0 (c++)"DynamicMMap::Grow()@Base" 0.8.0 (c++)"DynamicMMap::Allocate(unsigned long)@Base" 0.8.0 @@ -237,16 +224,11 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"GlobalError::Warning(char const*, ...)@Base" 0.8.0 (c++)"GlobalError::WarningE(char const*, char const*, ...)@Base" 0.8.0 (c++)"GlobalError::GlobalError()@Base" 0.8.0 - (c++)"MD5SumValue::Set(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 - (c++)"MD5SumValue::MD5SumValue(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 - (c++)"MD5SumValue::MD5SumValue()@Base" 0.8.0 (c++)"PackageCopy::GetFileName()@Base" 0.8.0 (c++)"PackageCopy::RewriteEntry(_IO_FILE*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 (c++)"PackageCopy::Type()@Base" 0.8.0 - (c++)"PackageCopy::GetFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long&)@Base" 0.8.0 (c++)"PackageCopy::~PackageCopy()@Base" 0.8.0 (c++)"pkgAcqIndex::Custom600Headers()@Base" 0.8.0 - (c++)"pkgAcqIndex::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqIndex::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqIndex::DescURI()@Base" 0.8.0 (c++)"pkgAcqIndex::HashSum()@Base" 0.8.0 @@ -285,12 +267,9 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgDepCache::Update(pkgCache::DepIterator)@Base" 0.8.0 (c++)"pkgDepCache::Update(OpProgress*)@Base" 0.8.0 (c++)"pkgDepCache::Update(pkgCache::PkgIterator const&)@Base" 0.8.0 - (c++)"pkgDepCache::AddSizes(pkgCache::PkgIterator const&, bool const&)@Base" 0.8.0 - (c++)"pkgDepCache::AddSizes(pkgCache::PkgIterator const&, long)@Base" 0.8.0 (c++)"pkgDepCache::CheckDep(pkgCache::DepIterator, int, pkgCache::PkgIterator&)@Base" 0.8.0 (c++)"pkgDepCache::MarkAuto(pkgCache::PkgIterator const&, bool)@Base" 0.8.0 (c++)"pkgDepCache::MarkKeep(pkgCache::PkgIterator const&, bool, bool, unsigned long)@Base" 0.8.0 - (c++)"pkgDepCache::AddStates(pkgCache::PkgIterator const&, int)@Base" 0.8.0 (c++)"pkgDepCache::pkgDepCache(pkgCache*, pkgDepCache::Policy*)@Base" 0.8.0 (c++)"pkgDepCache::~pkgDepCache()@Base" 0.8.0 (c++)"pkgSimulate::ShortBreaks()@Base" 0.8.0 @@ -302,13 +281,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgSimulate::Configure(pkgCache::PkgIterator)@Base" 0.8.0 (c++)"pkgSimulate::pkgSimulate(pkgDepCache*)@Base" 0.8.0 (c++)"pkgSimulate::~pkgSimulate()@Base" 0.8.0 - (c++)"MD5Summation::Add(unsigned char const*, unsigned long)@Base" 0.8.0 - (c++)"MD5Summation::AddFD(int, unsigned long)@Base" 0.8.0 - (c++)"MD5Summation::Result()@Base" 0.8.0 - (c++)"MD5Summation::MD5Summation()@Base" 0.8.0 - (c++)"SHA1SumValue::Set(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 - (c++)"SHA1SumValue::SHA1SumValue(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 - (c++)"SHA1SumValue::SHA1SumValue()@Base" 0.8.0 (c++)"debIFTypePkg::~debIFTypePkg()@Base" 0.8.0 (c++)"debIFTypeSrc::~debIFTypeSrc()@Base" 0.8.0 (c++)"debSLTypeDeb::~debSLTypeDeb()@Base" 0.8.0 @@ -373,7 +345,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgOrderList::DepRemove(pkgCache::DepIterator)@Base" 0.8.0 (c++)"pkgOrderList::IsMissing(pkgCache::PkgIterator)@Base" 0.8.0 (c++)"pkgOrderList::VisitDeps(bool (pkgOrderList::*)(pkgCache::DepIterator), pkgCache::PkgIterator)@Base" 0.8.0 - (c++)"pkgOrderList::VisitNode(pkgCache::PkgIterator)@Base" 0.8.0 (c++)"pkgOrderList::WipeFlags(unsigned long)@Base" 0.8.0 (c++)"pkgOrderList::pkgOrderList(pkgDepCache*)@Base" 0.8.0 (c++)"pkgOrderList::~pkgOrderList()@Base" 0.8.0 @@ -391,10 +362,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"Configuration::Configuration(Configuration::Item const*)@Base" 0.8.0 (c++)"Configuration::Configuration()@Base" 0.8.0 (c++)"Configuration::~Configuration()@Base" 0.8.0 - (c++)"SHA1Summation::Add(unsigned char const*, unsigned long)@Base" 0.8.0 - (c++)"SHA1Summation::AddFD(int, unsigned long)@Base" 0.8.0 - (c++)"SHA1Summation::Result()@Base" 0.8.0 - (c++)"SHA1Summation::SHA1Summation()@Base" 0.8.0 (c++)"WeakPointable::~WeakPointable()@Base" 0.8.0 (c++)"debListParser::NewVersion(pkgCache::VerIterator&)@Base" 0.8.0 (c++)"debListParser::UsePackage(pkgCache::PkgIterator&, pkgCache::VerIterator&)@Base" 0.8.0 @@ -420,7 +387,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"debListParser::GrabWord(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, debListParser::WordList*, unsigned char&)@Base" 0.8.0 (c++)"debListParser::debListParser(FileFd*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0 (c++)"debListParser::~debListParser()@Base" 0.8.0 - (c++)"pkgAcqArchive::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqArchive::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqArchive::DescURI()@Base" 0.8.0 (c++)"pkgAcqArchive::HashSum()@Base" 0.8.0 @@ -431,7 +397,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgAcqArchive::pkgAcqArchive(pkgAcquire*, pkgSourceList*, pkgRecords*, pkgCache::VerIterator const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@Base" 0.8.0 (c++)"pkgAcqArchive::~pkgAcqArchive()@Base" 0.8.0 (c++)"pkgAcqMetaSig::Custom600Headers()@Base" 0.8.0 - (c++)"pkgAcqMetaSig::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqMetaSig::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqMetaSig::DescURI()@Base" 0.8.0 (c++)"pkgAcqMetaSig::~pkgAcqMetaSig()@Base" 0.8.0 @@ -470,16 +435,9 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"OpTextProgress::Update()@Base" 0.8.0 (c++)"OpTextProgress::OpTextProgress(Configuration&)@Base" 0.8.0 (c++)"OpTextProgress::~OpTextProgress()@Base" 0.8.0 - (c++)"SHA256SumValue::Set(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 - (c++)"SHA256SumValue::SHA256SumValue(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 - (c++)"SHA256SumValue::SHA256SumValue()@Base" 0.8.0 (c++)"debIFTypeTrans::~debIFTypeTrans()@Base" 0.8.0 (c++)"debStatusIndex::debStatusIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 (c++)"debStatusIndex::~debStatusIndex()@Base" 0.8.0 - (c++)"SHA256Summation::Add(unsigned char const*, unsigned long)@Base" 0.8.0 - (c++)"SHA256Summation::AddFD(int, unsigned long)@Base" 0.8.0 - (c++)"SHA256Summation::Result()@Base" 0.8.0 - (c++)"SHA256Summation::SHA256Summation()@Base" 0.8.0 (c++)"debIFTypeStatus::~debIFTypeStatus()@Base" 0.8.0 (c++)"debRecordParser::Maintainer()@Base" 0.8.0 (c++)"debRecordParser::SHA256Hash()@Base" 0.8.0 @@ -510,7 +468,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"debSourcesIndex::~debSourcesIndex()@Base" 0.8.0 (c++)"pkgAcqDiffIndex::ParseDiffIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 (c++)"pkgAcqDiffIndex::Custom600Headers()@Base" 0.8.0 - (c++)"pkgAcqDiffIndex::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqDiffIndex::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqDiffIndex::DescURI()@Base" 0.8.0 (c++)"pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, HashString)@Base" 0.8.0 @@ -519,7 +476,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgAcqMetaIndex::VerifyVendor(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 (c++)"pkgAcqMetaIndex::RetrievalDone(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 (c++)"pkgAcqMetaIndex::Custom600Headers()@Base" 0.8.0 - (c++)"pkgAcqMetaIndex::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqMetaIndex::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqMetaIndex::DescURI()@Base" 0.8.0 (c++)"pkgAcqMetaIndex::AuthDone(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 @@ -536,7 +492,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"debPackagesIndex::debPackagesIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0 (c++)"debPackagesIndex::~debPackagesIndex()@Base" 0.8.0 (c++)"pkgAcqIndexDiffs::QueueNextDiff()@Base" 0.8.0 - (c++)"pkgAcqIndexDiffs::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqIndexDiffs::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.0 (c++)"pkgAcqIndexDiffs::Finish(bool)@Base" 0.8.0 (c++)"pkgAcqIndexDiffs::DescURI()@Base" 0.8.0 @@ -553,7 +508,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgAcquireStatus::Pulse(pkgAcquire*)@Base" 0.8.0 (c++)"pkgAcquireStatus::Start()@Base" 0.8.0 (c++)"pkgAcquireStatus::IMSHit(pkgAcquire::ItemDesc&)@Base" 0.8.0 - (c++)"pkgAcquireStatus::Fetched(unsigned long, unsigned long)@Base" 0.8.0 (c++)"pkgAcquireStatus::pkgAcquireStatus()@Base" 0.8.0 (c++)"pkgAcquireStatus::~pkgAcquireStatus()@Base" 0.8.0 (c++)"PreferenceSection::TrimRecord(bool, char const*&)@Base" 0.8.0 @@ -562,7 +516,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0 (c++)"pkgCacheGenerator::ListParser::CollectFileProvides(pkgCache&, pkgCache::VerIterator&)@Base" 0.8.0 (c++)"pkgCacheGenerator::ListParser::~ListParser()@Base" 0.8.0 - (c++)"pkgCacheGenerator::NewDepends(pkgCache::PkgIterator&, pkgCache::VerIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int const&, unsigned int const&, unsigned int*)@Base" 0.8.0 (c++)"pkgCacheGenerator::NewFileVer(pkgCache::VerIterator&, pkgCacheGenerator::ListParser&)@Base" 0.8.0 (c++)"pkgCacheGenerator::NewPackage(pkgCache::PkgIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0 (c++)"pkgCacheGenerator::NewVersion(pkgCache::VerIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long)@Base" 0.8.0 @@ -570,7 +523,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgCacheGenerator::FinishCache(OpProgress*)@Base" 0.8.0 (c++)"pkgCacheGenerator::NewFileDesc(pkgCache::DescIterator&, pkgCacheGenerator::ListParser&)@Base" 0.8.0 (c++)"pkgCacheGenerator::AllocateInMap(unsigned long const&)@Base" 0.8.0 - (c++)"pkgCacheGenerator::NewDescription(pkgCache::DescIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, MD5SumValue const&, unsigned int)@Base" 0.8.0 (c++)"pkgCacheGenerator::MakeStatusCache(pkgSourceList&, OpProgress*, MMap**, bool)@Base" 0.8.0 (c++)"pkgCacheGenerator::WriteUniqString(char const*, unsigned int)@Base" 0.8.0 (c++)"pkgCacheGenerator::WriteStringInMap(char const*)@Base" 0.8.0 @@ -699,17 +651,11 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"MMap::~MMap()@Base" 0.8.0 (c++)"FileFd::OpenDescriptor(int, FileFd::OpenMode, bool)@Base" 0.8.0 (c++)"FileFd::Open(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, FileFd::OpenMode, unsigned long)@Base" 0.8.0 - (c++)"FileFd::Read(void*, unsigned long, unsigned long*)@Base" 0.8.0 - (c++)"FileFd::Seek(unsigned long)@Base" 0.8.0 (c++)"FileFd::Size()@Base" 0.8.0 - (c++)"FileFd::Skip(unsigned long)@Base" 0.8.0 (c++)"FileFd::Sync()@Base" 0.8.0 (c++)"FileFd::Tell()@Base" 0.8.0 (c++)"FileFd::Close()@Base" 0.8.0 - (c++)"FileFd::Write(void const*, unsigned long)@Base" 0.8.0 - (c++)"FileFd::Truncate(unsigned long)@Base" 0.8.0 (c++)"FileFd::~FileFd()@Base" 0.8.0 - (c++)"Hashes::AddFD(int, unsigned long)@Base" 0.8.0 (c++)"Vendor::CheckDist(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0 (c++)"Vendor::Vendor(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<Vendor::Fingerprint*, std::allocator<Vendor::Fingerprint*> >*)@Base" 0.8.0 (c++)"Vendor::~Vendor()@Base" 0.8.0 @@ -797,7 +743,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgDPkgPM::~pkgDPkgPM()@Base" 0.8.0 (c++)"pkgPolicy::GetPriority(pkgCache::PkgIterator const&)@Base" 0.8.0 (c++)"pkgPolicy::InitDefaults()@Base" 0.8.0 - (c++)"pkgPolicy::IsImportantDep(pkgCache::DepIterator const&)@Base" 0.8.0 (c++)"pkgPolicy::GetCandidateVer(pkgCache::PkgIterator const&)@Base" 0.8.0 (c++)"pkgPolicy::PkgPin::~PkgPin()@Base" 0.8.0 (c++)"pkgPolicy::GetMatch(pkgCache::PkgIterator const&)@Base" 0.8.0 @@ -816,10 +761,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"HashString::toStr() const@Base" 0.8.0 (c++)"CommandLine::FileSize() const@Base" 0.8.0 (c++)"GlobalError::empty(GlobalError::MsgType const&) const@Base" 0.8.0 - (c++)"MD5SumValue::Value() const@Base" 0.8.0 - (c++)"MD5SumValue::operator==(MD5SumValue const&) const@Base" 0.8.0 - (c++)"SHA1SumValue::Value() const@Base" 0.8.0 - (c++)"SHA1SumValue::operator==(SHA1SumValue const&) const@Base" 0.8.0 (c++)"debIFTypePkg::CreatePkgParser(pkgCache::PkgFileIterator) const@Base" 0.8.0 (c++)"debSLTypeDeb::CreateItem(std::vector<metaIndex*, std::allocator<metaIndex*> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) const@Base" 0.8.0 (c++)"indexRecords::GetValidUntil() const@Base" 0.8.0 @@ -858,8 +799,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgTagSection::FindS(char const*) const@Base" 0.8.0 (c++)"pkgTagSection::FindULL(char const*, unsigned long long const&) const@Base" 0.8.0 (c++)"pkgTagSection::FindFlag(char const*, unsigned long&, unsigned long) const@Base" 0.8.0 - (c++)"SHA256SumValue::Value() const@Base" 0.8.0 - (c++)"SHA256SumValue::operator==(SHA256SumValue const&) const@Base" 0.8.0 (c++)"debStatusIndex::FindInCache(pkgCache&) const@Base" 0.8.0 (c++)"debStatusIndex::HasPackages() const@Base" 0.8.0 (c++)"debStatusIndex::Size() const@Base" 0.8.0 @@ -938,7 +877,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgCache::VerIterator::Downloadable() const@Base" 0.8.0 (c++)"pkgCache::VerIterator::OwnerPointer() const@Base" 0.8.0 (c++)"pkgCache::VerIterator::TranslatedDescription() const@Base" 0.8.0 - (c++)"pkgCache::VerIterator::Pseudo() const@Base" 0.8.0 (c++)"pkgCache::VerIterator::RelStr() const@Base" 0.8.0 (c++)"pkgCache::VerIterator::Automatic() const@Base" 0.8.0 (c++)"pkgCache::DescIterator::OwnerPointer() const@Base" 0.8.0 @@ -1255,7 +1193,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (arch=hppa mips mipsel sparc|c++|optional=private)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned int&)@Base" 0.8.11.4 (arch=ia64 sparc64|c++|optional=private)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned long&)@Base" 0.8.11.4 (arch=sh4|c++|optional=private)"GlobalError::Insert(GlobalError::MsgType, char const*, __builtin_va_list&, unsigned int&)@Base" 0.8.11.4 - (arch=i386 hurd-i386 kfreebsd-i386|c++|optional=private)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, char*&, int, unsigned int&)@Base" 0.8.11.4 (arch=armel armhf|c++|optional=private)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, std::__va_list&, int, unsigned int&)@Base" 0.8.11.4 (arch=alpha|c++|optional=private)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag&, int, unsigned long&)@Base" 0.8.11.4 @@ -1267,8 +1204,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# ### architecture specific: size_t (arch=i386 armel armhf hppa hurd-i386 kfreebsd-i386 mips mipsel powerpc powerpcspe sh4 sparc|c++)"_strtabexpand(char*, unsigned int)@Base" 0.8.0 (arch=alpha amd64 ia64 kfreebsd-amd64 s390 sparc64|c++)"_strtabexpand(char*, unsigned long)@Base" 0.8.0 - (arch=i386 armel armhf hppa hurd-i386 kfreebsd-i386 mips mipsel powerpc powerpcspe sh4 sparc|c++)"indexRecords::parseSumData(char const*&, char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&)@Base" 0.8.0 - (arch=alpha amd64 ia64 kfreebsd-amd64 s390 sparc64|c++)"indexRecords::parseSumData(char const*&, char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long&)@Base" 0.8.0 ### try to ignore std:: template instances (c++|regex|optional=std)"^(void |)std::[^ ]+<.+ >::(_|~).+\(.*\)@Base$" 0.8.0 (c++|regex|optional=std)"^std::[^ ]+<.+ >::(append|insert|reserve|operator[^ ]+)\(.*\)@Base$" 0.8.0 @@ -1294,7 +1229,6 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"pkgTagSection::FindFlag(unsigned long&, unsigned long, char const*, char const*)@Base" 0.8.11 (c++)"pkgAcqSubIndex::ParseIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.11 (c++)"pkgAcqSubIndex::Custom600Headers()@Base" 0.8.11 - (c++)"pkgAcqSubIndex::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.11 (c++)"pkgAcqSubIndex::Failed(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.11 (c++)"pkgAcqSubIndex::DescURI()@Base" 0.8.11 (c++)"pkgAcqSubIndex::pkgAcqSubIndex(pkgAcquire*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, HashString const&)@Base" 0.8.11 @@ -1320,10 +1254,194 @@ libapt-pkg.so.4.11 libapt-pkg4.11 #MINVER# (c++)"APT::Configuration::getCompressors(bool)@Base" 0.8.12 (c++)"APT::Configuration::getCompressorExtensions()@Base" 0.8.12 (c++)"APT::Configuration::setDefaultConfigurationForCompressors()@Base" 0.8.12 - (c++)"pkgDepCache::SetCandidateVersion(pkgCache::VerIterator, bool const&)@Base" 0.8.12 (c++)"pkgAcqMetaClearSig::Custom600Headers()@Base" 0.8.13 (c++|optional=private)"debListParser::NewProvidesAllArch(pkgCache::VerIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.13.2 (c++|optional=private)"PrintMode(char)@Base" 0.8.13.2 (c++)"pkgDepCache::IsModeChangeOk(pkgDepCache::ModeList, pkgCache::PkgIterator const&, unsigned long, bool)@Base" 0.8.13.2 (c++)"pkgPackageManager::SmartUnPack(pkgCache::PkgIterator, bool)@Base" 0.8.15~exp1 (c++)"pkgCache::DepIterator::IsNegative() const@Base" 0.8.15~exp1 + (c++)"Configuration::CndSet(char const*, int)@Base" 0.8.15.3 + (c++)"pkgProblemResolver::InstOrNewPolicyBroken(pkgCache::PkgIterator)@Base" 0.8.15.3 + (c++)"DeEscapeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.15.4 + (c++)"GetModificationTime(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.15.6 + (c++)"pkgSourceList::GetLastModifiedTime()@Base" 0.8.15.6 + (c++)"pkgCacheGenerator::NewDepends(pkgCache::PkgIterator&, pkgCache::VerIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int const&, unsigned int const&, unsigned int*&)@Base" 0.8.15.6 + (c++)"pkgCacheFile::RemoveCaches()@Base" 0.8.15.7 + (c++)"pkgOrderList::VisitNode(pkgCache::PkgIterator, char const*)@Base" 0.8.15.7 +### external dependency resolver ### + (c++)"edspIFType::~edspIFType()@Base" 0.8.16~exp2 + (c++)"edspSystem::Initialize(Configuration&)@Base" 0.8.16~exp2 + (c++)"edspSystem::AddStatusFiles(std::vector<pkgIndexFile*, std::allocator<pkgIndexFile*> >&)@Base" 0.8.16~exp2 + (c++)"edspSystem::ArchiveSupported(char const*)@Base" 0.8.16~exp2 + (c++)"edspSystem::Lock()@Base" 0.8.16~exp2 + (c++)"edspSystem::Score(Configuration const&)@Base" 0.8.16~exp2 + (c++)"edspSystem::UnLock(bool)@Base" 0.8.16~exp2 + (c++)"edspSystem::edspSystem()@Base" 0.8.16~exp2 + (c++)"edspSystem::~edspSystem()@Base" 0.8.16~exp2 + (c++)"edspListParser::NewVersion(pkgCache::VerIterator&)@Base" 0.8.16~exp2 + (c++)"edspListParser::Description()@Base" 0.8.16~exp2 + (c++)"edspListParser::ParseStatus(pkgCache::PkgIterator&, pkgCache::VerIterator&)@Base" 0.8.16~exp2 + (c++)"edspListParser::VersionHash()@Base" 0.8.16~exp2 + (c++)"edspListParser::Description_md5()@Base" 0.8.16~exp2 + (c++)"edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator&, FileFd&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.16~exp2 + (c++)"edspListParser::DescriptionLanguage()@Base" 0.8.16~exp2 + (c++)"edspListParser::edspListParser(FileFd*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.16~exp2 + (c++)"edspListParser::~edspListParser()@Base" 0.8.16~exp2 + (c++)"edspIndex::edspIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.16~exp2 + (c++)"edspIndex::~edspIndex()@Base" 0.8.16~exp2 + (c++)"edspIFType::CreatePkgParser(pkgCache::PkgFileIterator) const@Base" 0.8.16~exp2 + (c++)"edspSystem::CreatePM(pkgDepCache*) const@Base" 0.8.16~exp2 + (c++)"edspSystem::FindIndex(pkgCache::PkgFileIterator, pkgIndexFile*&) const@Base" 0.8.16~exp2 + (c++)"edspIndex::Merge(pkgCacheGenerator&, OpProgress*) const@Base" 0.8.16~exp2 + (c++)"edspIndex::GetType() const@Base" 0.8.16~exp2 + (c++)"EDSP::WriteError(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, _IO_FILE*)@Base" 0.8.16~exp2 + (c++)"EDSP::ReadRequest(int, std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool&, bool&, bool&)@Base" 0.8.16~exp2 + (c++)"EDSP::ApplyRequest(std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, pkgDepCache&)@Base" 0.8.16~exp2 + (c++)"EDSP::ReadResponse(int, pkgDepCache&, OpProgress*)@Base" 0.8.16~exp2 + (c++)"EDSP::StringToBool(char const*, bool)@Base" 0.8.16~exp2 + (c++)"EDSP::WriteRequest(pkgDepCache&, _IO_FILE*, bool, bool, bool, OpProgress*)@Base" 0.8.16~exp2 + (c++)"EDSP::ExecuteSolver(char const*, int*, int*)@Base" 0.8.16~exp2 + (c++)"EDSP::WriteProgress(unsigned short, char const*, _IO_FILE*)@Base" 0.8.16~exp2 + (c++)"EDSP::WriteScenario(pkgDepCache&, _IO_FILE*, OpProgress*)@Base" 0.8.16~exp2 + (c++)"EDSP::WriteSolution(pkgDepCache&, _IO_FILE*)@Base" 0.8.16~exp2 + (c++)"EDSP::ResolveExternal(char const*, pkgDepCache&, bool, bool, bool, OpProgress*)@Base" 0.8.16~exp2 + (c++)"EDSP::WriteLimitedScenario(pkgDepCache&, _IO_FILE*, APT::PackageSet const&, OpProgress*)@Base" 0.8.16~exp2 + (c++)"EDSP::WriteScenarioVersion(pkgDepCache&, _IO_FILE*, pkgCache::PkgIterator const&, pkgCache::VerIterator const&)@Base" 0.8.16~exp2 + (c++)"EDSP::WriteScenarioDependency(pkgDepCache&, _IO_FILE*, pkgCache::PkgIterator const&, pkgCache::VerIterator const&)@Base" 0.8.16~exp2 + (c++)"EDSP::WriteScenarioLimitedDependency(pkgDepCache&, _IO_FILE*, pkgCache::PkgIterator const&, pkgCache::VerIterator const&, APT::PackageSet const&)@Base" 0.8.16~exp2 + (c++)"EDSP::DepMap@Base" 0.8.16~exp2 + (c++)"EDSP::PrioMap@Base" 0.8.16~exp2 + (c++)"EDSP::ReadLine(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@Base" 0.8.16~exp2 + (c++)"pkgDepCache::Policy::GetPriority(pkgCache::PkgIterator const&)@Base" 0.8.16~exp6 + (c++)"pkgDepCache::Policy::GetPriority(pkgCache::PkgFileIterator const&)@Base" 0.8.16~exp6 + (c++)"typeinfo for edspIFType@Base" 0.8.16~exp2 + (c++)"typeinfo for edspSystem@Base" 0.8.16~exp2 + (c++)"typeinfo for edspListParser@Base" 0.8.16~exp2 + (c++)"typeinfo for edspIndex@Base" 0.8.16~exp2 + (c++)"typeinfo name for edspIFType@Base" 0.8.16~exp2 + (c++)"typeinfo name for edspSystem@Base" 0.8.16~exp2 + (c++)"typeinfo name for edspListParser@Base" 0.8.16~exp2 + (c++)"typeinfo name for edspIndex@Base" 0.8.16~exp2 + (c++)"vtable for edspIFType@Base" 0.8.16~exp2 + (c++)"vtable for edspSystem@Base" 0.8.16~exp2 + (c++)"vtable for edspListParser@Base" 0.8.16~exp2 + (c++)"vtable for edspIndex@Base" 0.8.16~exp2 + edspSys@Base 0.8.16~exp2 +### generalisation of checksums (with lfs) -- mostly api-compatible available (without sha512 in previous versions) + (c++)"SHA256_End(_SHA256_CTX*, char*)@Base" 0.8.16~exp2 + (c++)"SHA384_End(_SHA512_CTX*, char*)@Base" 0.8.16~exp2 + (c++)"SHA512_End(_SHA512_CTX*, char*)@Base" 0.8.16~exp2 + (c++)"SHA256_Data(unsigned char const*, unsigned int, char*)@Base" 0.8.16~exp2 + (c++)"SHA256_Init(_SHA256_CTX*)@Base" 0.8.16~exp2 + (c++)"SHA384_Data(unsigned char const*, unsigned int, char*)@Base" 0.8.16~exp2 + (c++)"SHA384_Init(_SHA512_CTX*)@Base" 0.8.16~exp2 + (c++)"SHA512_Data(unsigned char const*, unsigned int, char*)@Base" 0.8.16~exp2 + (c++)"SHA512_Init(_SHA512_CTX*)@Base" 0.8.16~exp2 + (c++)"SHA256_Final(unsigned char*, _SHA256_CTX*)@Base" 0.8.16~exp2 + (c++)"SHA384_Final(unsigned char*, _SHA512_CTX*)@Base" 0.8.16~exp2 + (c++)"SHA512_Final(unsigned char*, _SHA512_CTX*)@Base" 0.8.16~exp2 + (c++)"SHA256_Update(_SHA256_CTX*, unsigned char const*, unsigned int)@Base" 0.8.16~exp2 + (c++)"SHA384_Update(_SHA512_CTX*, unsigned char const*, unsigned int)@Base" 0.8.16~exp2 + (c++)"SHA512_Update(_SHA512_CTX*, unsigned char const*, unsigned int)@Base" 0.8.16~exp2 + (c++)"AddCRC16(unsigned short, void const*, unsigned long long)@Base" 0.8.16~exp2 + (c++)"MD5Summation::Add(unsigned char const*, unsigned long long)@Base" 0.8.16~exp6 + (c++)"MD5Summation::Result()@Base" 0.8.16~exp2 + (c++)"MD5Summation::MD5Summation()@Base" 0.8.16~exp2 + (c++)"SHA1Summation::SHA1Summation()@Base" 0.8.16~exp2 + (c++)"SHA1Summation::Add(unsigned char const*, unsigned long long)@Base" 0.8.16~exp6 + (c++)"SHA1Summation::Result()@Base" 0.8.16~exp2 + (c++)"SHA256Summation::Add(unsigned char const*, unsigned long long)@Base" 0.8.16~exp6 + (c++)"SHA512Summation::Add(unsigned char const*, unsigned long long)@Base" 0.8.16~exp6 + (c++)"debRecordParser::SHA512Hash()@Base" 0.8.16~exp2 + (c++)"pkgRecords::Parser::SHA512Hash()@Base" 0.8.16~exp6 + (c++)"Hashes::AddFD(int, unsigned long long, bool, bool, bool, bool)@Base" 0.8.16~exp6 + (c++)"SummationImplementation::AddFD(int, unsigned long long)@Base" 0.8.16~exp6 + (c++)"typeinfo for MD5Summation@Base" 0.8.16~exp6 + (c++)"typeinfo for SHA1Summation@Base" 0.8.16~exp6 + (c++)"typeinfo for SHA256Summation@Base" 0.8.16~exp6 + (c++)"typeinfo for SHA512Summation@Base" 0.8.16~exp6 + (c++)"typeinfo for SHA2SummationBase@Base" 0.8.16~exp6 + (c++)"typeinfo for SummationImplementation@Base" 0.8.16~exp6 + (c++)"typeinfo name for MD5Summation@Base" 0.8.16~exp6 + (c++)"typeinfo name for SHA1Summation@Base" 0.8.16~exp6 + (c++)"typeinfo name for SHA256Summation@Base" 0.8.16~exp6 + (c++)"typeinfo name for SHA512Summation@Base" 0.8.16~exp6 + (c++)"typeinfo name for SHA2SummationBase@Base" 0.8.16~exp6 + (c++)"typeinfo name for SummationImplementation@Base" 0.8.16~exp6 + (c++)"vtable for MD5Summation@Base" 0.8.16~exp6 + (c++)"vtable for SHA1Summation@Base" 0.8.16~exp6 + (c++)"vtable for SHA256Summation@Base" 0.8.16~exp6 + (c++)"vtable for SHA512Summation@Base" 0.8.16~exp6 + (c++)"vtable for SHA2SummationBase@Base" 0.8.16~exp6 + (c++)"vtable for SummationImplementation@Base" 0.8.16~exp6 +### large file support - available in older api-compatible versions without lfs ### + (c++)"StrToNum(char const*, unsigned long long&, unsigned int, unsigned int)@Base" 0.8.16~exp6 + (c++)"OpProgress::SubProgress(unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float)@Base" 0.8.16~exp6 + (c++)"OpProgress::OverallProgress(unsigned long long, unsigned long long, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.16~exp6 + (c++)"OpProgress::Progress(unsigned long long)@Base" 0.8.16~exp6 + (c++)"SourceCopy::GetFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long long&)@Base" 0.8.16~exp6 + (c++)"pkgAcqFile::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.16~exp6 + (c++)"pkgAcqFile::pkgAcqFile(pkgAcquire*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@Base" 0.8.16~exp6 + (c++)"pkgAcquire::UriIterator::~UriIterator()@Base" 0.8.16~exp6 + (c++)"pkgAcquire::MethodConfig::~MethodConfig()@Base" 0.8.16~exp6 + (c++)"pkgAcquire::Item::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.16~exp6 + (c++)"pkgAcquire::Item::Start(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long)@Base" 0.8.16~exp6 + (c++)"pkgRecords::Parser::RecordField(char const*)@Base" 0.8.16~exp6 + (c++)"pkgTagFile::Jump(pkgTagSection&, unsigned long long)@Base" 0.8.16~exp6 + (c++)"pkgTagFile::Offset()@Base" 0.8.16~exp6 + (c++)"pkgTagFile::pkgTagFile(FileFd*, unsigned long long)@Base" 0.8.16~exp6 + (c++)"DynamicMMap::RawAllocate(unsigned long long, unsigned long)@Base" 0.8.16~exp6 + (c++)"PackageCopy::GetFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long long&)@Base" 0.8.16~exp6 + (c++)"pkgAcqIndex::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.16~exp6 + (c++)"indexRecords::parseSumData(char const*&, char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long long&)@Base" 0.8.16~exp6 + (c++)"pkgAcqArchive::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.16~exp6 + (c++)"pkgTagSection::~pkgTagSection()@Base" 0.8.16~exp6 + (c++)"pkgAcqSubIndex::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.16~exp6 + (c++)"debRecordParser::RecordField(char const*)@Base" 0.8.16~exp6 + (c++)"debReleaseIndex::SetTrusted(bool)@Base" 0.8.16~exp6 + (c++)"debReleaseIndex::debReleaseIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@Base" 0.8.16~exp6 + (c++)"pkgAcqMetaIndex::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.16~exp6 + (c++)"pkgAcqIndexDiffs::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.16~exp6 + (c++)"pkgAcqMetaSig::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.16~exp6 + (c++)"pkgAcqDiffIndex::Done(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgAcquire::MethodConfig*)@Base" 0.8.16~exp6 + (c++)"pkgAcquireStatus::Fetched(unsigned long long, unsigned long long)@Base" 0.8.16~exp6 + (c++)"PreferenceSection::~PreferenceSection()@Base" 0.8.16~exp6 + (c++)"pkgCacheGenerator::NewDescription(pkgCache::DescIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, HashSumValue<128> const&, unsigned int)@Base" 0.8.16~exp6 + (c++)"pkgProblemResolver::ResolveInternal(bool)@Base" 0.8.16~exp6 + (c++)"pkgProblemResolver::ResolveByKeepInternal()@Base" 0.8.16~exp6 + (c++)"FileFd::Read(void*, unsigned long long, unsigned long long*)@Base" 0.8.16~exp6 + (c++)"FileFd::Seek(unsigned long long)@Base" 0.8.16~exp6 + (c++)"FileFd::Skip(unsigned long long)@Base" 0.8.16~exp6 + (c++)"FileFd::Write(void const*, unsigned long long)@Base" 0.8.16~exp6 + (c++)"FileFd::Truncate(unsigned long long)@Base" 0.8.16~exp6 + (c++)"pkgCache::PkgIterator::PkgIterator(pkgCache&, pkgCache::Package*)@Base" 0.8.16~exp6 + (c++)"pkgPolicy::GetPriority(pkgCache::PkgFileIterator const&)@Base" 0.8.16~exp6 + (c++)"OptionalIndexTarget::IsOptional() const@Base" 0.8.16~exp6 + (c++)"typeinfo for pkgTagFile@Base" 0.8.16~exp6 + (c++)"typeinfo for IndexTarget@Base" 0.8.16~exp6 + (c++)"typeinfo for pkgSrcRecords@Base" 0.8.16~exp6 + (c++)"typeinfo for OptionalIndexTarget@Base" 0.8.16~exp6 + (c++)"typeinfo for pkgAcquire::UriIterator@Base" 0.8.16~exp6 + (c++)"typeinfo for pkgAcquire::MethodConfig@Base" 0.8.16~exp6 + (c++)"typeinfo for pkgAcquire::Queue@Base" 0.8.16~exp6 + (c++)"typeinfo for pkgAcquire::Worker@Base" 0.8.16~exp6 + (c++)"typeinfo name for pkgTagFile@Base" 0.8.16~exp6 + (c++)"typeinfo name for IndexTarget@Base" 0.8.16~exp6 + (c++)"typeinfo name for pkgSrcRecords@Base" 0.8.16~exp6 + (c++)"typeinfo name for OptionalIndexTarget@Base" 0.8.16~exp6 + (c++)"typeinfo name for pkgAcquire::UriIterator@Base" 0.8.16~exp6 + (c++)"typeinfo name for pkgAcquire::MethodConfig@Base" 0.8.16~exp6 + (c++)"typeinfo name for pkgAcquire::Queue@Base" 0.8.16~exp6 + (c++)"typeinfo name for pkgAcquire::Worker@Base" 0.8.16~exp6 + (c++)"vtable for pkgTagFile@Base" 0.8.16~exp6 + (c++)"vtable for IndexTarget@Base" 0.8.16~exp6 + (c++)"vtable for pkgSrcRecords@Base" 0.8.16~exp6 + (c++)"vtable for OptionalIndexTarget@Base" 0.8.16~exp6 + (c++)"vtable for pkgAcquire::UriIterator@Base" 0.8.16~exp6 + (c++)"vtable for pkgAcquire::MethodConfig@Base" 0.8.16~exp6 + (c++)"vtable for pkgAcquire::Queue@Base" 0.8.16~exp6 + (c++)"vtable for pkgAcquire::Worker@Base" 0.8.16~exp6 +### remove deprecated parameter + (c++)"pkgDepCache::SetCandidateVersion(pkgCache::VerIterator)@Base" 0.8.16~exp6 + (c++)"pkgDepCache::AddSizes(pkgCache::PkgIterator const&, bool)@Base" 0.8.16~exp6 + (c++)"pkgDepCache::AddStates(pkgCache::PkgIterator const&, bool)@Base" 0.8.16~exp6 diff --git a/debian/rules b/debian/rules index 1446a039e..30474c06b 100755 --- a/debian/rules +++ b/debian/rules @@ -100,7 +100,12 @@ build/build-stamp: build/configure-stamp # compat symlink for the locale split mkdir -p build/usr/share cd build/usr/share && ln -f -s ../../locale . - # done here + # compile and run tests +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) + $(MAKE) test +else + @echo "Tests DISABLED" +endif touch $@ build/build-doc-stamp: build/configure-stamp diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index 36a675bb0..03a418e5c 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -317,7 +317,7 @@ <varlistentry><term>autoremove</term> <listitem><para><literal>autoremove</literal> is used to remove packages that were automatically - installed to satisfy dependencies for some package and that are no more needed.</para></listitem> + installed to satisfy dependencies for other packages and are now no longer needed.</para></listitem> </varlistentry> <varlistentry><term>changelog</term> diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 2634c47a9..d7d56f3a1 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -267,14 +267,23 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; <varlistentry><term>Max-ValidTime</term> <listitem><para>Seconds the Release file should be considered valid after - it was created. The default is "for ever" (0) if the Release file of the - archive doesn't include a <literal>Valid-Until</literal> header. - If it does then this date is the default. The date from the Release file or - the date specified by the creation time of the Release file - (<literal>Date</literal> header) plus the seconds specified with this - options are used to check if the validation of a file has expired by using - the earlier date of the two. Archive specific settings can be made by - appending the label of the archive to the option name. + it was created (indicated by the <literal>Date</literal> header). + If the Release file itself includes a <literal>Valid-Until</literal> header + the earlier date of the two is used as the expiration date. + The default value is <literal>0</literal> which stands for "for ever". + Archive specific settings can be made by appending the label of the archive + to the option name. + </para></listitem> + </varlistentry> + + <varlistentry><term>Min-ValidTime</term> + <listitem><para>Minimum of seconds the Release file should be considered + valid after it was created (indicated by the <literal>Date</literal> header). + Use this if you need to use a seldomly updated (local) mirror of a more + regular updated archive with a <literal>Valid-Until</literal> header + instead of competely disabling the expiration date checking. + Archive specific settings can and should be used by appending the label of + the archive to the option name. </para></listitem> </varlistentry> @@ -285,7 +294,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; <para>Two sub-options to limit the use of PDiffs are also available: With <literal>FileLimit</literal> can be specified how many PDiff files are downloaded at most to patch a file. <literal>SizeLimit</literal> - on the other hand is the maximum precentage of the size of all patches + on the other hand is the maximum percentage of the size of all patches compared to the size of the targeted file. If one of these limits is exceeded the complete file is downloaded instead of the patches. </para></listitem> diff --git a/doc/po/de.po b/doc/po/de.po index 6261a470e..1c3ab0e90 100644 --- a/doc/po/de.po +++ b/doc/po/de.po @@ -1394,9 +1394,15 @@ msgstr "<option>--no-replaces</option>" msgid "<option>--no-enhances</option>" msgstr "<option>--no-enhances</option>" -# FIXME s/twicked/tricked/ #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-cache.8.xml:317 +#, fuzzy +#| msgid "" +#| "Per default the <literal>depends</literal> and <literal>rdepends</" +#| "literal> print all dependencies. This can be twicked with these flags " +#| "which will omit the specified dependency type. Configuration Item: " +#| "<literal>APT::Cache::Show<replaceable>DependencyType</replaceable></" +#| "literal> e.g. <literal>APT::Cache::ShowRecommends</literal>." msgid "" "Per default the <literal>depends</literal> and <literal>rdepends</literal> " "print all dependencies. This can be twicked with these flags which will omit " @@ -3133,9 +3139,20 @@ msgid "" msgstr "" "<option>--md5</option>, <option>--sha1</option>, <option>--sha256</option>" -# FIXME <literal>Checksum</literal> im letzten Abschnitt <replaceable>? #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-ftparchive.1.xml:531 +#, fuzzy +#| msgid "" +#| "Generate the given checksum. These options default to on, when turned off " +#| "the generated index files will not have the checksum fields where " +#| "possible. Configuration Items: <literal>APT::FTPArchive::" +#| "<replaceable>Checksum</replaceable></literal> and <literal>APT::" +#| "FTPArchive::<replaceable>Index</replaceable>::<replaceable>Checksum</" +#| "replaceable></literal> where <literal><replaceable>Index</replaceable></" +#| "literal> can be <literal>Packages</literal>, <literal>Sources</literal> " +#| "or <literal>Release</literal> and <literal><replaceable>Checksum</" +#| "replaceable></literal> can be <literal>MD5</literal>, <literal>SHA1</" +#| "literal> or <literal>SHA256</literal>." msgid "" "Generate the given checksum. These options default to on, when turned off " "the generated index files will not have the checksum fields where possible. " @@ -3152,9 +3169,10 @@ msgstr "" "Möglichkeit keine Prüfsummenfelder erhalten. Konfigurationselemente: " "<literal>APT::FTPArchive::<replaceable>Prüfsumme</replaceable></literal> und " "<literal>APT::FTPArchive::<replaceable>Index</replaceable>::" -"<replaceable>Prüfsumme</replaceable></literal>, wobei <literal>Index</" -"literal> <literal>Packages</literal>, <literal>Sources</literal> oder " -"<literal>Release</literal> sein kann und <literal>Checksum</literal> " +"<replaceable>Prüfsumme</replaceable></literal>, wobei " +"<literal><replaceable>Index</replaceable></literal> <literal>Packages</" +"literal>, <literal>Sources</literal> oder <literal>Release</literal> sein " +"kann und <literal><replaceable>Prüfsumme</replaceable></literal> " "<literal>MD5</literal>, <literal>SHA1</literal> oder <literal>SHA256</" "literal> sein kann." @@ -3379,6 +3397,35 @@ msgstr "APT-Werkzeug für den Umgang mit Paketen -- Befehlszeilenschnittstelle" #. type: Content of: <refentry><refsynopsisdiv><cmdsynopsis> #: apt-get.8.xml:39 +#, fuzzy +#| msgid "" +#| "<command>apt-get</command> <arg><option>-sqdyfmubV</option></arg> <arg> " +#| "<option>-o= <replaceable>config_string</replaceable> </option> </arg> " +#| "<arg> <option>-c= <replaceable>config_file</replaceable> </option> </arg> " +#| "<arg> <option>-t=</option> <arg choice='plain'> " +#| "<replaceable>target_release</replaceable> </arg> </arg> <group choice=" +#| "\"req\"> <arg choice='plain'>update</arg> <arg choice='plain'>upgrade</" +#| "arg> <arg choice='plain'>dselect-upgrade</arg> <arg choice='plain'>dist-" +#| "upgrade</arg> <arg choice='plain'>install <arg choice=\"plain\" rep=" +#| "\"repeat\"><replaceable>pkg</replaceable> <arg> <group choice='req'> <arg " +#| "choice='plain'> =<replaceable>pkg_version_number</replaceable> </arg> " +#| "<arg choice='plain'> /<replaceable>target_release</replaceable> </arg> </" +#| "group> </arg> </arg> </arg> <arg choice='plain'>remove <arg choice=\"plain" +#| "\" rep=\"repeat\"><replaceable>pkg</replaceable></arg></arg> <arg " +#| "choice='plain'>purge <arg choice=\"plain\" rep=\"repeat" +#| "\"><replaceable>pkg</replaceable></arg></arg> <arg choice='plain'>source " +#| "<arg choice=\"plain\" rep=\"repeat\"><replaceable>pkg</replaceable> <arg> " +#| "<group choice='req'> <arg choice='plain'> " +#| "=<replaceable>pkg_version_number</replaceable> </arg> <arg " +#| "choice='plain'> /<replaceable>target_release</replaceable> </arg> </" +#| "group> </arg> </arg> </arg> <arg choice='plain'>build-dep <arg choice=" +#| "\"plain\" rep=\"repeat\"><replaceable>pkg</replaceable></arg></arg> <arg " +#| "choice='plain'>check</arg> <arg choice='plain'>clean</arg> <arg " +#| "choice='plain'>autoclean</arg> <arg choice='plain'>autoremove</arg> <arg " +#| "choice='plain'> <group choice='req'> <arg choice='plain'>-v</arg> <arg " +#| "choice='plain'>--version</arg> </group> </arg> <arg choice='plain'> " +#| "<group choice='req'> <arg choice='plain'>-h</arg> <arg choice='plain'>--" +#| "help</arg> </group> </arg> </group>" msgid "" "<command>apt-get</command> <arg><option>-sqdyfmubV</option></arg> <arg> " "<option>-o= <replaceable>config_string</replaceable> </option> </arg> <arg> " @@ -3749,6 +3796,12 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:255 +#, fuzzy +#| msgid "" +#| "If the <option>--compile</option> option is specified then the package " +#| "will be compiled to a binary .deb using <command>dpkg-buildpackage</" +#| "command>, if <option>--download-only</option> is specified then the " +#| "source package will not be unpacked." msgid "" "If the <option>--compile</option> option is specified then the package will " "be compiled to a binary .deb using <command>dpkg-buildpackage</command>, if " @@ -3794,6 +3847,10 @@ msgstr "build-dep" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:272 +#, fuzzy +#| msgid "" +#| "<literal>build-dep</literal> causes apt-get to install/remove packages in " +#| "an attempt to satisfy the build dependencies for a source package." msgid "" "<literal>build-dep</literal> causes apt-get to install/remove packages in an " "attempt to satisfy the build dependencies for a source package." @@ -3821,9 +3878,12 @@ msgstr "" msgid "download" msgstr "download" -# FIXME s/directoy/directory/ #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:282 +#, fuzzy +#| msgid "" +#| "<literal>download</literal> will download the given binary package into " +#| "the current directory." msgid "" "<literal>download</literal> will download the given binary package into the " "current directoy." @@ -3882,6 +3942,11 @@ msgstr "autoremove" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml:308 +#, fuzzy +#| msgid "" +#| "<literal>autoremove</literal> is used to remove packages that were " +#| "automatically installed to satisfy dependencies for some package and that " +#| "are no more needed." msgid "" "<literal>autoremove</literal> is used to remove packages that were " "automatically installed to satisfy dependencies for some package and that " @@ -5514,9 +5579,17 @@ msgstr "" "die Datei, die durch die Umgebungsvariable <envar>APT_CONFIG</envar> " "angegeben wird (falls gesetzt)" -# FIXME s/no or/no/ #. type: Content of: <refentry><refsect1><orderedlist><listitem><para> #: apt.conf.5.xml:52 +#, fuzzy +#| msgid "" +#| "all files in <literal>Dir::Etc::Parts</literal> in alphanumeric ascending " +#| "order which have no or \"<literal>conf</literal>\" as filename extension " +#| "and which only contain alphanumeric, hyphen (-), underscore (_) and " +#| "period (.) characters. Otherwise APT will print a notice that it has " +#| "ignored a file if the file doesn't match a pattern in the <literal>Dir::" +#| "Ignore-Files-Silently</literal> configuration list - in this case it will " +#| "be silently ignored." msgid "" "all files in <literal>Dir::Etc::Parts</literal> in alphanumeric ascending " "order which have no or \"<literal>conf</literal>\" as filename extension and " @@ -6073,6 +6146,17 @@ msgstr "Max-ValidTime" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:261 +#, fuzzy +#| msgid "" +#| "Seconds the Release file should be considered valid after it was created. " +#| "The default is \"for ever\" (0) if the Release file of the archive " +#| "doesn't include a <literal>Valid-Until</literal> header. If it does then " +#| "this date is the default. The date from the Release file or the date " +#| "specified by the creation time of the Release file (<literal>Date</" +#| "literal> header) plus the seconds specified with this options are used to " +#| "check if the validation of a file has expired by using the earlier date " +#| "of the two. Archive specific settings can be made by appending the label " +#| "of the archive to the option name." msgid "" "Seconds the Release file should be considered valid after it was created. " "The default is \"for ever\" (0) if the Release file of the archive doesn't " @@ -6112,6 +6196,14 @@ msgstr "" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:277 +#, fuzzy +#| msgid "" +#| "Two sub-options to limit the use of PDiffs are also available: With " +#| "<literal>FileLimit</literal> can be specified how many PDiff files are " +#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the " +#| "other hand is the maximum percentage of the size of all patches compared " +#| "to the size of the targeted file. If one of these limits is exceeded the " +#| "complete file is downloaded instead of the patches." msgid "" "Two sub-options to limit the use of PDiffs are also available: With " "<literal>FileLimit</literal> can be specified how many PDiff files are " @@ -6561,9 +6653,20 @@ msgstr "" msgid "Dir::Bin::bzip2 \"/bin/bzip2\";" msgstr "Dir::Bin::bzip2 \"/bin/bzip2\";" -# FIXME s/> Note/>. Note/ #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:442 +#, fuzzy +#| msgid "" +#| "Note that at run time the <literal>Dir::Bin::<replaceable>Methodname</" +#| "replaceable></literal> will be checked: If this setting exists the method " +#| "will only be used if this file exists, e.g. for the bzip2 method (the " +#| "inbuilt) setting is <placeholder type=\"literallayout\" id=\"0\"/> Note " +#| "also that list entries specified on the command line will be added at the " +#| "end of the list specified in the configuration files, but before the " +#| "default entries. To prefer a type in this case over the ones specified in " +#| "the configuration files you can set the option direct - not in list " +#| "style. This will not override the defined list, it will only prefix the " +#| "list with this type." msgid "" "Note that at run time the <literal>Dir::Bin::<replaceable>Methodname</" "replaceable></literal> will be checked: If this setting exists the method " @@ -6588,9 +6691,14 @@ msgstr "" "nicht im Listenstil. Dies wird die definierte Liste nicht überschreiben, es " "wird diesen Typ nur vor die Liste setzen." -# FIXME: s/doesn't provide/don't provide/ #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:449 +#, fuzzy +#| msgid "" +#| "The special type <literal>uncompressed</literal> can be used to give " +#| "uncompressed files a preference, but note that most archives don't " +#| "provide uncompressed files so this is mostly only useable for local " +#| "mirrors." msgid "" "The special type <literal>uncompressed</literal> can be used to give " "uncompressed files a preference, but note that most archives doesn't provide " @@ -7878,6 +7986,16 @@ msgstr "" #. type: Content of: <refentry><refsect1><para> #: apt_preferences.5.xml:70 +#, fuzzy +#| msgid "" +#| "Note that the files in the <filename>/etc/apt/preferences.d</filename> " +#| "directory are parsed in alphanumeric ascending order and need to obey the " +#| "following naming convention: The files have no or \"<literal>pref</" +#| "literal>\" as filename extension and which only contain alphanumeric, " +#| "hyphen (-), underscore (_) and period (.) characters. Otherwise APT will " +#| "print a notice that it has ignored a file if the file doesn't match a " +#| "pattern in the <literal>Dir::Ignore-Files-Silently</literal> " +#| "configuration list - in this case it will be silently ignored." msgid "" "Note that the files in the <filename>/etc/apt/preferences.d</filename> " "directory are parsed in alphanumeric ascending order and need to obey the " @@ -8351,9 +8469,15 @@ msgstr "" msgid "Regular expressions and glob() syntax" msgstr "Reguläre Ausdrücke und glob()-Syntax" -# FIXME: s/expression or/expression) or/ #. type: Content of: <refentry><refsect1><refsect2><para> #: apt_preferences.5.xml:264 +#, fuzzy +#| msgid "" +#| "APT also supports pinning by glob() expressions and regular expressions " +#| "surrounded by /. For example, the following example assigns the priority " +#| "500 to all packages from experimental where the name starts with gnome " +#| "(as a glob()-like expression) or contains the word kde (as a POSIX " +#| "extended regular expression surrounded by slashes)." msgid "" "APT also supports pinning by glob() expressions and regular expressions " "surrounded by /. For example, the following example assigns the priority 500 " @@ -8380,9 +8504,13 @@ msgstr "" "Pin: release n=experimental\n" "Pin-Priority: 500\n" -# FIXME: s/Those/Thus/ #. type: Content of: <refentry><refsect1><refsect2><para> #: apt_preferences.5.xml:279 +#, fuzzy +#| msgid "" +#| "The rule for those expressions is that they can occur anywhere where a " +#| "string can occur. Thus, the following pin assigns the priority 990 to all " +#| "packages from a release starting with karmic." msgid "" "The rule for those expressions is that they can occur anywhere where a " "string can occur. Those, the following pin assigns the priority 990 to all " @@ -9299,7 +9427,8 @@ msgstr "" #. type: Content of: <refentry><refsect1><literallayout> #: sources.list.5.xml:81 -#, no-wrap +#, fuzzy, no-wrap +#| msgid "deb uri distribution [component1] [component2] [...]" msgid "deb uri distribution [component1] [component2] [...]" msgstr "deb URI Distribution [Komponente1] [Komponente2] [...]" @@ -11221,6 +11350,60 @@ msgstr " # apt-get -o dir::cache::archives=\"/Platte/\" dist-upgrade" msgid "Which will use the already fetched archives on the disc." msgstr "Es wird die bereits auf die Platte heruntergeladenen Archive benutzen." +#, fuzzy +#~| msgid "<option>--recurse</option>" +#~ msgid "<option>--host-architecture</option>" +#~ msgstr "<option>--recurse</option>" + +#, fuzzy +#~| msgid "Max-ValidTime" +#~ msgid "Min-ValidTime" +#~ msgstr "Max-ValidTime" + +#, fuzzy +#~| msgid "" +#~| "Seconds the Release file should be considered valid after it was " +#~| "created. The default is \"for ever\" (0) if the Release file of the " +#~| "archive doesn't include a <literal>Valid-Until</literal> header. If it " +#~| "does then this date is the default. The date from the Release file or " +#~| "the date specified by the creation time of the Release file " +#~| "(<literal>Date</literal> header) plus the seconds specified with this " +#~| "options are used to check if the validation of a file has expired by " +#~| "using the earlier date of the two. Archive specific settings can be made " +#~| "by appending the label of the archive to the option name." +#~ msgid "" +#~ "Minimum of seconds the Release file should be considered valid after it " +#~ "was created (indicated by the <literal>Date</literal> header). Use this " +#~ "if you need to use a seldomly updated (local) mirror of a more regular " +#~ "updated archive with a <literal>Valid-Until</literal> header instead of " +#~ "competely disabling the expiration date checking. Archive specific " +#~ "settings can and should be used by appending the label of the archive to " +#~ "the option name." +#~ msgstr "" +#~ "Sekunden, die die Release-Datei als gültig betrachtet werden sollte, " +#~ "nachdem sie erzeugt wurde. Vorgabe ist »für immer« (0), falls die Release-" +#~ "Datei des Archivs keine <literal>Valid-Until</literal>-Kopfzeile enthält. " +#~ "Falls dies so ist, ist dieses Datum vorgegeben. Das Datum aus der Release-" +#~ "Datei oder das Datum, das durch die Erstellungszeit der Release-Datei " +#~ "angegeben wurde (<literal>Date</literal>-Kopfzeile) plus die mit diesen " +#~ "Optionen angegebenen Sekunden werden benutzt, um zu prüfen, ob die " +#~ "Bestätigung einer Datei abgelaufen ist indem das neuere Datum der beiden " +#~ "benutzt wird. Archivspezifische Einstellungen können durch Anhängen des " +#~ "Archivetiketts an die Option »name« vorgenommen werden." + +#, fuzzy +#~| msgid "" +#~| "deb http://ftp.debian.org/debian &stable-codename; main contrib non-free\n" +#~| "deb http://security.debian.org/ &stable-codename;/updates main contrib non-free\n" +#~| " " +#~ msgid "" +#~ "deb http://ftp.debian.org/debian &stable-codename; main\n" +#~ "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &stable-codename; main" +#~ msgstr "" +#~ "deb http://ftp.debian.org/debian &stable-codename; main contrib non-free\n" +#~ "deb http://security.debian.org/ &stable-codename;/updates main contrib non-free\n" +#~ " " + #~ msgid "<option>--md5</option>" #~ msgstr "<option>--md5</option>" diff --git a/doc/po/es.po b/doc/po/es.po index 3a21eeecb..db8b9a848 100644 --- a/doc/po/es.po +++ b/doc/po/es.po @@ -6158,6 +6158,14 @@ msgstr "" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:277 +#, fuzzy +#| msgid "" +#| "Two sub-options to limit the use of PDiffs are also available: With " +#| "<literal>FileLimit</literal> can be specified how many PDiff files are " +#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the " +#| "other hand is the maximum percentage of the size of all patches compared " +#| "to the size of the targeted file. If one of these limits is exceeded the " +#| "complete file is downloaded instead of the patches." msgid "" "Two sub-options to limit the use of PDiffs are also available: With " "<literal>FileLimit</literal> can be specified how many PDiff files are " diff --git a/doc/po/fr.po b/doc/po/fr.po index e4a5e1694..037c50de5 100644 --- a/doc/po/fr.po +++ b/doc/po/fr.po @@ -6091,6 +6091,14 @@ msgstr "" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:277 +#, fuzzy +#| msgid "" +#| "Two sub-options to limit the use of PDiffs are also available: With " +#| "<literal>FileLimit</literal> can be specified how many PDiff files are " +#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the " +#| "other hand is the maximum percentage of the size of all patches compared " +#| "to the size of the targeted file. If one of these limits is exceeded the " +#| "complete file is downloaded instead of the patches." msgid "" "Two sub-options to limit the use of PDiffs are also available: With " "<literal>FileLimit</literal> can be specified how many PDiff files are " diff --git a/doc/po/ja.po b/doc/po/ja.po index 607d7e64d..4b08de7df 100644 --- a/doc/po/ja.po +++ b/doc/po/ja.po @@ -6270,6 +6270,14 @@ msgstr "" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:277 +#, fuzzy +#| msgid "" +#| "Two sub-options to limit the use of PDiffs are also available: With " +#| "<literal>FileLimit</literal> can be specified how many PDiff files are " +#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the " +#| "other hand is the maximum percentage of the size of all patches compared " +#| "to the size of the targeted file. If one of these limits is exceeded the " +#| "complete file is downloaded instead of the patches." msgid "" "Two sub-options to limit the use of PDiffs are also available: With " "<literal>FileLimit</literal> can be specified how many PDiff files are " diff --git a/doc/po/pt.po b/doc/po/pt.po index 863f3dd8b..3c82b2df1 100644 --- a/doc/po/pt.po +++ b/doc/po/pt.po @@ -6077,6 +6077,14 @@ msgstr "" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:277 +#, fuzzy +#| msgid "" +#| "Two sub-options to limit the use of PDiffs are also available: With " +#| "<literal>FileLimit</literal> can be specified how many PDiff files are " +#| "downloaded at most to patch a file. <literal>SizeLimit</literal> on the " +#| "other hand is the maximum percentage of the size of all patches compared " +#| "to the size of the targeted file. If one of these limits is exceeded the " +#| "complete file is downloaded instead of the patches." msgid "" "Two sub-options to limit the use of PDiffs are also available: With " "<literal>FileLimit</literal> can be specified how many PDiff files are " diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index 0762a2b28..f289eb00d 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -10,24 +10,25 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include "apt-ftparchive.h" - +#include <config.h> + #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> #include <apt-pkg/cmndline.h> #include <apt-pkg/strutl.h> #include <apt-pkg/init.h> -#include <config.h> -#include <apti18n.h> #include <algorithm> #include <climits> #include <sys/time.h> #include <regex.h> +#include "apt-ftparchive.h" #include "contents.h" #include "multicompress.h" -#include "writer.h" +#include "writer.h" + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -205,7 +206,7 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats) Packages.Output = 0; // Just in case // Finish compressing - unsigned long Size; + unsigned long long Size; if (Comp.Finalize(Size) == false) { c0out << endl; @@ -291,7 +292,7 @@ bool PackageMap::GenSources(Configuration &Setup,struct CacheDB::Stats &Stats) Sources.Output = 0; // Just in case // Finish compressing - unsigned long Size; + unsigned long long Size; if (Comp.Finalize(Size) == false) { c0out << endl; @@ -362,11 +363,11 @@ bool PackageMap::GenContents(Configuration &Setup, if (_error->PendingError() == true) return false; - unsigned long Size = Head.Size(); + unsigned long long Size = Head.Size(); unsigned char Buf[4096]; while (Size != 0) { - unsigned long ToRead = Size; + unsigned long long ToRead = Size; if (Size > sizeof(Buf)) ToRead = sizeof(Buf); @@ -384,7 +385,7 @@ bool PackageMap::GenContents(Configuration &Setup, files associated with this contents file into one great big honking memory structure, then dump the sorted version */ c0out << ' ' << this->Contents << ":" << flush; - for (vector<PackageMap>::iterator I = Begin; I != End; I++) + for (vector<PackageMap>::iterator I = Begin; I != End; ++I) { if (I->Contents != this->Contents) continue; @@ -400,7 +401,7 @@ bool PackageMap::GenContents(Configuration &Setup, Contents.Finish(); // Finish compressing - unsigned long Size; + unsigned long long Size; if (Comp.Finalize(Size) == false || _error->PendingError() == true) { c0out << endl; @@ -770,10 +771,10 @@ bool Generate(CommandLine &CmdL) // Generate packages if (CmdL.FileSize() <= 2) { - for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); ++I) if (I->GenPackages(Setup,Stats) == false) _error->DumpErrors(); - for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); ++I) if (I->GenSources(Setup,SrcStats) == false) _error->DumpErrors(); } @@ -782,7 +783,7 @@ bool Generate(CommandLine &CmdL) // Make a choice list out of the package list.. RxChoiceList *List = new RxChoiceList[2*PkgList.size()+1]; RxChoiceList *End = List; - for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); ++I) { End->UserData = &(*I); End->Str = I->BaseDir.c_str(); @@ -832,7 +833,7 @@ bool Generate(CommandLine &CmdL) } // close the Translation master files - for (vector<PackageMap>::reverse_iterator I = PkgList.rbegin(); I != PkgList.rend(); I++) + for (vector<PackageMap>::reverse_iterator I = PkgList.rbegin(); I != PkgList.rend(); ++I) if (I->TransWriter != NULL && I->TransWriter->DecreaseRefCounter() == 0) delete I->TransWriter; @@ -843,7 +844,7 @@ bool Generate(CommandLine &CmdL) // Sort the contents file list by date string ArchiveDir = Setup.FindDir("Dir::ArchiveDir"); - for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); ++I) { struct stat A; if (MultiCompress::GetStat(flCombine(ArchiveDir,I->Contents), @@ -860,7 +861,7 @@ bool Generate(CommandLine &CmdL) hashes of the .debs this means they have not changed either so the contents must be up to date. */ unsigned long MaxContentsChange = Setup.FindI("Default::MaxContentsChange",UINT_MAX)*1024; - for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); ++I) { // This record is not relevent if (I->ContentsDone == true || @@ -936,7 +937,7 @@ bool Clean(CommandLine &CmdL) _error->DumpErrors(); string CacheDB = I->BinCacheDB; - for (; I != PkgList.end() && I->BinCacheDB == CacheDB; I++); + for (; I != PkgList.end() && I->BinCacheDB == CacheDB; ++I); } return true; diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc index 24e3a1af8..f0bfa2a6d 100644 --- a/ftparchive/cachedb.cc +++ b/ftparchive/cachedb.cc @@ -10,23 +10,26 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include "cachedb.h" +#include <config.h> -#include <apti18n.h> #include <apt-pkg/error.h> #include <apt-pkg/md5.h> #include <apt-pkg/sha1.h> #include <apt-pkg/sha2.h> #include <apt-pkg/strutl.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/fileutl.h> #include <netinet/in.h> // htonl, etc + +#include <apti18n.h> +#include "cachedb.h" /*}}}*/ // CacheDB::ReadyDB - Ready the DB2 /*{{{*/ // --------------------------------------------------------------------- /* This opens the DB2 file for caching package information */ -bool CacheDB::ReadyDB(string const &DB) +bool CacheDB::ReadyDB(std::string const &DB) { int err; @@ -46,7 +49,7 @@ bool CacheDB::ReadyDB(string const &DB) DBLoaded = false; Dbp = 0; - DBFile = string(); + DBFile = std::string(); if (DB.empty()) return true; @@ -160,7 +163,7 @@ bool CacheDB::GetCurStat() /*}}}*/ // CacheDB::GetFileInfo - Get all the info about the file /*{{{*/ // --------------------------------------------------------------------- -bool CacheDB::GetFileInfo(string const &FileName, bool const &DoControl, bool const &DoContents, +bool CacheDB::GetFileInfo(std::string const &FileName, bool const &DoControl, bool const &DoContents, bool const &GenContentsOnly, bool const &DoMD5, bool const &DoSHA1, bool const &DoSHA256, bool const &DoSHA512, bool const &checkMtime) @@ -296,9 +299,9 @@ bool CacheDB::LoadContents(bool const &GenOnly) } /*}}}*/ -static string bytes2hex(uint8_t *bytes, size_t length) { +static std::string bytes2hex(uint8_t *bytes, size_t length) { char buf[3]; - string space; + std::string space; space.reserve(length*2 + 1); for (size_t i = 0; i < length; i++) { @@ -498,7 +501,7 @@ bool CacheDB::Clean() stringcmp(Colon + 1, (char *)Key.data+Key.size,"cl") == 0 || stringcmp(Colon + 1, (char *)Key.data+Key.size,"cn") == 0) { - if (FileExists(string((const char *)Key.data,Colon)) == true) + if (FileExists(std::string((const char *)Key.data,Colon)) == true) continue; } } diff --git a/ftparchive/cachedb.h b/ftparchive/cachedb.h index 15e796325..377c41607 100644 --- a/ftparchive/cachedb.h +++ b/ftparchive/cachedb.h @@ -13,16 +13,16 @@ #define CACHEDB_H +#include <apt-pkg/debfile.h> #include <db.h> -#include <string> -#include <apt-pkg/debfile.h> #include <inttypes.h> #include <sys/stat.h> #include <errno.h> - +#include <string> + #include "contents.h" - + class CacheDB { protected: @@ -34,7 +34,7 @@ class CacheDB DB *Dbp; bool DBLoaded; bool ReadOnly; - string DBFile; + std::string DBFile; // Generate a key for the DB of a given type inline void InitQuery(const char *Type) @@ -81,7 +81,7 @@ class CacheDB { uint32_t Flags; uint32_t mtime; - uint32_t FileSize; + uint64_t FileSize; uint8_t MD5[16]; uint8_t SHA1[20]; uint8_t SHA256[32]; @@ -90,7 +90,7 @@ class CacheDB struct StatStore OldStat; // 'set' state - string FileName; + std::string FileName; FileFd *Fd; debDebFile *DebFile; @@ -99,10 +99,10 @@ class CacheDB // Data collection helpers debDebFile::MemControlExtract Control; ContentsExtract Contents; - string MD5Res; - string SHA1Res; - string SHA256Res; - string SHA512Res; + std::string MD5Res; + std::string SHA1Res; + std::string SHA256Res; + std::string SHA512Res; // Runtime statistics struct Stats @@ -114,7 +114,7 @@ class CacheDB double SHA512Bytes; unsigned long Packages; unsigned long Misses; - unsigned long DeLinkBytes; + unsigned long long DeLinkBytes; inline void Add(const Stats &S) { Bytes += S.Bytes; @@ -129,21 +129,21 @@ class CacheDB Stats() : Bytes(0), MD5Bytes(0), SHA1Bytes(0), SHA256Bytes(0), Packages(0), Misses(0), DeLinkBytes(0) {}; } Stats; - bool ReadyDB(string const &DB); + bool ReadyDB(std::string const &DB); inline bool DBFailed() {return Dbp != 0 && DBLoaded == false;}; inline bool Loaded() {return DBLoaded == true;}; - inline off_t GetFileSize(void) {return CurStat.FileSize;} + inline unsigned long long GetFileSize(void) {return CurStat.FileSize;} - bool SetFile(string const &FileName,struct stat St,FileFd *Fd); - bool GetFileInfo(string const &FileName, bool const &DoControl, bool const &DoContents, bool const &GenContentsOnly, + bool SetFile(std::string const &FileName,struct stat St,FileFd *Fd); + bool GetFileInfo(std::string const &FileName, bool const &DoControl, bool const &DoContents, bool const &GenContentsOnly, bool const &DoMD5, bool const &DoSHA1, bool const &DoSHA256, bool const &DoSHA512, bool const &checkMtime = false); bool Finish(); bool Clean(); - CacheDB(string const &DB) : Dbp(0), Fd(NULL), DebFile(0) {ReadyDB(DB);}; - ~CacheDB() {ReadyDB(string()); delete DebFile;}; + CacheDB(std::string const &DB) : Dbp(0), Fd(NULL), DebFile(0) {ReadyDB(DB);}; + ~CacheDB() {ReadyDB(std::string()); delete DebFile;}; }; #endif diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc index eadced626..bbc5a1e2b 100644 --- a/ftparchive/contents.cc +++ b/ftparchive/contents.cc @@ -33,9 +33,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include "contents.h" +#include <config.h> -#include <apti18n.h> #include <apt-pkg/debfile.h> #include <apt-pkg/extracttar.h> #include <apt-pkg/error.h> @@ -43,6 +42,9 @@ #include <stdlib.h> #include <string.h> #include <malloc.h> + +#include <apti18n.h> +#include "contents.h" /*}}}*/ // GenContents::~GenContents - Free allocated memory /*{{{*/ @@ -347,7 +349,7 @@ bool ContentsExtract::DoItem(Item &Itm,int &Fd) // ContentsExtract::TakeContents - Load the contents data /*{{{*/ // --------------------------------------------------------------------- /* */ -bool ContentsExtract::TakeContents(const void *NewData,unsigned long Length) +bool ContentsExtract::TakeContents(const void *NewData,unsigned long long Length) { if (Length == 0) { @@ -378,7 +380,7 @@ bool ContentsExtract::TakeContents(const void *NewData,unsigned long Length) // ContentsExtract::Add - Read the contents data into the sorter /*{{{*/ // --------------------------------------------------------------------- /* */ -void ContentsExtract::Add(GenContents &Contents,string const &Package) +void ContentsExtract::Add(GenContents &Contents,std::string const &Package) { const char *Start = Data; char *Pkg = Contents.Mystrdup(Package.c_str()); diff --git a/ftparchive/contents.h b/ftparchive/contents.h index 5b5092b66..4af9db574 100644 --- a/ftparchive/contents.h +++ b/ftparchive/contents.h @@ -12,9 +12,10 @@ #include <stdlib.h> #include <stdio.h> -#include <apt-pkg/debfile.h> #include <apt-pkg/dirstream.h> +class debDebFile; + class GenContents { struct Node @@ -71,16 +72,16 @@ class ContentsExtract : public pkgDirStream // The Data Block char *Data; - unsigned long MaxSize; - unsigned long CurSize; + unsigned long long MaxSize; + unsigned long long CurSize; void AddData(const char *Text); bool Read(debDebFile &Deb); virtual bool DoItem(Item &Itm,int &Fd); void Reset() {CurSize = 0;}; - bool TakeContents(const void *Data,unsigned long Length); - void Add(GenContents &Contents,string const &Package); + bool TakeContents(const void *Data,unsigned long long Length); + void Add(GenContents &Contents,std::string const &Package); ContentsExtract() : Data(0), MaxSize(0), CurSize(0) {}; virtual ~ContentsExtract() {delete [] Data;}; diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc index f82879015..bf0f858d9 100644 --- a/ftparchive/multicompress.cc +++ b/ftparchive/multicompress.cc @@ -14,18 +14,20 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include "multicompress.h" - -#include <apti18n.h> +#include <config.h> + #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> #include <apt-pkg/md5.h> - + #include <sys/types.h> #include <sys/stat.h> #include <utime.h> #include <unistd.h> -#include <iostream> +#include <iostream> + +#include "multicompress.h" +#include <apti18n.h> /*}}}*/ using namespace std; @@ -48,11 +50,11 @@ MultiCompress::MultiCompress(string const &Output,string const &Compress, string::const_iterator I = Compress.begin(); for (; I != Compress.end();) { - for (; I != Compress.end() && isspace(*I); I++); + for (; I != Compress.end() && isspace(*I); ++I); // Grab a word string::const_iterator Start = I; - for (; I != Compress.end() && !isspace(*I); I++); + for (; I != Compress.end() && !isspace(*I); ++I); // Find the matching compressor std::vector<APT::Configuration::Compressor> Compressors = APT::Configuration::getCompressors(); @@ -129,11 +131,11 @@ bool MultiCompress::GetStat(string const &Output,string const &Compress,struct s bool DidStat = false; for (; I != Compress.end();) { - for (; I != Compress.end() && isspace(*I); I++); + for (; I != Compress.end() && isspace(*I); ++I); // Grab a word string::const_iterator Start = I; - for (; I != Compress.end() && !isspace(*I); I++); + for (; I != Compress.end() && !isspace(*I); ++I); // Find the matching compressor std::vector<APT::Configuration::Compressor> Compressors = APT::Configuration::getCompressors(); @@ -213,7 +215,7 @@ bool MultiCompress::Die() // MultiCompress::Finalize - Finish up writing /*{{{*/ // --------------------------------------------------------------------- /* This is only necessary for statistics reporting. */ -bool MultiCompress::Finalize(unsigned long &OutSize) +bool MultiCompress::Finalize(unsigned long long &OutSize) { OutSize = 0; if (Input == 0 || Die() == false) @@ -381,7 +383,7 @@ bool MultiCompress::Child(int const &FD) stash a hash of the data to use later. */ SetNonBlock(FD,false); unsigned char Buffer[32*1024]; - unsigned long FileSize = 0; + unsigned long long FileSize = 0; MD5Summation MD5; while (1) { @@ -443,7 +445,7 @@ bool MultiCompress::Child(int const &FD) // Compute the hash MD5Summation OldMD5; - unsigned long NewFileSize = 0; + unsigned long long NewFileSize = 0; while (1) { int Res = read(CompFd,Buffer,sizeof(Buffer)); diff --git a/ftparchive/multicompress.h b/ftparchive/multicompress.h index 19dede174..5496b06d0 100644 --- a/ftparchive/multicompress.h +++ b/ftparchive/multicompress.h @@ -16,11 +16,10 @@ #ifndef MULTICOMPRESS_H #define MULTICOMPRESS_H - - -#include <string> #include <apt-pkg/fileutl.h> #include <apt-pkg/aptconfiguration.h> + +#include <string> #include <stdio.h> #include <sys/types.h> @@ -29,7 +28,7 @@ class MultiCompress // An output file struct Files { - string Output; + std::string Output; APT::Configuration::Compressor CompressProg; Files *Next; FileFd TmpFile; @@ -54,12 +53,12 @@ class MultiCompress FILE *Input; unsigned long UpdateMTime; - bool Finalize(unsigned long &OutSize); + bool Finalize(unsigned long long &OutSize); bool OpenOld(int &Fd,pid_t &Proc); bool CloseOld(int Fd,pid_t Proc); - static bool GetStat(string const &Output,string const &Compress,struct stat &St); + static bool GetStat(std::string const &Output,std::string const &Compress,struct stat &St); - MultiCompress(string const &Output,string const &Compress, + MultiCompress(std::string const &Output,std::string const &Compress, mode_t const &Permissions, bool const &Write = true); ~MultiCompress(); }; diff --git a/ftparchive/override.cc b/ftparchive/override.cc index 3cf10b89b..d363fd0fe 100644 --- a/ftparchive/override.cc +++ b/ftparchive/override.cc @@ -10,14 +10,14 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include "override.h" - +#include <config.h> + #include <apti18n.h> #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> #include <stdio.h> - + #include "override.h" /*}}}*/ @@ -34,7 +34,7 @@ bool Override::ReadOverride(string const &File,bool const &Source) return _error->Errno("fopen",_("Unable to open %s"),File.c_str()); char Line[500]; - unsigned long Counter = 0; + unsigned long long Counter = 0; while (fgets(Line,sizeof(Line),F) != 0) { Counter++; @@ -57,7 +57,7 @@ bool Override::ReadOverride(string const &File,bool const &Source) for (; isspace(*End) == 0 && *End != 0; End++); if (*End == 0) { - _error->Warning(_("Malformed override %s line %lu #1"),File.c_str(), + _error->Warning(_("Malformed override %s line %llu #1"),File.c_str(), Counter); continue; } @@ -71,7 +71,7 @@ bool Override::ReadOverride(string const &File,bool const &Source) for (; isspace(*End) == 0 && *End != 0; End++); if (*End == 0) { - _error->Warning(_("Malformed override %s line %lu #2"),File.c_str(), + _error->Warning(_("Malformed override %s line %llu #2"),File.c_str(), Counter); continue; } @@ -85,7 +85,7 @@ bool Override::ReadOverride(string const &File,bool const &Source) for (; isspace(*End) == 0 && *End != 0; End++); if (*End == 0) { - _error->Warning(_("Malformed override %s line %lu #3"),File.c_str(), + _error->Warning(_("Malformed override %s line %llu #3"),File.c_str(), Counter); continue; } @@ -142,7 +142,7 @@ bool Override::ReadExtraOverride(string const &File,bool const &Source) return _error->Errno("fopen",_("Unable to open %s"),File.c_str()); char Line[500]; - unsigned long Counter = 0; + unsigned long long Counter = 0; while (fgets(Line,sizeof(Line),F) != 0) { Counter++; @@ -163,7 +163,7 @@ bool Override::ReadExtraOverride(string const &File,bool const &Source) for (; isspace(*End) == 0 && *End != 0; End++); if (*End == 0) { - _error->Warning(_("Malformed override %s line %lu #1"),File.c_str(), + _error->Warning(_("Malformed override %s line %llu #1"),File.c_str(), Counter); continue; } @@ -175,7 +175,7 @@ bool Override::ReadExtraOverride(string const &File,bool const &Source) for (; isspace(*End) == 0 && *End != 0; End++); if (*End == 0) { - _error->Warning(_("Malformed override %s line %lu #2"),File.c_str(), + _error->Warning(_("Malformed override %s line %llu #2"),File.c_str(), Counter); continue; } @@ -188,7 +188,7 @@ bool Override::ReadExtraOverride(string const &File,bool const &Source) for (; isspace(*(End-1)) && End > Value; End--); if (End == Value) { - _error->Warning(_("Malformed override %s line %lu #3"),File.c_str(), + _error->Warning(_("Malformed override %s line %llu #3"),File.c_str(), Counter); continue; } @@ -231,7 +231,7 @@ Override::Item* Override::GetItem(string const &Package, string const &Architect if (R->OldMaint != "") result->OldMaint = R->OldMaint; if (R->NewMaint != "") result->NewMaint = R->NewMaint; for (map<string,string>::const_iterator foI = R->FieldOverride.begin(); - foI != R->FieldOverride.end(); foI++) + foI != R->FieldOverride.end(); ++foI) { result->FieldOverride[foI->first] = foI->second; } @@ -268,7 +268,7 @@ string Override::Item::SwapMaint(string const &Orig,bool &Failed) string::const_iterator Start = End; for (; End < OldMaint.end() && (End + 3 >= OldMaint.end() || End[0] != ' ' || - End[1] != '/' || End[2] != '/'); End++); + End[1] != '/' || End[2] != '/'); ++End); if (stringcasecmp(Start,End,Orig.begin(),Orig.end()) == 0) return NewMaint; @@ -276,7 +276,7 @@ string Override::Item::SwapMaint(string const &Orig,bool &Failed) break; // Skip the divider and white space - for (; End < OldMaint.end() && (*End == '/' || *End == ' '); End++); + for (; End < OldMaint.end() && (*End == '/' || *End == ' '); ++End); } #else if (stringcasecmp(OldMaint.begin(),OldMaint.end(),Orig.begin(),Orig.end()) == 0) diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 60db8b990..27e53faf8 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -11,9 +11,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include "writer.h" - -#include <apti18n.h> +#include <config.h> + #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> @@ -30,10 +29,13 @@ #include <iostream> #include <sstream> #include <memory> - + +#include "writer.h" #include "cachedb.h" #include "apt-ftparchive.h" #include "multicompress.h" + +#include <apti18n.h> /*}}}*/ using namespace std; FTWScanner *FTWScanner::Owner; @@ -246,8 +248,8 @@ bool FTWScanner::LoadFileList(string const &Dir, string const &File) // --------------------------------------------------------------------- /* */ bool FTWScanner::Delink(string &FileName,const char *OriginalPath, - unsigned long &DeLinkBytes, - off_t const &FileSize) + unsigned long long &DeLinkBytes, + unsigned long long const &FileSize) { // See if this isn't an internaly prefix'd file name. if (InternalPrefix.empty() == false && @@ -377,7 +379,7 @@ bool PackagesWriter::DoPackage(string FileName) return false; } - off_t FileSize = Db.GetFileSize(); + unsigned long long FileSize = Db.GetFileSize(); if (Delink(FileName,OriginalPath,Stats.DeLinkBytes,FileSize) == false) return false; @@ -413,7 +415,7 @@ bool PackagesWriter::DoPackage(string FileName) } char Size[40]; - sprintf(Size,"%lu", (unsigned long) FileSize); + sprintf(Size,"%llu", (unsigned long long) FileSize); // Strip the DirStrip prefix from the FileName and add the PathPrefix string NewFileName; @@ -494,7 +496,7 @@ bool PackagesWriter::DoPackage(string FileName) } for (map<string,string>::const_iterator I = OverItem->FieldOverride.begin(); - I != OverItem->FieldOverride.end(); I++) + I != OverItem->FieldOverride.end(); ++I) SetTFRewriteData(Changes[End++],I->first.c_str(),I->second.c_str()); SetTFRewriteData(Changes[End++], 0, 0); @@ -610,7 +612,7 @@ bool SourcesWriter::DoPackage(string FileName) if (St.st_size > 128*1024) return _error->Error("DSC file '%s' is too large!",FileName.c_str()); - if (BufSize < (unsigned)St.st_size+1) + if (BufSize < (unsigned long long)St.st_size+1) { BufSize = St.st_size+1; Buffer = (char *)realloc(Buffer,St.st_size+1); @@ -830,7 +832,7 @@ bool SourcesWriter::DoPackage(string FileName) SetTFRewriteData(Changes[End++], "Maintainer", NewMaint.c_str()); for (map<string,string>::const_iterator I = SOverItem->FieldOverride.begin(); - I != SOverItem->FieldOverride.end(); I++) + I != SOverItem->FieldOverride.end(); ++I) SetTFRewriteData(Changes[End++],I->first.c_str(),I->second.c_str()); SetTFRewriteData(Changes[End++], 0, 0); @@ -1065,7 +1067,7 @@ void ReleaseWriter::Finish() for(map<string,struct CheckSum>::const_iterator I = CheckSums.begin(); I != CheckSums.end(); ++I) { - fprintf(Output, " %s %16ld %s\n", + fprintf(Output, " %s %16llu %s\n", (*I).second.MD5.c_str(), (*I).second.size, (*I).first.c_str()); @@ -1077,7 +1079,7 @@ void ReleaseWriter::Finish() for(map<string,struct CheckSum>::const_iterator I = CheckSums.begin(); I != CheckSums.end(); ++I) { - fprintf(Output, " %s %16ld %s\n", + fprintf(Output, " %s %16llu %s\n", (*I).second.SHA1.c_str(), (*I).second.size, (*I).first.c_str()); @@ -1089,7 +1091,7 @@ void ReleaseWriter::Finish() for(map<string,struct CheckSum>::const_iterator I = CheckSums.begin(); I != CheckSums.end(); ++I) { - fprintf(Output, " %s %16ld %s\n", + fprintf(Output, " %s %16llu %s\n", (*I).second.SHA256.c_str(), (*I).second.size, (*I).first.c_str()); @@ -1101,7 +1103,7 @@ void ReleaseWriter::Finish() I != CheckSums.end(); ++I) { - fprintf(Output, " %s %32ld %s\n", + fprintf(Output, " %s %16llu %s\n", (*I).second.SHA512.c_str(), (*I).second.size, (*I).first.c_str()); diff --git a/ftparchive/writer.h b/ftparchive/writer.h index c6026e954..76a3dfd1e 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -22,7 +22,6 @@ #include <set> #include "cachedb.h" -#include "multicompress.h" #include "override.h" #include "apt-ftparchive.h" @@ -31,7 +30,7 @@ using std::cout; using std::endl; using std::vector; using std::map; - + class FTWScanner { protected: @@ -48,7 +47,7 @@ class FTWScanner static int ScannerFile(const char *File, bool const &ReadLink); bool Delink(string &FileName,const char *OriginalPath, - unsigned long &Bytes,off_t const &FileSize); + unsigned long long &Bytes,unsigned long long const &FileSize); inline void NewLine(unsigned const &Priority) { @@ -81,6 +80,8 @@ class FTWScanner virtual ~FTWScanner() {}; }; +class MultiCompress; + class TranslationWriter { MultiCompress *Comp; @@ -159,7 +160,7 @@ class SourcesWriter : public FTWScanner Override BOver; Override SOver; char *Buffer; - unsigned long BufSize; + unsigned long long BufSize; public: @@ -198,7 +199,7 @@ protected: string SHA256; string SHA512; // Limited by FileFd::Size() - unsigned long size; + unsigned long long size; ~CheckSum() {}; }; map<string,struct CheckSum> CheckSums; diff --git a/methods/bzip2.cc b/methods/bzip2.cc index 42932dded..8e7e46557 100644 --- a/methods/bzip2.cc +++ b/methods/bzip2.cc @@ -13,11 +13,14 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/fileutl.h> #include <apt-pkg/error.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/strutl.h> #include <apt-pkg/hashes.h> +#include <apt-pkg/configuration.h> #include <sys/stat.h> #include <unistd.h> @@ -45,9 +48,9 @@ class Bzip2Method : public pkgAcqMethod bool Bzip2Method::Fetch(FetchItem *Itm) { URI Get = Itm->Uri; - string Path = Get.Host + Get.Path; // To account for relative paths + std::string Path = Get.Host + Get.Path; // To account for relative paths - string GzPathOption = "Dir::bin::"+string(Prog); + std::string GzPathOption = "Dir::bin::" + std::string(Prog); FetchResult Res; Res.Filename = Itm->DestFile; @@ -76,7 +79,7 @@ bool Bzip2Method::Fetch(FetchItem *Itm) SetCloseExec(STDOUT_FILENO,false); const char *Args[3]; - string Tmp = _config->Find(GzPathOption,Prog); + std::string Tmp = _config->Find(GzPathOption,Prog); Args[0] = Tmp.c_str(); Args[1] = "-d"; Args[2] = 0; diff --git a/methods/cdrom.cc b/methods/cdrom.cc index b25fdf5a8..e7114b168 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -8,12 +8,15 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/acquire-method.h> #include <apt-pkg/cdrom.h> #include <apt-pkg/cdromutl.h> #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> #include <apt-pkg/fileutl.h> +#include <apt-pkg/strutl.h> #include <apt-pkg/hashes.h> #include <sys/stat.h> @@ -54,7 +57,8 @@ class CDROMMethod : public pkgAcqMethod CDROMMethod::CDROMMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly | SendConfig | NeedsCleanup | Removable), - DatabaseLoaded(false), + DatabaseLoaded(false), + Debug(false), MountedByApt(false) { UdevCdroms.Dlopen(); diff --git a/methods/connect.cc b/methods/connect.cc index a5af1f1a6..9a092a43c 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -11,9 +11,12 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include "connect.h" +#include <config.h> + #include <apt-pkg/error.h> #include <apt-pkg/fileutl.h> +#include <apt-pkg/strutl.h> +#include <apt-pkg/acquire-method.h> #include <stdio.h> #include <errno.h> @@ -29,17 +32,18 @@ #include <arpa/inet.h> #include <netdb.h> +#include "connect.h" #include "rfc2553emu.h" #include <apti18n.h> /*}}}*/ -static string LastHost; +static std::string LastHost; static int LastPort = 0; static struct addrinfo *LastHostAddr = 0; static struct addrinfo *LastUsed = 0; // Set of IP/hostnames that we timed out before or couldn't resolve -static std::set<string> bad_addr; +static std::set<std::string> bad_addr; // RotateDNS - Select a new server from a DNS rotation /*{{{*/ // --------------------------------------------------------------------- @@ -56,7 +60,7 @@ void RotateDNS() // DoConnect - Attempt a connect operation /*{{{*/ // --------------------------------------------------------------------- /* This helper function attempts a connection to a single address. */ -static bool DoConnect(struct addrinfo *Addr,string Host, +static bool DoConnect(struct addrinfo *Addr,std::string Host, unsigned long TimeOut,int &Fd,pkgAcqMethod *Owner) { // Show a status indicator @@ -71,7 +75,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host, Owner->Status(_("Connecting to %s (%s)"),Host.c_str(),Name); // if that addr did timeout before, we do not try it again - if(bad_addr.find(string(Name)) != bad_addr.end()) + if(bad_addr.find(std::string(Name)) != bad_addr.end()) return false; /* If this is an IP rotation store the IP we are using.. If something goes @@ -98,7 +102,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host, /* This implements a timeout for connect by opening the connection nonblocking */ if (WaitFd(Fd,true,TimeOut) == false) { - bad_addr.insert(bad_addr.begin(), string(Name)); + bad_addr.insert(bad_addr.begin(), std::string(Name)); Owner->SetFailReason("Timeout"); return _error->Error(_("Could not connect to %s:%s (%s), " "connection timed out"),Host.c_str(),Service,Name); @@ -117,7 +121,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host, Owner->SetFailReason("ConnectionRefused"); else if (errno == ETIMEDOUT) Owner->SetFailReason("ConnectionTimedOut"); - bad_addr.insert(bad_addr.begin(), string(Name)); + bad_addr.insert(bad_addr.begin(), std::string(Name)); return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(), Service,Name); } @@ -128,7 +132,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host, // Connect - Connect to a server /*{{{*/ // --------------------------------------------------------------------- /* Performs a connection to the server */ -bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd, +bool Connect(std::string Host,int Port,const char *Service,int DefPort,int &Fd, unsigned long TimeOut,pkgAcqMethod *Owner) { if (_error->PendingError() == true) diff --git a/methods/connect.h b/methods/connect.h index 6f208e31d..bbe1bb35d 100644 --- a/methods/connect.h +++ b/methods/connect.h @@ -11,9 +11,10 @@ #define CONNECT_H #include <string> -#include <apt-pkg/acquire-method.h> -bool Connect(string To,int Port,const char *Service,int DefPort, +class pkgAcqMethod; + +bool Connect(std::string To,int Port,const char *Service,int DefPort, int &Fd,unsigned long TimeOut,pkgAcqMethod *Owner); void RotateDNS(); diff --git a/methods/copy.cc b/methods/copy.cc index a6bb372a3..f8d58e479 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -9,7 +9,10 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/fileutl.h> +#include <apt-pkg/strutl.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/error.h> #include <apt-pkg/hashes.h> @@ -35,7 +38,7 @@ class CopyMethod : public pkgAcqMethod bool CopyMethod::Fetch(FetchItem *Itm) { URI Get = Itm->Uri; - string File = Get.Path; + std::string File = Get.Path; // Stat the file and send a start message struct stat Buf; diff --git a/methods/file.cc b/methods/file.cc index 9cdd5bc2d..5025c996d 100644 --- a/methods/file.cc +++ b/methods/file.cc @@ -13,10 +13,13 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/acquire-method.h> #include <apt-pkg/error.h> #include <apt-pkg/hashes.h> #include <apt-pkg/fileutl.h> +#include <apt-pkg/strutl.h> #include <sys/stat.h> #include <unistd.h> @@ -38,7 +41,7 @@ class FileMethod : public pkgAcqMethod bool FileMethod::Fetch(FetchItem *Itm) { URI Get = Itm->Uri; - string File = Get.Path; + std::string File = Get.Path; FetchResult Res; if (Get.Host.empty() == false) return _error->Error(_("Invalid URI, local URIS must not start with //")); @@ -56,10 +59,10 @@ bool FileMethod::Fetch(FetchItem *Itm) } // See if we can compute a file without a .gz exentsion - string::size_type Pos = File.rfind(".gz"); + std::string::size_type Pos = File.rfind(".gz"); if (Pos + 3 == File.length()) { - File = string(File,0,Pos); + File = std::string(File,0,Pos); if (stat(File.c_str(),&Buf) == 0) { FetchResult AltRes; diff --git a/methods/ftp.cc b/methods/ftp.cc index 97248f900..2ca0ac6f7 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -15,11 +15,14 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/fileutl.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/error.h> #include <apt-pkg/hashes.h> #include <apt-pkg/netrc.h> +#include <apt-pkg/configuration.h> #include <sys/stat.h> #include <sys/time.h> @@ -30,7 +33,6 @@ #include <errno.h> #include <stdarg.h> #include <iostream> -#include <apti18n.h> // Internet stuff #include <netinet/in.h> @@ -41,6 +43,7 @@ #include "rfc2553emu.h" #include "connect.h" #include "ftp.h" +#include <apti18n.h> /*}}}*/ using namespace std; @@ -69,7 +72,8 @@ time_t FtpMethod::FailTime = 0; // --------------------------------------------------------------------- /* */ FTPConn::FTPConn(URI Srv) : Len(0), ServerFd(-1), DataFd(-1), - DataListenFd(-1), ServerName(Srv) + DataListenFd(-1), ServerName(Srv), + ForceExtended(false), TryPassive(true) { Debug = _config->FindB("Debug::Acquire::Ftp",false); PasvAddr = 0; @@ -559,7 +563,7 @@ bool FTPConn::ExtGoPasv() string::const_iterator List[4]; unsigned Count = 0; Pos++; - for (string::const_iterator I = Msg.begin() + Pos; I < Msg.end(); I++) + for (string::const_iterator I = Msg.begin() + Pos; I < Msg.end(); ++I) { if (*I != Msg[Pos]) continue; @@ -627,7 +631,7 @@ bool FTPConn::ExtGoPasv() // FTPConn::Size - Return the size of a file /*{{{*/ // --------------------------------------------------------------------- /* Grab the file size from the server, 0 means no size or empty file */ -bool FTPConn::Size(const char *Path,unsigned long &Size) +bool FTPConn::Size(const char *Path,unsigned long long &Size) { // Query the size unsigned int Tag; @@ -637,7 +641,7 @@ bool FTPConn::Size(const char *Path,unsigned long &Size) return false; char *End; - Size = strtol(Msg.c_str(),&End,10); + Size = strtoull(Msg.c_str(),&End,10); if (Tag >= 400 || End == Msg.c_str()) Size = 0; return true; @@ -839,7 +843,7 @@ bool FTPConn::Finalize() // --------------------------------------------------------------------- /* This opens a data connection, sends REST and RETR and then transfers the file over. */ -bool FTPConn::Get(const char *Path,FileFd &To,unsigned long Resume, +bool FTPConn::Get(const char *Path,FileFd &To,unsigned long long Resume, Hashes &Hash,bool &Missing) { Missing = false; @@ -1002,7 +1006,7 @@ bool FtpMethod::Fetch(FetchItem *Itm) // Get the files information Status(_("Query")); - unsigned long Size; + unsigned long long Size; if (Server->Size(File,Size) == false || Server->ModTime(File,FailTime) == false) { @@ -1024,7 +1028,7 @@ bool FtpMethod::Fetch(FetchItem *Itm) struct stat Buf; if (stat(Itm->DestFile.c_str(),&Buf) == 0) { - if (Size == (unsigned)Buf.st_size && FailTime == Buf.st_mtime) + if (Size == (unsigned long long)Buf.st_size && FailTime == Buf.st_mtime) { Res.Size = Buf.st_size; Res.LastModified = Buf.st_mtime; @@ -1034,7 +1038,7 @@ bool FtpMethod::Fetch(FetchItem *Itm) } // Resume? - if (FailTime == Buf.st_mtime && Size > (unsigned)Buf.st_size) + if (FailTime == Buf.st_mtime && Size > (unsigned long long)Buf.st_size) Res.ResumePoint = Buf.st_size; } diff --git a/methods/ftp.h b/methods/ftp.h index d7f1f7fbe..2634f0732 100644 --- a/methods/ftp.h +++ b/methods/ftp.h @@ -10,6 +10,10 @@ #ifndef APT_FTP_H #define APT_FTP_H +#include <apt-pkg/strutl.h> + +#include <string> + class FTPConn { char Buffer[1024*10]; @@ -33,7 +37,7 @@ class FTPConn socklen_t ServerAddrLen; // Private helper functions - bool ReadLine(string &Text); + bool ReadLine(std::string &Text); bool Login(); bool CreateDataFd(); bool Finalize(); @@ -43,8 +47,8 @@ class FTPConn bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port && Other.User == ServerName.User && Other.Password == ServerName.Password; }; // Raw connection IO - bool ReadResp(unsigned int &Ret,string &Text); - bool WriteMsg(unsigned int &Ret,string &Text,const char *Fmt,...); + bool ReadResp(unsigned int &Ret,std::string &Text); + bool WriteMsg(unsigned int &Ret,std::string &Text,const char *Fmt,...); // Connection control bool Open(pkgAcqMethod *Owner); @@ -53,9 +57,9 @@ class FTPConn bool ExtGoPasv(); // Query - bool Size(const char *Path,unsigned long &Size); + bool Size(const char *Path,unsigned long long &Size); bool ModTime(const char *Path, time_t &Time); - bool Get(const char *Path,FileFd &To,unsigned long Resume, + bool Get(const char *Path,FileFd &To,unsigned long long Resume, Hashes &MD5,bool &Missing); FTPConn(URI Srv); @@ -65,11 +69,11 @@ class FTPConn class FtpMethod : public pkgAcqMethod { virtual bool Fetch(FetchItem *Itm); - virtual bool Configuration(string Message); + virtual bool Configuration(std::string Message); FTPConn *Server; - static string FailFile; + static std::string FailFile; static int FailFd; static time_t FailTime; static void SigTerm(int); diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 960c06180..2b2aba017 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -1,9 +1,11 @@ +#include <config.h> + #include <apt-pkg/error.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/strutl.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/indexcopy.h> -#include <apti18n.h> +#include <apt-pkg/configuration.h> #include <utime.h> #include <stdio.h> @@ -12,9 +14,13 @@ #include <sys/wait.h> #include <iostream> #include <sstream> - #include <vector> +#include <apti18n.h> + +using std::string; +using std::vector; + #define GNUPGPREFIX "[GNUPG:]" #define GNUPGBADSIG "[GNUPG:] BADSIG" #define GNUPGNOPUBKEY "[GNUPG:] NO_PUBKEY" @@ -213,21 +219,21 @@ bool GPGVMethod::Fetch(FetchItem *Itm) { errmsg += _("The following signatures were invalid:\n"); for (vector<string>::iterator I = BadSigners.begin(); - I != BadSigners.end(); I++) + I != BadSigners.end(); ++I) errmsg += (*I + "\n"); } if (!WorthlessSigners.empty()) { errmsg += _("The following signatures were invalid:\n"); for (vector<string>::iterator I = WorthlessSigners.begin(); - I != WorthlessSigners.end(); I++) + I != WorthlessSigners.end(); ++I) errmsg += (*I + "\n"); } if (!NoPubKeySigners.empty()) { errmsg += _("The following signatures couldn't be verified because the public key is not available:\n"); for (vector<string>::iterator I = NoPubKeySigners.begin(); - I != NoPubKeySigners.end(); I++) + I != NoPubKeySigners.end(); ++I) errmsg += (*I + "\n"); } } diff --git a/methods/gzip.cc b/methods/gzip.cc index fc4e1ecfd..a51497948 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -9,6 +9,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/fileutl.h> #include <apt-pkg/error.h> #include <apt-pkg/acquire-method.h> @@ -39,7 +41,7 @@ class GzipMethod : public pkgAcqMethod bool GzipMethod::Fetch(FetchItem *Itm) { URI Get = Itm->Uri; - string Path = Get.Host + Get.Path; // To account for relative paths + std::string Path = Get.Host + Get.Path; // To account for relative paths FetchResult Res; Res.Filename = Itm->DestFile; @@ -62,7 +64,7 @@ bool GzipMethod::Fetch(FetchItem *Itm) while (1) { unsigned char Buffer[4*1024]; - unsigned long Count; + unsigned long long Count = 0; if (!From.Read(Buffer,sizeof(Buffer),&Count)) { diff --git a/methods/http.cc b/methods/http.cc index 13f9cbe06..0d81c73ed 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -25,8 +25,11 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/fileutl.h> #include <apt-pkg/acquire-method.h> +#include <apt-pkg/configuration.h> #include <apt-pkg/error.h> #include <apt-pkg/hashes.h> #include <apt-pkg/netrc.h> @@ -41,8 +44,6 @@ #include <string.h> #include <iostream> #include <map> -#include <apti18n.h> - // Internet stuff #include <netdb.h> @@ -51,6 +52,8 @@ #include "connect.h" #include "rfc2553emu.h" #include "http.h" + +#include <apti18n.h> /*}}}*/ using namespace std; @@ -63,15 +66,15 @@ bool AllowRedirect = false; bool Debug = false; URI Proxy; -unsigned long CircleBuf::BwReadLimit=0; -unsigned long CircleBuf::BwTickReadData=0; +unsigned long long CircleBuf::BwReadLimit=0; +unsigned long long CircleBuf::BwTickReadData=0; struct timeval CircleBuf::BwReadTick={0,0}; const unsigned int CircleBuf::BW_HZ=10; // CircleBuf::CircleBuf - Circular input buffer /*{{{*/ // --------------------------------------------------------------------- /* */ -CircleBuf::CircleBuf(unsigned long Size) : Size(Size), Hash(0) +CircleBuf::CircleBuf(unsigned long long Size) : Size(Size), Hash(0) { Buf = new unsigned char[Size]; Reset(); @@ -87,7 +90,7 @@ void CircleBuf::Reset() InP = 0; OutP = 0; StrPos = 0; - MaxGet = (unsigned int)-1; + MaxGet = (unsigned long long)-1; OutQueue = string(); if (Hash != 0) { @@ -102,7 +105,7 @@ void CircleBuf::Reset() is non-blocking.. */ bool CircleBuf::Read(int Fd) { - unsigned long BwReadMax; + unsigned long long BwReadMax; while (1) { @@ -117,7 +120,7 @@ bool CircleBuf::Read(int Fd) struct timeval now; gettimeofday(&now,0); - unsigned long d = (now.tv_sec-CircleBuf::BwReadTick.tv_sec)*1000000 + + unsigned long long d = (now.tv_sec-CircleBuf::BwReadTick.tv_sec)*1000000 + now.tv_usec-CircleBuf::BwReadTick.tv_usec; if(d > 1000000/BW_HZ) { CircleBuf::BwReadTick = now; @@ -131,7 +134,7 @@ bool CircleBuf::Read(int Fd) } // Write the buffer segment - int Res; + ssize_t Res; if(CircleBuf::BwReadLimit) { Res = read(Fd,Buf + (InP%Size), BwReadMax > LeftRead() ? LeftRead() : BwReadMax); @@ -180,7 +183,7 @@ void CircleBuf::FillOut() return; // Write the buffer segment - unsigned long Sz = LeftRead(); + unsigned long long Sz = LeftRead(); if (OutQueue.length() - StrPos < Sz) Sz = OutQueue.length() - StrPos; memcpy(Buf + (InP%Size),OutQueue.c_str() + StrPos,Sz); @@ -214,7 +217,7 @@ bool CircleBuf::Write(int Fd) return true; // Write the buffer segment - int Res; + ssize_t Res; Res = write(Fd,Buf + (OutP%Size),LeftWrite()); if (Res == 0) @@ -240,7 +243,7 @@ bool CircleBuf::Write(int Fd) bool CircleBuf::WriteTillEl(string &Data,bool Single) { // We cheat and assume it is unneeded to have more than one buffer load - for (unsigned long I = OutP; I < InP; I++) + for (unsigned long long I = OutP; I < InP; I++) { if (Buf[I%Size] != '\n') continue; @@ -258,7 +261,7 @@ bool CircleBuf::WriteTillEl(string &Data,bool Single) Data = ""; while (OutP < I) { - unsigned long Sz = LeftWrite(); + unsigned long long Sz = LeftWrite(); if (Sz == 0) return false; if (I - OutP < Sz) @@ -286,6 +289,11 @@ void CircleBuf::Stats() clog << "Got " << InP << " in " << Diff << " at " << InP/Diff << endl;*/ } /*}}}*/ +CircleBuf::~CircleBuf() +{ + delete [] Buf; + delete Hash; +} // ServerState::ServerState - Constructor /*{{{*/ // --------------------------------------------------------------------- @@ -402,10 +410,10 @@ ServerState::RunHeadersResult ServerState::RunHeaders() if (Debug == true) clog << Data; - for (string::const_iterator I = Data.begin(); I < Data.end(); I++) + for (string::const_iterator I = Data.begin(); I < Data.end(); ++I) { string::const_iterator J = I; - for (; J != Data.end() && *J != '\n' && *J != '\r';J++); + for (; J != Data.end() && *J != '\n' && *J != '\r'; ++J); if (HeaderLine(string(I,J)) == false) return RUN_HEADERS_PARSE_ERROR; I = J; @@ -453,7 +461,7 @@ bool ServerState::RunData() return false; // See if we are done - unsigned long Len = strtol(Data.c_str(),0,16); + unsigned long long Len = strtoull(Data.c_str(),0,16); if (Len == 0) { In.Limit(-1); @@ -596,7 +604,7 @@ bool ServerState::HeaderLine(string Line) if (StartPos != 0) return true; - if (sscanf(Val.c_str(),"%lu",&Size) != 1) + if (sscanf(Val.c_str(),"%llu",&Size) != 1) return _error->Error(_("The HTTP server sent an invalid Content-Length header")); return true; } @@ -611,9 +619,9 @@ bool ServerState::HeaderLine(string Line) { HaveContent = true; - if (sscanf(Val.c_str(),"bytes %lu-%*u/%lu",&StartPos,&Size) != 2) + if (sscanf(Val.c_str(),"bytes %llu-%*u/%llu",&StartPos,&Size) != 2) return _error->Error(_("The HTTP server sent an invalid Content-Range header")); - if ((unsigned)StartPos > Size) + if ((unsigned long long)StartPos > Size) return _error->Error(_("This HTTP server has broken range support")); return true; } @@ -716,7 +724,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out) if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0) { // In this case we send an if-range query with a range header - sprintf(Buf,"Range: bytes=%li-\r\nIf-Range: %s\r\n",(long)SBuf.st_size - 1, + sprintf(Buf,"Range: bytes=%lli-\r\nIf-Range: %s\r\n",(long long)SBuf.st_size - 1, TimeRFC1123(SBuf.st_mtime).c_str()); Req += Buf; } @@ -1325,7 +1333,7 @@ int HttpMethod::Loop() StopRedirects = true; else { - for (StringVectorIterator I = R.begin(); I != R.end(); I++) + for (StringVectorIterator I = R.begin(); I != R.end(); ++I) if (Queue->Uri == *I) { R[0] = "STOP"; diff --git a/methods/http.h b/methods/http.h index aa96c6810..c73d4df5c 100644 --- a/methods/http.h +++ b/methods/http.h @@ -13,39 +13,42 @@ #define MAXLEN 360 -#include <apt-pkg/hashes.h> +#include <apt-pkg/strutl.h> + +#include <string> using std::cout; using std::endl; class HttpMethod; +class Hashes; class CircleBuf { unsigned char *Buf; - unsigned long Size; - unsigned long InP; - unsigned long OutP; - string OutQueue; - unsigned long StrPos; - unsigned long MaxGet; + unsigned long long Size; + unsigned long long InP; + unsigned long long OutP; + std::string OutQueue; + unsigned long long StrPos; + unsigned long long MaxGet; struct timeval Start; - static unsigned long BwReadLimit; - static unsigned long BwTickReadData; + static unsigned long long BwReadLimit; + static unsigned long long BwTickReadData; static struct timeval BwReadTick; static const unsigned int BW_HZ; - unsigned long LeftRead() + unsigned long long LeftRead() const { - unsigned long Sz = Size - (InP - OutP); + unsigned long long Sz = Size - (InP - OutP); if (Sz > Size - (InP%Size)) Sz = Size - (InP%Size); return Sz; } - unsigned long LeftWrite() + unsigned long long LeftWrite() const { - unsigned long Sz = InP - OutP; + unsigned long long Sz = InP - OutP; if (InP > MaxGet) Sz = MaxGet - OutP; if (Sz > Size - (OutP%Size)) @@ -60,27 +63,27 @@ class CircleBuf // Read data in bool Read(int Fd); - bool Read(string Data); + bool Read(std::string Data); // Write data out bool Write(int Fd); - bool WriteTillEl(string &Data,bool Single = false); + bool WriteTillEl(std::string &Data,bool Single = false); // Control the write limit - void Limit(long Max) {if (Max == -1) MaxGet = 0-1; else MaxGet = OutP + Max;} - bool IsLimit() {return MaxGet == OutP;}; - void Print() {cout << MaxGet << ',' << OutP << endl;}; + void Limit(long long Max) {if (Max == -1) MaxGet = 0-1; else MaxGet = OutP + Max;} + bool IsLimit() const {return MaxGet == OutP;}; + void Print() const {cout << MaxGet << ',' << OutP << endl;}; // Test for free space in the buffer - bool ReadSpace() {return Size - (InP - OutP) > 0;}; - bool WriteSpace() {return InP - OutP > 0;}; + bool ReadSpace() const {return Size - (InP - OutP) > 0;}; + bool WriteSpace() const {return InP - OutP > 0;}; // Dump everything void Reset(); void Stats(); - CircleBuf(unsigned long Size); - ~CircleBuf() {delete [] Buf; delete Hash;}; + CircleBuf(unsigned long long Size); + ~CircleBuf(); }; struct ServerState @@ -92,14 +95,14 @@ struct ServerState char Code[MAXLEN]; // These are some statistics from the last parsed header lines - unsigned long Size; - signed long StartPos; + unsigned long long Size; + signed long long StartPos; time_t Date; bool HaveContent; enum {Chunked,Stream,Closes} Encoding; enum {Header, Data} State; bool Persistent; - string Location; + std::string Location; // This is a Persistent attribute of the server itself. bool Pipeline; @@ -112,8 +115,8 @@ struct ServerState int ServerFd; URI ServerName; - bool HeaderLine(string Line); - bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;}; + bool HeaderLine(std::string Line); + bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;}; void Reset() {Major = 0; Minor = 0; Result = 0; Size = 0; StartPos = 0; Encoding = Closes; time(&Date); ServerFd = -1; Pipeline = true;}; @@ -167,10 +170,10 @@ class HttpMethod : public pkgAcqMethod /** \brief Try to AutoDetect the proxy */ bool AutoDetectProxy(); - virtual bool Configuration(string Message); + virtual bool Configuration(std::string Message); // In the event of a fatal signal this file will be closed and timestamped. - static string FailFile; + static std::string FailFile; static int FailFd; static time_t FailTime; static void SigTerm(int); @@ -178,8 +181,8 @@ class HttpMethod : public pkgAcqMethod protected: virtual bool Fetch(FetchItem *); - string NextURI; - string AutoDetectProxyCmd; + std::string NextURI; + std::string AutoDetectProxyCmd; public: friend struct ServerState; diff --git a/methods/http_main.cc b/methods/http_main.cc index 7815c2fc1..2ca91bfc9 100644 --- a/methods/http_main.cc +++ b/methods/http_main.cc @@ -1,3 +1,5 @@ +#include <config.h> + #include <apt-pkg/fileutl.h> #include <apt-pkg/acquire-method.h> #include <signal.h> diff --git a/methods/https.cc b/methods/https.cc index 668a329e6..335699907 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -10,11 +10,14 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/fileutl.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/error.h> #include <apt-pkg/hashes.h> #include <apt-pkg/netrc.h> +#include <apt-pkg/configuration.h> #include <sys/stat.h> #include <sys/time.h> @@ -25,12 +28,11 @@ #include <errno.h> #include <string.h> #include <iostream> -#include <apti18n.h> #include <sstream> #include "config.h" #include "https.h" - +#include <apti18n.h> /*}}}*/ using namespace std; @@ -51,7 +53,7 @@ HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow, { HttpsMethod *me = (HttpsMethod *)clientp; if(dltotal > 0 && me->Res.Size == 0) { - me->Res.Size = (unsigned long)dltotal; + me->Res.Size = (unsigned long long)dltotal; me->URIStart(me->Res); } return 0; diff --git a/methods/https.h b/methods/https.h index 3f0c416b6..b7adeb880 100644 --- a/methods/https.h +++ b/methods/https.h @@ -20,7 +20,7 @@ using std::cout; using std::endl; class HttpsMethod; - +class FileFd; class HttpsMethod : public pkgAcqMethod { @@ -45,6 +45,7 @@ class HttpsMethod : public pkgAcqMethod }; }; +#include <apt-pkg/strutl.h> URI Proxy; #endif diff --git a/methods/mirror.cc b/methods/mirror.cc index 7f28c04cb..3d5983efa 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -8,6 +8,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include <config.h> + #include <apt-pkg/aptconfiguration.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/acquire-method.h> @@ -16,7 +18,8 @@ #include <apt-pkg/error.h> #include <apt-pkg/hashes.h> #include <apt-pkg/sourcelist.h> - +#include <apt-pkg/configuration.h> +#include <apt-pkg/metaindex.h> #include <algorithm> #include <fstream> @@ -34,7 +37,7 @@ using namespace std; #include "mirror.h" #include "http.h" -#include "apti18n.h" +#include <apti18n.h> /*}}}*/ /* Done: @@ -55,7 +58,7 @@ using namespace std; */ MirrorMethod::MirrorMethod() - : HttpMethod(), DownloadedMirrorFile(false) + : HttpMethod(), DownloadedMirrorFile(false), Debug(false) { }; @@ -108,7 +111,7 @@ bool MirrorMethod::Clean(string Dir) continue; // see if we have that uri - for(I=list.begin(); I != list.end(); I++) + for(I=list.begin(); I != list.end(); ++I) { string uri = (*I)->GetURI(); if(uri.find("mirror://") != 0) @@ -346,7 +349,7 @@ string MirrorMethod::GetMirrorFileName(string mirror_uri_str) vector<metaIndex *>::const_iterator I; pkgSourceList list; list.ReadMainList(); - for(I=list.begin(); I != list.end(); I++) + for(I=list.begin(); I != list.end(); ++I) { string uristr = (*I)->GetURI(); if(Debug) diff --git a/methods/mirror.h b/methods/mirror.h index 97d18144a..81e531e21 100644 --- a/methods/mirror.h +++ b/methods/mirror.h @@ -11,8 +11,9 @@ #ifndef APT_MIRROR_H #define APT_MIRROR_H - #include <iostream> +#include <string> +#include <vector> using std::cout; using std::cerr; @@ -24,29 +25,29 @@ class MirrorMethod : public HttpMethod { FetchResult Res; // we simply transform between BaseUri and Mirror - string BaseUri; // the original mirror://... url - string Mirror; // the selected mirror uri (http://...) - vector<string> AllMirrors; // all available mirrors - string MirrorFile; // the file that contains the list of mirrors + std::string BaseUri; // the original mirror://... url + std::string Mirror; // the selected mirror uri (http://...) + std::vector<std::string> AllMirrors; // all available mirrors + std::string MirrorFile; // the file that contains the list of mirrors bool DownloadedMirrorFile; // already downloaded this session - string Dist; // the target distrubtion (e.g. sid, oneiric) + std::string Dist; // the target distrubtion (e.g. sid, oneiric) bool Debug; protected: - bool DownloadMirrorFile(string uri); - bool RandomizeMirrorFile(string file); - string GetMirrorFileName(string uri); + bool DownloadMirrorFile(std::string uri); + bool RandomizeMirrorFile(std::string file); + std::string GetMirrorFileName(std::string uri); bool InitMirrors(); bool TryNextMirror(); void CurrentQueueUriToMirror(); - bool Clean(string dir); + bool Clean(std::string dir); // we need to overwrite those to transform the url back - virtual void Fail(string Why, bool Transient = false); + virtual void Fail(std::string Why, bool Transient = false); virtual void URIStart(FetchResult &Res); virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0); - virtual bool Configuration(string Message); + virtual bool Configuration(std::string Message); public: MirrorMethod(); diff --git a/methods/rfc2553emu.cc b/methods/rfc2553emu.cc index 66bc906e9..f00e85889 100644 --- a/methods/rfc2553emu.cc +++ b/methods/rfc2553emu.cc @@ -14,12 +14,14 @@ ##################################################################### */ /*}}}*/ -#include "rfc2553emu.h" +#include <config.h> + #include <stdlib.h> #include <arpa/inet.h> #include <netinet/in.h> #include <string.h> #include <stdio.h> +#include "rfc2553emu.h" #ifndef HAVE_GETADDRINFO // getaddrinfo - Resolve a hostname /*{{{*/ diff --git a/methods/rred.cc b/methods/rred.cc index 849973e1a..ef00fcaa3 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -1,10 +1,13 @@ // Includes /*{{{*/ +#include <config.h> + #include <apt-pkg/fileutl.h> #include <apt-pkg/mmap.h> #include <apt-pkg/error.h> #include <apt-pkg/acquire-method.h> #include <apt-pkg/strutl.h> #include <apt-pkg/hashes.h> +#include <apt-pkg/configuration.h> #include <sys/stat.h> #include <sys/uio.h> @@ -51,7 +54,7 @@ protected: virtual bool Fetch(FetchItem *Itm); public: - RredMethod() : pkgAcqMethod("1.1",SingleInstance | SendConfig) {}; + RredMethod() : pkgAcqMethod("1.1",SingleInstance | SendConfig), Debug(false) {}; }; /*}}}*/ /** \brief applyFile - in reverse order with a tail recursion {{{ @@ -239,7 +242,9 @@ RredMethod::State RredMethod::patchFile(FileFd &Patch, FileFd &From, /*{{{*/ return result; } /*}}}*/ -struct EdCommand { /*{{{*/ +/* struct EdCommand {{{*/ +#ifdef _POSIX_MAPPED_FILES +struct EdCommand { size_t data_start; size_t data_end; size_t data_lines; @@ -248,13 +253,14 @@ struct EdCommand { /*{{{*/ char type; }; #define IOV_COUNT 1024 /* Don't really want IOV_MAX since it can be arbitrarily large */ +#endif /*}}}*/ RredMethod::State RredMethod::patchMMap(FileFd &Patch, FileFd &From, /*{{{*/ FileFd &out_file, Hashes *hash) const { #ifdef _POSIX_MAPPED_FILES MMap ed_cmds(MMap::ReadOnly); if (Patch.gzFd() != NULL) { - unsigned long mapSize = Patch.Size(); + unsigned long long mapSize = Patch.Size(); DynamicMMap* dyn = new DynamicMMap(0, mapSize, 0); if (dyn->validData() == false) { delete dyn; @@ -467,7 +473,7 @@ bool RredMethod::Fetch(FetchItem *Itm) /*{{{*/ { Debug = _config->FindB("Debug::pkgAcquire::RRed", false); URI Get = Itm->Uri; - string Path = Get.Host + Get.Path; // To account for relative paths + std::string Path = Get.Host + Get.Path; // To account for relative paths FetchResult Res; Res.Filename = Itm->DestFile; @@ -520,7 +526,7 @@ bool RredMethod::Fetch(FetchItem *Itm) /*{{{*/ and use the access time from the "old" file */ struct stat BufBase, BufPatch; if (stat(Path.c_str(),&BufBase) != 0 || - stat(string(Path+".ed").c_str(),&BufPatch) != 0) + stat(std::string(Path+".ed").c_str(),&BufPatch) != 0) return _error->Errno("stat",_("Failed to stat")); struct utimbuf TimeBuf; diff --git a/methods/rsh.cc b/methods/rsh.cc index 21f0d0a22..da9777fc4 100644 --- a/methods/rsh.cc +++ b/methods/rsh.cc @@ -11,8 +11,12 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include "rsh.h" +#include <config.h> + #include <apt-pkg/error.h> +#include <apt-pkg/fileutl.h> +#include <apt-pkg/hashes.h> +#include <apt-pkg/configuration.h> #include <sys/stat.h> #include <sys/time.h> @@ -22,6 +26,8 @@ #include <stdio.h> #include <errno.h> #include <stdarg.h> +#include "rsh.h" + #include <apti18n.h> /*}}}*/ @@ -29,7 +35,7 @@ const char *Prog; unsigned long TimeOut = 120; Configuration::Item const *RshOptions = 0; time_t RSHMethod::FailTime = 0; -string RSHMethod::FailFile; +std::string RSHMethod::FailFile; int RSHMethod::FailFd = -1; // RSHConn::RSHConn - Constructor /*{{{*/ @@ -82,7 +88,7 @@ bool RSHConn::Open() // RSHConn::Connect - Fire up rsh and connect /*{{{*/ // --------------------------------------------------------------------- /* */ -bool RSHConn::Connect(string Host, string User) +bool RSHConn::Connect(std::string Host, std::string User) { // Create the pipes int Pipes[4] = {-1,-1,-1,-1}; @@ -151,7 +157,7 @@ bool RSHConn::Connect(string Host, string User) // RSHConn::ReadLine - Very simple buffered read with timeout /*{{{*/ // --------------------------------------------------------------------- /* */ -bool RSHConn::ReadLine(string &Text) +bool RSHConn::ReadLine(std::string &Text) { if (Process == -1 || ReadFd == -1) return false; @@ -171,7 +177,7 @@ bool RSHConn::ReadLine(string &Text) continue; I++; - Text = string(Buffer,I); + Text = std::string(Buffer,I); memmove(Buffer,Buffer+I,Len - I); Len -= I; return true; @@ -202,7 +208,7 @@ bool RSHConn::ReadLine(string &Text) // --------------------------------------------------------------------- /* The remote sync flag appends a || echo which will insert blank line once the command completes. */ -bool RSHConn::WriteMsg(string &Text,bool Sync,const char *Fmt,...) +bool RSHConn::WriteMsg(std::string &Text,bool Sync,const char *Fmt,...) { va_list args; va_start(args,Fmt); @@ -248,10 +254,10 @@ bool RSHConn::WriteMsg(string &Text,bool Sync,const char *Fmt,...) // --------------------------------------------------------------------- /* Right now for successfull transfer the file size must be known in advance. */ -bool RSHConn::Size(const char *Path,unsigned long &Size) +bool RSHConn::Size(const char *Path,unsigned long long &Size) { // Query the size - string Msg; + std::string Msg; Size = 0; if (WriteMsg(Msg,true,"find %s -follow -printf '%%s\\n'",Path) == false) @@ -260,7 +266,7 @@ bool RSHConn::Size(const char *Path,unsigned long &Size) // FIXME: Sense if the bad reply is due to a File Not Found. char *End; - Size = strtoul(Msg.c_str(),&End,10); + Size = strtoull(Msg.c_str(),&End,10); if (End == Msg.c_str()) return _error->Error(_("File not found")); return true; @@ -273,7 +279,7 @@ bool RSHConn::ModTime(const char *Path, time_t &Time) { Time = time(&Time); // Query the mod time - string Msg; + std::string Msg; if (WriteMsg(Msg,true,"TZ=UTC find %s -follow -printf '%%TY%%Tm%%Td%%TH%%TM%%TS\\n'",Path) == false) return false; @@ -285,8 +291,8 @@ bool RSHConn::ModTime(const char *Path, time_t &Time) // RSHConn::Get - Get a file /*{{{*/ // --------------------------------------------------------------------- /* */ -bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume, - Hashes &Hash,bool &Missing, unsigned long Size) +bool RSHConn::Get(const char *Path,FileFd &To,unsigned long long Resume, + Hashes &Hash,bool &Missing, unsigned long long Size) { Missing = false; @@ -306,12 +312,12 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume, } // FIXME: Detect file-not openable type errors. - string Jnk; + std::string Jnk; if (WriteMsg(Jnk,false,"dd if=%s bs=2048 skip=%u", Path, Resume / 2048) == false) return false; // Copy loop - unsigned int MyLen = Resume; + unsigned long long MyLen = Resume; unsigned char Buffer[4096]; while (MyLen < Size) { @@ -363,7 +369,7 @@ RSHMethod::RSHMethod() : pkgAcqMethod("1.0",SendConfig) /*}}}*/ // RSHMethod::Configuration - Handle a configuration message /*{{{*/ // --------------------------------------------------------------------- -bool RSHMethod::Configuration(string Message) +bool RSHMethod::Configuration(std::string Message) { char ProgStr[100]; @@ -425,7 +431,7 @@ bool RSHMethod::Fetch(FetchItem *Itm) Status(_("Connecting to %s"), Get.Host.c_str()); // Get the files information - unsigned long Size; + unsigned long long Size; if (Server->Size(File,Size) == false || Server->ModTime(File,FailTime) == false) { @@ -446,7 +452,7 @@ bool RSHMethod::Fetch(FetchItem *Itm) // See if the file exists struct stat Buf; if (stat(Itm->DestFile.c_str(),&Buf) == 0) { - if (Size == (unsigned)Buf.st_size && FailTime == Buf.st_mtime) { + if (Size == (unsigned long long)Buf.st_size && FailTime == Buf.st_mtime) { Res.Size = Buf.st_size; Res.LastModified = Buf.st_mtime; Res.ResumePoint = Buf.st_size; @@ -455,7 +461,7 @@ bool RSHMethod::Fetch(FetchItem *Itm) } // Resume? - if (FailTime == Buf.st_mtime && Size > (unsigned)Buf.st_size) + if (FailTime == Buf.st_mtime && Size > (unsigned long long)Buf.st_size) Res.ResumePoint = Buf.st_size; } diff --git a/methods/rsh.h b/methods/rsh.h index b06d5a94e..d7efa3f06 100644 --- a/methods/rsh.h +++ b/methods/rsh.h @@ -12,9 +12,9 @@ #include <string> #include <apt-pkg/strutl.h> -#include <apt-pkg/hashes.h> -#include <apt-pkg/acquire-method.h> -#include <apt-pkg/fileutl.h> + +class Hashes; +class FileFd; class RSHConn { @@ -25,39 +25,41 @@ class RSHConn URI ServerName; // Private helper functions - bool ReadLine(string &Text); + bool ReadLine(std::string &Text); public: pid_t Process; // Raw connection IO - bool WriteMsg(string &Text,bool Sync,const char *Fmt,...); - bool Connect(string Host, string User); - bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;}; + bool WriteMsg(std::string &Text,bool Sync,const char *Fmt,...); + bool Connect(std::string Host, std::string User); + bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;}; // Connection control bool Open(); void Close(); // Query - bool Size(const char *Path,unsigned long &Size); + bool Size(const char *Path,unsigned long long &Size); bool ModTime(const char *Path, time_t &Time); - bool Get(const char *Path,FileFd &To,unsigned long Resume, - Hashes &Hash,bool &Missing, unsigned long Size); + bool Get(const char *Path,FileFd &To,unsigned long long Resume, + Hashes &Hash,bool &Missing, unsigned long long Size); RSHConn(URI Srv); ~RSHConn(); }; +#include <apt-pkg/acquire-method.h> + class RSHMethod : public pkgAcqMethod { virtual bool Fetch(FetchItem *Itm); - virtual bool Configuration(string Message); + virtual bool Configuration(std::string Message); RSHConn *Server; - static string FailFile; + static std::string FailFile; static int FailFd; static time_t FailTime; static void SigTerm(int); diff --git a/po/apt-all.pot b/po/apt-all.pot index b409363d0..8e4d9d62b 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-29 12:34+0100\n" +"POT-Creation-Date: 2011-10-30 13:46-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,150 +17,150 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: cmdline/apt-cache.cc:154 +#: cmdline/apt-cache.cc:158 #, c-format msgid "Package %s version %s has an unmet dep:\n" msgstr "" -#: cmdline/apt-cache.cc:282 +#: cmdline/apt-cache.cc:286 msgid "Total package names: " msgstr "" -#: cmdline/apt-cache.cc:284 +#: cmdline/apt-cache.cc:288 msgid "Total package structures: " msgstr "" -#: cmdline/apt-cache.cc:324 +#: cmdline/apt-cache.cc:328 msgid " Normal packages: " msgstr "" -#: cmdline/apt-cache.cc:325 +#: cmdline/apt-cache.cc:329 msgid " Pure virtual packages: " msgstr "" -#: cmdline/apt-cache.cc:326 +#: cmdline/apt-cache.cc:330 msgid " Single virtual packages: " msgstr "" -#: cmdline/apt-cache.cc:327 +#: cmdline/apt-cache.cc:331 msgid " Mixed virtual packages: " msgstr "" -#: cmdline/apt-cache.cc:328 +#: cmdline/apt-cache.cc:332 msgid " Missing: " msgstr "" -#: cmdline/apt-cache.cc:330 +#: cmdline/apt-cache.cc:334 msgid "Total distinct versions: " msgstr "" -#: cmdline/apt-cache.cc:332 +#: cmdline/apt-cache.cc:336 msgid "Total distinct descriptions: " msgstr "" -#: cmdline/apt-cache.cc:334 +#: cmdline/apt-cache.cc:338 msgid "Total dependencies: " msgstr "" -#: cmdline/apt-cache.cc:337 +#: cmdline/apt-cache.cc:341 msgid "Total ver/file relations: " msgstr "" -#: cmdline/apt-cache.cc:339 +#: cmdline/apt-cache.cc:343 msgid "Total Desc/File relations: " msgstr "" -#: cmdline/apt-cache.cc:341 +#: cmdline/apt-cache.cc:345 msgid "Total Provides mappings: " msgstr "" -#: cmdline/apt-cache.cc:353 +#: cmdline/apt-cache.cc:357 msgid "Total globbed strings: " msgstr "" -#: cmdline/apt-cache.cc:367 +#: cmdline/apt-cache.cc:371 msgid "Total dependency version space: " msgstr "" -#: cmdline/apt-cache.cc:372 +#: cmdline/apt-cache.cc:376 msgid "Total slack space: " msgstr "" -#: cmdline/apt-cache.cc:380 +#: cmdline/apt-cache.cc:384 msgid "Total space accounted for: " msgstr "" -#: cmdline/apt-cache.cc:511 cmdline/apt-cache.cc:1139 +#: cmdline/apt-cache.cc:515 cmdline/apt-cache.cc:1143 #, c-format msgid "Package file %s is out of sync." msgstr "" -#: cmdline/apt-cache.cc:589 cmdline/apt-cache.cc:1374 -#: cmdline/apt-cache.cc:1376 cmdline/apt-cache.cc:1453 cmdline/apt-mark.cc:37 -#: cmdline/apt-mark.cc:84 cmdline/apt-mark.cc:160 +#: cmdline/apt-cache.cc:593 cmdline/apt-cache.cc:1378 +#: cmdline/apt-cache.cc:1380 cmdline/apt-cache.cc:1457 cmdline/apt-mark.cc:39 +#: cmdline/apt-mark.cc:86 cmdline/apt-mark.cc:162 msgid "No packages found" msgstr "" -#: cmdline/apt-cache.cc:1218 +#: cmdline/apt-cache.cc:1222 msgid "You must give at least one search pattern" msgstr "" -#: cmdline/apt-cache.cc:1353 +#: cmdline/apt-cache.cc:1357 msgid "This command is deprecated. Please use 'apt-mark showauto' instead." msgstr "" -#: cmdline/apt-cache.cc:1448 apt-pkg/cacheset.cc:440 +#: cmdline/apt-cache.cc:1452 apt-pkg/cacheset.cc:445 #, c-format msgid "Unable to locate package %s" msgstr "" -#: cmdline/apt-cache.cc:1478 +#: cmdline/apt-cache.cc:1482 msgid "Package files:" msgstr "" -#: cmdline/apt-cache.cc:1485 cmdline/apt-cache.cc:1576 +#: cmdline/apt-cache.cc:1489 cmdline/apt-cache.cc:1580 msgid "Cache is out of sync, can't x-ref a package file" msgstr "" #. Show any packages have explicit pins -#: cmdline/apt-cache.cc:1499 +#: cmdline/apt-cache.cc:1503 msgid "Pinned packages:" msgstr "" -#: cmdline/apt-cache.cc:1511 cmdline/apt-cache.cc:1556 +#: cmdline/apt-cache.cc:1515 cmdline/apt-cache.cc:1560 msgid "(not found)" msgstr "" -#: cmdline/apt-cache.cc:1519 +#: cmdline/apt-cache.cc:1523 msgid " Installed: " msgstr "" -#: cmdline/apt-cache.cc:1520 +#: cmdline/apt-cache.cc:1524 msgid " Candidate: " msgstr "" -#: cmdline/apt-cache.cc:1538 cmdline/apt-cache.cc:1546 +#: cmdline/apt-cache.cc:1542 cmdline/apt-cache.cc:1550 msgid "(none)" msgstr "" -#: cmdline/apt-cache.cc:1553 +#: cmdline/apt-cache.cc:1557 msgid " Package pin: " msgstr "" #. Show the priority tables -#: cmdline/apt-cache.cc:1562 +#: cmdline/apt-cache.cc:1566 msgid " Version table:" msgstr "" -#: cmdline/apt-cache.cc:1675 cmdline/apt-cdrom.cc:197 cmdline/apt-config.cc:73 -#: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:589 -#: cmdline/apt-get.cc:3126 cmdline/apt-internal-solver.cc:30 -#: cmdline/apt-mark.cc:264 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-cache.cc:1679 cmdline/apt-cdrom.cc:199 cmdline/apt-config.cc:75 +#: cmdline/apt-extracttemplates.cc:227 ftparchive/apt-ftparchive.cc:590 +#: cmdline/apt-get.cc:3244 cmdline/apt-internal-solver.cc:32 +#: cmdline/apt-mark.cc:266 cmdline/apt-sortpkgs.cc:147 #, c-format msgid "%s %s for %s compiled on %s %s\n" msgstr "" -#: cmdline/apt-cache.cc:1682 +#: cmdline/apt-cache.cc:1686 msgid "" "Usage: apt-cache [options] command\n" " apt-cache [options] showpkg pkg1 [pkg2 ...]\n" @@ -197,28 +197,28 @@ msgid "" "See the apt-cache(8) and apt.conf(5) manual pages for more information.\n" msgstr "" -#: cmdline/apt-cdrom.cc:77 +#: cmdline/apt-cdrom.cc:79 msgid "Please provide a name for this Disc, such as 'Debian 5.0.3 Disk 1'" msgstr "" -#: cmdline/apt-cdrom.cc:92 +#: cmdline/apt-cdrom.cc:94 msgid "Please insert a Disc in the drive and press enter" msgstr "" -#: cmdline/apt-cdrom.cc:127 +#: cmdline/apt-cdrom.cc:129 #, c-format msgid "Failed to mount '%s' to '%s'" msgstr "" -#: cmdline/apt-cdrom.cc:162 +#: cmdline/apt-cdrom.cc:164 msgid "Repeat this process for the rest of the CDs in your set." msgstr "" -#: cmdline/apt-config.cc:44 +#: cmdline/apt-config.cc:46 msgid "Arguments not in pairs" msgstr "" -#: cmdline/apt-config.cc:79 +#: cmdline/apt-config.cc:81 msgid "" "Usage: apt-config [options] command\n" "\n" @@ -234,12 +234,12 @@ msgid "" " -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n" msgstr "" -#: cmdline/apt-extracttemplates.cc:98 +#: cmdline/apt-extracttemplates.cc:100 #, c-format msgid "%s not a valid DEB package." msgstr "" -#: cmdline/apt-extracttemplates.cc:232 +#: cmdline/apt-extracttemplates.cc:234 msgid "" "Usage: apt-extracttemplates file1 [file2 ...]\n" "\n" @@ -253,40 +253,40 @@ msgid "" " -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n" msgstr "" -#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:1149 +#: cmdline/apt-extracttemplates.cc:269 apt-pkg/pkgcachegen.cc:1269 #, c-format msgid "Unable to write to %s" msgstr "" -#: cmdline/apt-extracttemplates.cc:309 +#: cmdline/apt-extracttemplates.cc:311 msgid "Cannot get debconf version. Is debconf installed?" msgstr "" -#: ftparchive/apt-ftparchive.cc:170 ftparchive/apt-ftparchive.cc:347 +#: ftparchive/apt-ftparchive.cc:171 ftparchive/apt-ftparchive.cc:348 msgid "Package extension list is too long" msgstr "" -#: ftparchive/apt-ftparchive.cc:172 ftparchive/apt-ftparchive.cc:189 -#: ftparchive/apt-ftparchive.cc:212 ftparchive/apt-ftparchive.cc:262 -#: ftparchive/apt-ftparchive.cc:276 ftparchive/apt-ftparchive.cc:298 +#: ftparchive/apt-ftparchive.cc:173 ftparchive/apt-ftparchive.cc:190 +#: ftparchive/apt-ftparchive.cc:213 ftparchive/apt-ftparchive.cc:263 +#: ftparchive/apt-ftparchive.cc:277 ftparchive/apt-ftparchive.cc:299 #, c-format msgid "Error processing directory %s" msgstr "" -#: ftparchive/apt-ftparchive.cc:260 +#: ftparchive/apt-ftparchive.cc:261 msgid "Source extension list is too long" msgstr "" -#: ftparchive/apt-ftparchive.cc:377 +#: ftparchive/apt-ftparchive.cc:378 msgid "Error writing header to contents file" msgstr "" -#: ftparchive/apt-ftparchive.cc:407 +#: ftparchive/apt-ftparchive.cc:408 #, c-format msgid "Error processing contents %s" msgstr "" -#: ftparchive/apt-ftparchive.cc:595 +#: ftparchive/apt-ftparchive.cc:596 msgid "" "Usage: apt-ftparchive [options] command\n" "Commands: packages binarypath [overridefile [pathprefix]]\n" @@ -328,136 +328,136 @@ msgid "" " -o=? Set an arbitrary configuration option" msgstr "" -#: ftparchive/apt-ftparchive.cc:801 +#: ftparchive/apt-ftparchive.cc:802 msgid "No selections matched" msgstr "" -#: ftparchive/apt-ftparchive.cc:879 +#: ftparchive/apt-ftparchive.cc:880 #, c-format msgid "Some files are missing in the package file group `%s'" msgstr "" -#: ftparchive/cachedb.cc:43 +#: ftparchive/cachedb.cc:46 #, c-format msgid "DB was corrupted, file renamed to %s.old" msgstr "" -#: ftparchive/cachedb.cc:61 +#: ftparchive/cachedb.cc:64 #, c-format msgid "DB is old, attempting to upgrade %s" msgstr "" -#: ftparchive/cachedb.cc:72 +#: ftparchive/cachedb.cc:75 msgid "" "DB format is invalid. If you upgraded from an older version of apt, please " "remove and re-create the database." msgstr "" -#: ftparchive/cachedb.cc:77 +#: ftparchive/cachedb.cc:80 #, c-format msgid "Unable to open DB file %s: %s" msgstr "" -#: ftparchive/cachedb.cc:123 apt-inst/extract.cc:178 apt-inst/extract.cc:190 -#: apt-inst/extract.cc:207 apt-inst/deb/dpkgdb.cc:117 +#: ftparchive/cachedb.cc:126 apt-inst/extract.cc:181 apt-inst/extract.cc:193 +#: apt-inst/extract.cc:210 apt-inst/deb/dpkgdb.cc:121 #, c-format msgid "Failed to stat %s" msgstr "" -#: ftparchive/cachedb.cc:245 +#: ftparchive/cachedb.cc:248 msgid "Archive has no control record" msgstr "" -#: ftparchive/cachedb.cc:482 +#: ftparchive/cachedb.cc:489 msgid "Unable to get a cursor" msgstr "" -#: ftparchive/writer.cc:79 +#: ftparchive/writer.cc:80 #, c-format msgid "W: Unable to read directory %s\n" msgstr "" -#: ftparchive/writer.cc:84 +#: ftparchive/writer.cc:85 #, c-format msgid "W: Unable to stat %s\n" msgstr "" -#: ftparchive/writer.cc:140 +#: ftparchive/writer.cc:141 msgid "E: " msgstr "" -#: ftparchive/writer.cc:142 +#: ftparchive/writer.cc:143 msgid "W: " msgstr "" -#: ftparchive/writer.cc:149 +#: ftparchive/writer.cc:150 msgid "E: Errors apply to file " msgstr "" -#: ftparchive/writer.cc:167 ftparchive/writer.cc:199 +#: ftparchive/writer.cc:168 ftparchive/writer.cc:200 #, c-format msgid "Failed to resolve %s" msgstr "" -#: ftparchive/writer.cc:180 +#: ftparchive/writer.cc:181 msgid "Tree walking failed" msgstr "" -#: ftparchive/writer.cc:207 +#: ftparchive/writer.cc:208 #, c-format msgid "Failed to open %s" msgstr "" -#: ftparchive/writer.cc:266 +#: ftparchive/writer.cc:267 #, c-format msgid " DeLink %s [%s]\n" msgstr "" -#: ftparchive/writer.cc:274 +#: ftparchive/writer.cc:275 #, c-format msgid "Failed to readlink %s" msgstr "" -#: ftparchive/writer.cc:278 +#: ftparchive/writer.cc:279 #, c-format msgid "Failed to unlink %s" msgstr "" -#: ftparchive/writer.cc:285 +#: ftparchive/writer.cc:286 #, c-format msgid "*** Failed to link %s to %s" msgstr "" -#: ftparchive/writer.cc:295 +#: ftparchive/writer.cc:296 #, c-format msgid " DeLink limit of %sB hit.\n" msgstr "" -#: ftparchive/writer.cc:400 +#: ftparchive/writer.cc:401 msgid "Archive had no package field" msgstr "" -#: ftparchive/writer.cc:408 ftparchive/writer.cc:710 +#: ftparchive/writer.cc:409 ftparchive/writer.cc:711 #, c-format msgid " %s has no override entry\n" msgstr "" -#: ftparchive/writer.cc:476 ftparchive/writer.cc:826 +#: ftparchive/writer.cc:477 ftparchive/writer.cc:827 #, c-format msgid " %s maintainer is %s not %s\n" msgstr "" -#: ftparchive/writer.cc:720 +#: ftparchive/writer.cc:721 #, c-format msgid " %s has no source override entry\n" msgstr "" -#: ftparchive/writer.cc:724 +#: ftparchive/writer.cc:725 #, c-format msgid " %s has no binary override entry either\n" msgstr "" -#: ftparchive/contents.cc:337 ftparchive/contents.cc:368 +#: ftparchive/contents.cc:339 ftparchive/contents.cc:370 msgid "realloc - Failed to allocate memory" msgstr "" @@ -468,17 +468,17 @@ msgstr "" #: ftparchive/override.cc:60 ftparchive/override.cc:166 #, c-format -msgid "Malformed override %s line %lu #1" +msgid "Malformed override %s line %llu #1" msgstr "" #: ftparchive/override.cc:74 ftparchive/override.cc:178 #, c-format -msgid "Malformed override %s line %lu #2" +msgid "Malformed override %s line %llu #2" msgstr "" #: ftparchive/override.cc:88 ftparchive/override.cc:191 #, c-format -msgid "Malformed override %s line %lu #3" +msgid "Malformed override %s line %llu #3" msgstr "" #: ftparchive/override.cc:127 ftparchive/override.cc:201 @@ -486,63 +486,63 @@ msgstr "" msgid "Failed to read the override file %s" msgstr "" -#: ftparchive/multicompress.cc:67 +#: ftparchive/multicompress.cc:69 #, c-format msgid "Unknown compression algorithm '%s'" msgstr "" -#: ftparchive/multicompress.cc:97 +#: ftparchive/multicompress.cc:99 #, c-format msgid "Compressed output %s needs a compression set" msgstr "" -#: ftparchive/multicompress.cc:165 methods/rsh.cc:91 +#: ftparchive/multicompress.cc:167 methods/rsh.cc:97 msgid "Failed to create IPC pipe to subprocess" msgstr "" -#: ftparchive/multicompress.cc:191 +#: ftparchive/multicompress.cc:193 msgid "Failed to create FILE*" msgstr "" -#: ftparchive/multicompress.cc:194 +#: ftparchive/multicompress.cc:196 msgid "Failed to fork" msgstr "" -#: ftparchive/multicompress.cc:208 +#: ftparchive/multicompress.cc:210 msgid "Compress child" msgstr "" -#: ftparchive/multicompress.cc:231 +#: ftparchive/multicompress.cc:233 #, c-format msgid "Internal error, failed to create %s" msgstr "" -#: ftparchive/multicompress.cc:282 +#: ftparchive/multicompress.cc:284 msgid "Failed to create subprocess IPC" msgstr "" -#: ftparchive/multicompress.cc:319 +#: ftparchive/multicompress.cc:321 msgid "Failed to exec compressor " msgstr "" -#: ftparchive/multicompress.cc:358 +#: ftparchive/multicompress.cc:360 msgid "decompressor" msgstr "" -#: ftparchive/multicompress.cc:401 +#: ftparchive/multicompress.cc:403 msgid "IO to subprocess/file failed" msgstr "" -#: ftparchive/multicompress.cc:453 +#: ftparchive/multicompress.cc:455 msgid "Failed to read while computing MD5" msgstr "" -#: ftparchive/multicompress.cc:470 +#: ftparchive/multicompress.cc:472 #, c-format msgid "Problem unlinking %s" msgstr "" -#: ftparchive/multicompress.cc:485 apt-inst/extract.cc:185 +#: ftparchive/multicompress.cc:487 apt-inst/extract.cc:188 #, c-format msgid "Failed to rename %s to %s" msgstr "" @@ -551,133 +551,137 @@ msgstr "" msgid "Y" msgstr "" -#: cmdline/apt-get.cc:157 apt-pkg/cachefilter.cc:29 +#: cmdline/apt-get.cc:140 +msgid "N" +msgstr "" + +#: cmdline/apt-get.cc:162 apt-pkg/cachefilter.cc:31 #, c-format msgid "Regex compilation error - %s" msgstr "" -#: cmdline/apt-get.cc:252 +#: cmdline/apt-get.cc:257 msgid "The following packages have unmet dependencies:" msgstr "" -#: cmdline/apt-get.cc:342 +#: cmdline/apt-get.cc:347 #, c-format msgid "but %s is installed" msgstr "" -#: cmdline/apt-get.cc:344 +#: cmdline/apt-get.cc:349 #, c-format msgid "but %s is to be installed" msgstr "" -#: cmdline/apt-get.cc:351 +#: cmdline/apt-get.cc:356 msgid "but it is not installable" msgstr "" -#: cmdline/apt-get.cc:353 +#: cmdline/apt-get.cc:358 msgid "but it is a virtual package" msgstr "" -#: cmdline/apt-get.cc:356 +#: cmdline/apt-get.cc:361 msgid "but it is not installed" msgstr "" -#: cmdline/apt-get.cc:356 +#: cmdline/apt-get.cc:361 msgid "but it is not going to be installed" msgstr "" -#: cmdline/apt-get.cc:361 +#: cmdline/apt-get.cc:366 msgid " or" msgstr "" -#: cmdline/apt-get.cc:390 +#: cmdline/apt-get.cc:395 msgid "The following NEW packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:416 +#: cmdline/apt-get.cc:421 msgid "The following packages will be REMOVED:" msgstr "" -#: cmdline/apt-get.cc:438 +#: cmdline/apt-get.cc:443 msgid "The following packages have been kept back:" msgstr "" -#: cmdline/apt-get.cc:459 +#: cmdline/apt-get.cc:464 msgid "The following packages will be upgraded:" msgstr "" -#: cmdline/apt-get.cc:480 +#: cmdline/apt-get.cc:485 msgid "The following packages will be DOWNGRADED:" msgstr "" -#: cmdline/apt-get.cc:500 +#: cmdline/apt-get.cc:505 msgid "The following held packages will be changed:" msgstr "" -#: cmdline/apt-get.cc:555 +#: cmdline/apt-get.cc:560 #, c-format msgid "%s (due to %s) " msgstr "" -#: cmdline/apt-get.cc:563 +#: cmdline/apt-get.cc:568 msgid "" "WARNING: The following essential packages will be removed.\n" "This should NOT be done unless you know exactly what you are doing!" msgstr "" -#: cmdline/apt-get.cc:594 +#: cmdline/apt-get.cc:599 #, c-format msgid "%lu upgraded, %lu newly installed, " msgstr "" -#: cmdline/apt-get.cc:598 +#: cmdline/apt-get.cc:603 #, c-format msgid "%lu reinstalled, " msgstr "" -#: cmdline/apt-get.cc:600 +#: cmdline/apt-get.cc:605 #, c-format msgid "%lu downgraded, " msgstr "" -#: cmdline/apt-get.cc:602 +#: cmdline/apt-get.cc:607 #, c-format msgid "%lu to remove and %lu not upgraded.\n" msgstr "" -#: cmdline/apt-get.cc:606 +#: cmdline/apt-get.cc:611 #, c-format msgid "%lu not fully installed or removed.\n" msgstr "" -#: cmdline/apt-get.cc:628 +#: cmdline/apt-get.cc:633 #, c-format msgid "Note, selecting '%s' for task '%s'\n" msgstr "" -#: cmdline/apt-get.cc:634 +#: cmdline/apt-get.cc:639 #, c-format msgid "Note, selecting '%s' for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:651 +#: cmdline/apt-get.cc:656 #, c-format msgid "Package %s is a virtual package provided by:\n" msgstr "" -#: cmdline/apt-get.cc:662 +#: cmdline/apt-get.cc:667 msgid " [Installed]" msgstr "" -#: cmdline/apt-get.cc:671 +#: cmdline/apt-get.cc:676 msgid " [Not candidate version]" msgstr "" -#: cmdline/apt-get.cc:673 +#: cmdline/apt-get.cc:678 msgid "You should explicitly select one to install." msgstr "" -#: cmdline/apt-get.cc:676 +#: cmdline/apt-get.cc:681 #, c-format msgid "" "Package %s is not available, but is referred to by another package.\n" @@ -685,177 +689,177 @@ msgid "" "is only available from another source\n" msgstr "" -#: cmdline/apt-get.cc:694 +#: cmdline/apt-get.cc:699 msgid "However the following packages replace it:" msgstr "" -#: cmdline/apt-get.cc:706 +#: cmdline/apt-get.cc:711 #, c-format msgid "Package '%s' has no installation candidate" msgstr "" -#: cmdline/apt-get.cc:717 +#: cmdline/apt-get.cc:722 #, c-format msgid "Virtual packages like '%s' can't be removed\n" msgstr "" -#: cmdline/apt-get.cc:748 +#: cmdline/apt-get.cc:753 #, c-format msgid "Note, selecting '%s' instead of '%s'\n" msgstr "" -#: cmdline/apt-get.cc:778 +#: cmdline/apt-get.cc:783 #, c-format msgid "Skipping %s, it is already installed and upgrade is not set.\n" msgstr "" -#: cmdline/apt-get.cc:782 +#: cmdline/apt-get.cc:787 #, c-format msgid "Skipping %s, it is not installed and only upgrades are requested.\n" msgstr "" -#: cmdline/apt-get.cc:794 +#: cmdline/apt-get.cc:799 #, c-format msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n" msgstr "" -#: cmdline/apt-get.cc:799 +#: cmdline/apt-get.cc:804 #, c-format msgid "%s is already the newest version.\n" msgstr "" -#: cmdline/apt-get.cc:818 cmdline/apt-get.cc:2082 cmdline/apt-mark.cc:59 +#: cmdline/apt-get.cc:823 cmdline/apt-get.cc:2103 cmdline/apt-mark.cc:61 #, c-format msgid "%s set to manually installed.\n" msgstr "" -#: cmdline/apt-get.cc:844 +#: cmdline/apt-get.cc:849 #, c-format msgid "Selected version '%s' (%s) for '%s'\n" msgstr "" -#: cmdline/apt-get.cc:849 +#: cmdline/apt-get.cc:854 #, c-format msgid "Selected version '%s' (%s) for '%s' because of '%s'\n" msgstr "" -#: cmdline/apt-get.cc:893 +#: cmdline/apt-get.cc:896 #, c-format msgid "Package %s is not installed, so not removed\n" msgstr "" -#: cmdline/apt-get.cc:971 +#: cmdline/apt-get.cc:974 msgid "Correcting dependencies..." msgstr "" -#: cmdline/apt-get.cc:974 +#: cmdline/apt-get.cc:977 msgid " failed." msgstr "" -#: cmdline/apt-get.cc:977 +#: cmdline/apt-get.cc:980 msgid "Unable to correct dependencies" msgstr "" -#: cmdline/apt-get.cc:980 +#: cmdline/apt-get.cc:983 msgid "Unable to minimize the upgrade set" msgstr "" -#: cmdline/apt-get.cc:982 +#: cmdline/apt-get.cc:985 msgid " Done" msgstr "" -#: cmdline/apt-get.cc:986 +#: cmdline/apt-get.cc:989 msgid "You might want to run 'apt-get -f install' to correct these." msgstr "" -#: cmdline/apt-get.cc:989 +#: cmdline/apt-get.cc:992 msgid "Unmet dependencies. Try using -f." msgstr "" -#: cmdline/apt-get.cc:1014 +#: cmdline/apt-get.cc:1017 msgid "WARNING: The following packages cannot be authenticated!" msgstr "" -#: cmdline/apt-get.cc:1018 +#: cmdline/apt-get.cc:1021 msgid "Authentication warning overridden.\n" msgstr "" -#: cmdline/apt-get.cc:1025 +#: cmdline/apt-get.cc:1028 msgid "Install these packages without verification [y/N]? " msgstr "" -#: cmdline/apt-get.cc:1027 +#: cmdline/apt-get.cc:1030 msgid "Some packages could not be authenticated" msgstr "" -#: cmdline/apt-get.cc:1036 cmdline/apt-get.cc:1197 +#: cmdline/apt-get.cc:1039 cmdline/apt-get.cc:1200 msgid "There are problems and -y was used without --force-yes" msgstr "" -#: cmdline/apt-get.cc:1077 +#: cmdline/apt-get.cc:1080 msgid "Internal error, InstallPackages was called with broken packages!" msgstr "" -#: cmdline/apt-get.cc:1086 +#: cmdline/apt-get.cc:1089 msgid "Packages need to be removed but remove is disabled." msgstr "" -#: cmdline/apt-get.cc:1097 +#: cmdline/apt-get.cc:1100 msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:1135 +#: cmdline/apt-get.cc:1138 msgid "How odd.. The sizes didn't match, email apt@packages.debian.org" msgstr "" #. TRANSLATOR: The required space between number and unit is already included #. in the replacement strings, so %sB will be correctly translate in e.g. 1,5 MB -#: cmdline/apt-get.cc:1142 +#: cmdline/apt-get.cc:1145 #, c-format msgid "Need to get %sB/%sB of archives.\n" msgstr "" #. TRANSLATOR: The required space between number and unit is already included #. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB -#: cmdline/apt-get.cc:1147 +#: cmdline/apt-get.cc:1150 #, c-format msgid "Need to get %sB of archives.\n" msgstr "" #. TRANSLATOR: The required space between number and unit is already included #. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB -#: cmdline/apt-get.cc:1154 +#: cmdline/apt-get.cc:1157 #, c-format msgid "After this operation, %sB of additional disk space will be used.\n" msgstr "" #. TRANSLATOR: The required space between number and unit is already included #. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB -#: cmdline/apt-get.cc:1159 +#: cmdline/apt-get.cc:1162 #, c-format msgid "After this operation, %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:1174 cmdline/apt-get.cc:1177 cmdline/apt-get.cc:2496 -#: cmdline/apt-get.cc:2499 +#: cmdline/apt-get.cc:1177 cmdline/apt-get.cc:1180 cmdline/apt-get.cc:2523 +#: cmdline/apt-get.cc:2526 #, c-format msgid "Couldn't determine free space in %s" msgstr "" -#: cmdline/apt-get.cc:1187 +#: cmdline/apt-get.cc:1190 #, c-format msgid "You don't have enough free space in %s." msgstr "" -#: cmdline/apt-get.cc:1203 cmdline/apt-get.cc:1223 +#: cmdline/apt-get.cc:1206 cmdline/apt-get.cc:1226 msgid "Trivial Only specified but this is not a trivial operation." msgstr "" -#: cmdline/apt-get.cc:1205 +#: cmdline/apt-get.cc:1208 msgid "Yes, do as I say!" msgstr "" -#: cmdline/apt-get.cc:1207 +#: cmdline/apt-get.cc:1210 #, c-format msgid "" "You are about to do something potentially harmful.\n" @@ -863,46 +867,46 @@ msgid "" " ?] " msgstr "" -#: cmdline/apt-get.cc:1213 cmdline/apt-get.cc:1232 +#: cmdline/apt-get.cc:1216 cmdline/apt-get.cc:1235 msgid "Abort." msgstr "" -#: cmdline/apt-get.cc:1228 +#: cmdline/apt-get.cc:1231 msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:1300 cmdline/apt-get.cc:2561 apt-pkg/algorithms.cc:1453 +#: cmdline/apt-get.cc:1303 cmdline/apt-get.cc:2588 apt-pkg/algorithms.cc:1492 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" -#: cmdline/apt-get.cc:1318 +#: cmdline/apt-get.cc:1321 msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:1319 cmdline/apt-get.cc:2573 +#: cmdline/apt-get.cc:1322 cmdline/apt-get.cc:2600 msgid "Download complete and in download only mode" msgstr "" -#: cmdline/apt-get.cc:1325 +#: cmdline/apt-get.cc:1328 msgid "" "Unable to fetch some archives, maybe run apt-get update or try with --fix-" "missing?" msgstr "" -#: cmdline/apt-get.cc:1329 +#: cmdline/apt-get.cc:1332 msgid "--fix-missing and media swapping is not currently supported" msgstr "" -#: cmdline/apt-get.cc:1334 +#: cmdline/apt-get.cc:1337 msgid "Unable to correct missing packages." msgstr "" -#: cmdline/apt-get.cc:1335 +#: cmdline/apt-get.cc:1338 msgid "Aborting install." msgstr "" -#: cmdline/apt-get.cc:1363 +#: cmdline/apt-get.cc:1366 msgid "" "The following package disappeared from your system as\n" "all files have been overwritten by other packages:" @@ -912,35 +916,35 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: cmdline/apt-get.cc:1367 +#: cmdline/apt-get.cc:1370 msgid "Note: This is done automatic and on purpose by dpkg." msgstr "" -#: cmdline/apt-get.cc:1497 +#: cmdline/apt-get.cc:1508 #, c-format msgid "Ignore unavailable target release '%s' of package '%s'" msgstr "" -#: cmdline/apt-get.cc:1529 +#: cmdline/apt-get.cc:1540 #, c-format msgid "Picking '%s' as source package instead of '%s'\n" msgstr "" #. if (VerTag.empty() == false && Last == 0) -#: cmdline/apt-get.cc:1567 +#: cmdline/apt-get.cc:1578 #, c-format msgid "Ignore unavailable version '%s' of package '%s'" msgstr "" -#: cmdline/apt-get.cc:1583 +#: cmdline/apt-get.cc:1594 msgid "The update command takes no arguments" msgstr "" -#: cmdline/apt-get.cc:1645 +#: cmdline/apt-get.cc:1657 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "" -#: cmdline/apt-get.cc:1740 +#: cmdline/apt-get.cc:1761 msgid "" "Hmm, seems like the AutoRemover destroyed something which really\n" "shouldn't happen. Please file a bug report against apt." @@ -956,15 +960,15 @@ msgstr "" #. "that package should be filed.") << endl; #. } #. -#: cmdline/apt-get.cc:1743 cmdline/apt-get.cc:1912 +#: cmdline/apt-get.cc:1764 cmdline/apt-get.cc:1933 msgid "The following information may help to resolve the situation:" msgstr "" -#: cmdline/apt-get.cc:1747 +#: cmdline/apt-get.cc:1768 msgid "Internal Error, AutoRemover broke stuff" msgstr "" -#: cmdline/apt-get.cc:1754 +#: cmdline/apt-get.cc:1775 msgid "" "The following package was automatically installed and is no longer required:" msgid_plural "" @@ -973,7 +977,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: cmdline/apt-get.cc:1758 +#: cmdline/apt-get.cc:1779 #, c-format msgid "%lu package was automatically installed and is no longer required.\n" msgid_plural "" @@ -981,25 +985,25 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: cmdline/apt-get.cc:1760 +#: cmdline/apt-get.cc:1781 msgid "Use 'apt-get autoremove' to remove them." msgstr "" -#: cmdline/apt-get.cc:1779 +#: cmdline/apt-get.cc:1800 msgid "Internal error, AllUpgrade broke stuff" msgstr "" -#: cmdline/apt-get.cc:1878 +#: cmdline/apt-get.cc:1899 msgid "You might want to run 'apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1882 +#: cmdline/apt-get.cc:1903 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1897 +#: cmdline/apt-get.cc:1918 msgid "" "Some packages could not be installed. This may mean that you have\n" "requested an impossible situation or if you are using the unstable\n" @@ -1007,80 +1011,80 @@ msgid "" "or been moved out of Incoming." msgstr "" -#: cmdline/apt-get.cc:1918 +#: cmdline/apt-get.cc:1939 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1944 +#: cmdline/apt-get.cc:1965 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:2034 +#: cmdline/apt-get.cc:2055 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:2035 +#: cmdline/apt-get.cc:2056 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:2077 +#: cmdline/apt-get.cc:2098 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:2084 cmdline/apt-mark.cc:61 +#: cmdline/apt-get.cc:2105 cmdline/apt-mark.cc:63 #, c-format msgid "%s set to automatically installed.\n" msgstr "" -#: cmdline/apt-get.cc:2092 cmdline/apt-mark.cc:105 +#: cmdline/apt-get.cc:2113 cmdline/apt-mark.cc:107 msgid "" "This command is deprecated. Please use 'apt-mark auto' and 'apt-mark manual' " "instead." msgstr "" -#: cmdline/apt-get.cc:2108 +#: cmdline/apt-get.cc:2129 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:2111 methods/ftp.cc:707 methods/connect.cc:111 +#: cmdline/apt-get.cc:2132 methods/ftp.cc:711 methods/connect.cc:115 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:2116 +#: cmdline/apt-get.cc:2137 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:2183 cmdline/apt-get.cc:2191 +#: cmdline/apt-get.cc:2204 cmdline/apt-get.cc:2212 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:2215 cmdline/apt-get.cc:2248 +#: cmdline/apt-get.cc:2240 cmdline/apt-get.cc:2276 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:2299 +#: cmdline/apt-get.cc:2327 #, c-format msgid "Downloading %s %s" msgstr "" -#: cmdline/apt-get.cc:2357 +#: cmdline/apt-get.cc:2385 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:2398 cmdline/apt-get.cc:2694 +#: cmdline/apt-get.cc:2425 cmdline/apt-get.cc:2737 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:2415 +#: cmdline/apt-get.cc:2442 #, c-format msgid "" "NOTICE: '%s' packaging is maintained in the '%s' version control system at:\n" "%s\n" msgstr "" -#: cmdline/apt-get.cc:2420 +#: cmdline/apt-get.cc:2447 #, c-format msgid "" "Please use:\n" @@ -1088,120 +1092,141 @@ msgid "" "to retrieve the latest (possibly unreleased) updates to the package.\n" msgstr "" -#: cmdline/apt-get.cc:2473 +#: cmdline/apt-get.cc:2500 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:2510 +#: cmdline/apt-get.cc:2537 #, c-format msgid "You don't have enough free space in %s" msgstr "" #. TRANSLATOR: The required space between number and unit is already included #. in the replacement strings, so %sB will be correctly translate in e.g. 1,5 MB -#: cmdline/apt-get.cc:2519 +#: cmdline/apt-get.cc:2546 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" #. TRANSLATOR: The required space between number and unit is already included #. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB -#: cmdline/apt-get.cc:2524 +#: cmdline/apt-get.cc:2551 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2530 +#: cmdline/apt-get.cc:2557 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2568 +#: cmdline/apt-get.cc:2595 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2599 +#: cmdline/apt-get.cc:2626 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2611 +#: cmdline/apt-get.cc:2638 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2612 +#: cmdline/apt-get.cc:2639 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2629 +#: cmdline/apt-get.cc:2661 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2649 +#: cmdline/apt-get.cc:2681 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2668 +#: cmdline/apt-get.cc:2700 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2699 +#: cmdline/apt-get.cc:2725 +#, c-format +msgid "" +"No architecture information available for %s. See apt.conf(5) APT::" +"Architectures for setup" +msgstr "" + +#: cmdline/apt-get.cc:2742 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2719 +#: cmdline/apt-get.cc:2762 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2770 +#: cmdline/apt-get.cc:2892 +#, c-format +msgid "" +"%s dependency for %s can't be satisfied because %s is not allowed on '%s' " +"packages" +msgstr "" + +#: cmdline/apt-get.cc:2913 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2823 +#: cmdline/apt-get.cc:2936 +#, c-format +msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" +msgstr "" + +#: cmdline/apt-get.cc:2975 #, c-format msgid "" -"%s dependency for %s cannot be satisfied because no available versions of " -"package %s can satisfy version requirements" +"%s dependency for %s cannot be satisfied because candidate version of " +"package %s can't satisfy version requirements" msgstr "" -#: cmdline/apt-get.cc:2859 +#: cmdline/apt-get.cc:2981 #, c-format -msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" +msgid "" +"%s dependency for %s cannot be satisfied because package %s has no candidate " +"version" msgstr "" -#: cmdline/apt-get.cc:2886 +#: cmdline/apt-get.cc:3004 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2902 +#: cmdline/apt-get.cc:3020 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2907 +#: cmdline/apt-get.cc:3025 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:3000 cmdline/apt-get.cc:3012 +#: cmdline/apt-get.cc:3118 cmdline/apt-get.cc:3130 #, c-format msgid "Changelog for %s (%s)" msgstr "" -#: cmdline/apt-get.cc:3131 +#: cmdline/apt-get.cc:3249 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:3172 +#: cmdline/apt-get.cc:3290 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1247,7 +1272,7 @@ msgid "" " This APT has Super Cow Powers.\n" msgstr "" -#: cmdline/apt-get.cc:3335 +#: cmdline/apt-get.cc:3455 msgid "" "NOTE: This is only a simulation!\n" " apt-get needs root privileges for real execution.\n" @@ -1255,33 +1280,33 @@ msgid "" " so don't depend on the relevance to the real current situation!" msgstr "" -#: cmdline/acqprogress.cc:57 +#: cmdline/acqprogress.cc:59 msgid "Hit " msgstr "" -#: cmdline/acqprogress.cc:81 +#: cmdline/acqprogress.cc:83 msgid "Get:" msgstr "" -#: cmdline/acqprogress.cc:112 +#: cmdline/acqprogress.cc:114 msgid "Ign " msgstr "" -#: cmdline/acqprogress.cc:116 +#: cmdline/acqprogress.cc:118 msgid "Err " msgstr "" -#: cmdline/acqprogress.cc:137 +#: cmdline/acqprogress.cc:139 #, c-format msgid "Fetched %sB in %s (%sB/s)\n" msgstr "" -#: cmdline/acqprogress.cc:227 +#: cmdline/acqprogress.cc:229 #, c-format msgid " [Working]" msgstr "" -#: cmdline/acqprogress.cc:283 +#: cmdline/acqprogress.cc:285 #, c-format msgid "" "Media change: please insert the disc labeled\n" @@ -1289,7 +1314,7 @@ msgid "" "in the drive '%s' and press enter\n" msgstr "" -#: cmdline/apt-internal-solver.cc:34 +#: cmdline/apt-internal-solver.cc:36 msgid "" "Usage: apt-internal-resolver\n" "\n" @@ -1305,46 +1330,46 @@ msgid "" " This APT has Super Cow Powers.\n" msgstr "" -#: cmdline/apt-mark.cc:46 +#: cmdline/apt-mark.cc:48 #, c-format msgid "%s can not be marked as it is not installed.\n" msgstr "" -#: cmdline/apt-mark.cc:52 +#: cmdline/apt-mark.cc:54 #, c-format msgid "%s was already set to manually installed.\n" msgstr "" -#: cmdline/apt-mark.cc:54 +#: cmdline/apt-mark.cc:56 #, c-format msgid "%s was already set to automatically installed.\n" msgstr "" -#: cmdline/apt-mark.cc:169 +#: cmdline/apt-mark.cc:171 #, c-format msgid "%s was already set on hold.\n" msgstr "" -#: cmdline/apt-mark.cc:171 +#: cmdline/apt-mark.cc:173 #, c-format msgid "%s was already not hold.\n" msgstr "" -#: cmdline/apt-mark.cc:185 cmdline/apt-mark.cc:207 +#: cmdline/apt-mark.cc:187 cmdline/apt-mark.cc:209 #, c-format msgid "%s set on hold.\n" msgstr "" -#: cmdline/apt-mark.cc:187 cmdline/apt-mark.cc:212 +#: cmdline/apt-mark.cc:189 cmdline/apt-mark.cc:214 #, c-format msgid "Canceled hold on %s.\n" msgstr "" -#: cmdline/apt-mark.cc:220 +#: cmdline/apt-mark.cc:222 msgid "Executing dpkg failed. Are you root?" msgstr "" -#: cmdline/apt-mark.cc:268 +#: cmdline/apt-mark.cc:270 msgid "" "Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n" "\n" @@ -1366,11 +1391,11 @@ msgid "" "See the apt-mark(8) and apt.conf(5) manual pages for more information." msgstr "" -#: cmdline/apt-sortpkgs.cc:86 +#: cmdline/apt-sortpkgs.cc:89 msgid "Unknown package record!" msgstr "" -#: cmdline/apt-sortpkgs.cc:150 +#: cmdline/apt-sortpkgs.cc:153 msgid "" "Usage: apt-sortpkgs [options] file1 [file2 ...]\n" "\n" @@ -1418,196 +1443,196 @@ msgstr "" msgid "Merging available information" msgstr "" -#: apt-inst/contrib/extracttar.cc:114 +#: apt-inst/contrib/extracttar.cc:117 msgid "Failed to create pipes" msgstr "" -#: apt-inst/contrib/extracttar.cc:141 +#: apt-inst/contrib/extracttar.cc:144 msgid "Failed to exec gzip " msgstr "" -#: apt-inst/contrib/extracttar.cc:178 apt-inst/contrib/extracttar.cc:208 +#: apt-inst/contrib/extracttar.cc:181 apt-inst/contrib/extracttar.cc:211 msgid "Corrupted archive" msgstr "" -#: apt-inst/contrib/extracttar.cc:193 +#: apt-inst/contrib/extracttar.cc:196 msgid "Tar checksum failed, archive corrupted" msgstr "" -#: apt-inst/contrib/extracttar.cc:300 +#: apt-inst/contrib/extracttar.cc:303 #, c-format msgid "Unknown TAR header type %u, member %s" msgstr "" -#: apt-inst/contrib/arfile.cc:70 +#: apt-inst/contrib/arfile.cc:74 msgid "Invalid archive signature" msgstr "" -#: apt-inst/contrib/arfile.cc:78 +#: apt-inst/contrib/arfile.cc:82 msgid "Error reading archive member header" msgstr "" -#: apt-inst/contrib/arfile.cc:90 +#: apt-inst/contrib/arfile.cc:94 #, c-format msgid "Invalid archive member header %s" msgstr "" -#: apt-inst/contrib/arfile.cc:102 +#: apt-inst/contrib/arfile.cc:106 msgid "Invalid archive member header" msgstr "" -#: apt-inst/contrib/arfile.cc:128 +#: apt-inst/contrib/arfile.cc:132 msgid "Archive is too short" msgstr "" -#: apt-inst/contrib/arfile.cc:132 +#: apt-inst/contrib/arfile.cc:136 msgid "Failed to read the archive headers" msgstr "" -#: apt-inst/filelist.cc:380 +#: apt-inst/filelist.cc:382 msgid "DropNode called on still linked node" msgstr "" -#: apt-inst/filelist.cc:412 +#: apt-inst/filelist.cc:414 msgid "Failed to locate the hash element!" msgstr "" -#: apt-inst/filelist.cc:459 +#: apt-inst/filelist.cc:461 msgid "Failed to allocate diversion" msgstr "" -#: apt-inst/filelist.cc:464 +#: apt-inst/filelist.cc:466 msgid "Internal error in AddDiversion" msgstr "" -#: apt-inst/filelist.cc:477 +#: apt-inst/filelist.cc:479 #, c-format msgid "Trying to overwrite a diversion, %s -> %s and %s/%s" msgstr "" -#: apt-inst/filelist.cc:506 +#: apt-inst/filelist.cc:508 #, c-format msgid "Double add of diversion %s -> %s" msgstr "" -#: apt-inst/filelist.cc:549 +#: apt-inst/filelist.cc:551 #, c-format msgid "Duplicate conf file %s/%s" msgstr "" -#: apt-inst/dirstream.cc:41 apt-inst/dirstream.cc:47 apt-inst/dirstream.cc:53 +#: apt-inst/dirstream.cc:43 apt-inst/dirstream.cc:49 apt-inst/dirstream.cc:55 #, c-format msgid "Failed to write file %s" msgstr "" -#: apt-inst/dirstream.cc:98 apt-inst/dirstream.cc:106 +#: apt-inst/dirstream.cc:100 apt-inst/dirstream.cc:108 #, c-format msgid "Failed to close file %s" msgstr "" -#: apt-inst/extract.cc:93 apt-inst/extract.cc:164 +#: apt-inst/extract.cc:96 apt-inst/extract.cc:167 #, c-format msgid "The path %s is too long" msgstr "" -#: apt-inst/extract.cc:124 +#: apt-inst/extract.cc:127 #, c-format msgid "Unpacking %s more than once" msgstr "" -#: apt-inst/extract.cc:134 +#: apt-inst/extract.cc:137 #, c-format msgid "The directory %s is diverted" msgstr "" -#: apt-inst/extract.cc:144 +#: apt-inst/extract.cc:147 #, c-format msgid "The package is trying to write to the diversion target %s/%s" msgstr "" -#: apt-inst/extract.cc:154 apt-inst/extract.cc:297 +#: apt-inst/extract.cc:157 apt-inst/extract.cc:300 msgid "The diversion path is too long" msgstr "" -#: apt-inst/extract.cc:240 +#: apt-inst/extract.cc:243 #, c-format msgid "The directory %s is being replaced by a non-directory" msgstr "" -#: apt-inst/extract.cc:280 +#: apt-inst/extract.cc:283 msgid "Failed to locate node in its hash bucket" msgstr "" -#: apt-inst/extract.cc:284 +#: apt-inst/extract.cc:287 msgid "The path is too long" msgstr "" -#: apt-inst/extract.cc:412 +#: apt-inst/extract.cc:415 #, c-format msgid "Overwrite package match with no version for %s" msgstr "" -#: apt-inst/extract.cc:429 +#: apt-inst/extract.cc:432 #, c-format msgid "File %s/%s overwrites the one in the package %s" msgstr "" #. Only warn if there are no sources.list.d. #. Only warn if there is no sources.list file. -#: apt-inst/extract.cc:462 apt-pkg/contrib/cdromutl.cc:179 -#: apt-pkg/contrib/fileutl.cc:343 apt-pkg/sourcelist.cc:204 -#: apt-pkg/sourcelist.cc:210 apt-pkg/acquire.cc:450 apt-pkg/init.cc:102 -#: apt-pkg/init.cc:110 apt-pkg/clean.cc:33 apt-pkg/policy.cc:318 -#: methods/mirror.cc:91 +#: apt-inst/extract.cc:465 apt-pkg/contrib/cdromutl.cc:183 +#: apt-pkg/contrib/fileutl.cc:344 apt-pkg/sourcelist.cc:208 +#: apt-pkg/sourcelist.cc:214 apt-pkg/acquire.cc:456 apt-pkg/init.cc:108 +#: apt-pkg/init.cc:116 apt-pkg/clean.cc:36 apt-pkg/policy.cc:359 +#: methods/mirror.cc:95 #, c-format msgid "Unable to read %s" msgstr "" -#: apt-inst/extract.cc:489 +#: apt-inst/extract.cc:492 #, c-format msgid "Unable to stat %s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:51 apt-inst/deb/dpkgdb.cc:57 +#: apt-inst/deb/dpkgdb.cc:55 apt-inst/deb/dpkgdb.cc:61 #, c-format msgid "Failed to remove %s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:106 apt-inst/deb/dpkgdb.cc:108 +#: apt-inst/deb/dpkgdb.cc:110 apt-inst/deb/dpkgdb.cc:112 #, c-format msgid "Unable to create %s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:114 +#: apt-inst/deb/dpkgdb.cc:118 #, c-format msgid "Failed to stat %sinfo" msgstr "" -#: apt-inst/deb/dpkgdb.cc:119 +#: apt-inst/deb/dpkgdb.cc:123 msgid "The info and temp directories need to be on the same filesystem" msgstr "" -#: apt-inst/deb/dpkgdb.cc:135 apt-pkg/pkgcachegen.cc:1048 -#: apt-pkg/pkgcachegen.cc:1152 apt-pkg/pkgcachegen.cc:1158 -#: apt-pkg/pkgcachegen.cc:1304 +#: apt-inst/deb/dpkgdb.cc:139 apt-pkg/pkgcachegen.cc:1168 +#: apt-pkg/pkgcachegen.cc:1272 apt-pkg/pkgcachegen.cc:1278 +#: apt-pkg/pkgcachegen.cc:1434 msgid "Reading package lists" msgstr "" -#: apt-inst/deb/dpkgdb.cc:176 +#: apt-inst/deb/dpkgdb.cc:180 #, c-format msgid "Failed to change to the admin dir %sinfo" msgstr "" -#: apt-inst/deb/dpkgdb.cc:197 apt-inst/deb/dpkgdb.cc:351 -#: apt-inst/deb/dpkgdb.cc:444 +#: apt-inst/deb/dpkgdb.cc:201 apt-inst/deb/dpkgdb.cc:355 +#: apt-inst/deb/dpkgdb.cc:448 msgid "Internal error getting a package name" msgstr "" -#: apt-inst/deb/dpkgdb.cc:201 apt-inst/deb/dpkgdb.cc:382 +#: apt-inst/deb/dpkgdb.cc:205 apt-inst/deb/dpkgdb.cc:386 msgid "Reading file listing" msgstr "" -#: apt-inst/deb/dpkgdb.cc:212 +#: apt-inst/deb/dpkgdb.cc:216 #, c-format msgid "" "Failed to open the list file '%sinfo/%s'. If you cannot restore this file " @@ -1615,488 +1640,487 @@ msgid "" "package!" msgstr "" -#: apt-inst/deb/dpkgdb.cc:225 apt-inst/deb/dpkgdb.cc:238 +#: apt-inst/deb/dpkgdb.cc:229 apt-inst/deb/dpkgdb.cc:242 #, c-format msgid "Failed reading the list file %sinfo/%s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:262 +#: apt-inst/deb/dpkgdb.cc:266 msgid "Internal error getting a node" msgstr "" -#: apt-inst/deb/dpkgdb.cc:305 +#: apt-inst/deb/dpkgdb.cc:309 #, c-format msgid "Failed to open the diversions file %sdiversions" msgstr "" -#: apt-inst/deb/dpkgdb.cc:320 +#: apt-inst/deb/dpkgdb.cc:324 msgid "The diversion file is corrupted" msgstr "" -#: apt-inst/deb/dpkgdb.cc:327 apt-inst/deb/dpkgdb.cc:332 -#: apt-inst/deb/dpkgdb.cc:337 +#: apt-inst/deb/dpkgdb.cc:331 apt-inst/deb/dpkgdb.cc:336 +#: apt-inst/deb/dpkgdb.cc:341 #, c-format msgid "Invalid line in the diversion file: %s" msgstr "" -#: apt-inst/deb/dpkgdb.cc:358 +#: apt-inst/deb/dpkgdb.cc:362 msgid "Internal error adding a diversion" msgstr "" -#: apt-inst/deb/dpkgdb.cc:379 +#: apt-inst/deb/dpkgdb.cc:383 msgid "The pkg cache must be initialized first" msgstr "" -#: apt-inst/deb/dpkgdb.cc:439 +#: apt-inst/deb/dpkgdb.cc:443 #, c-format msgid "Failed to find a Package: header, offset %lu" msgstr "" -#: apt-inst/deb/dpkgdb.cc:461 +#: apt-inst/deb/dpkgdb.cc:465 #, c-format msgid "Bad ConfFile section in the status file. Offset %lu" msgstr "" -#: apt-inst/deb/dpkgdb.cc:466 +#: apt-inst/deb/dpkgdb.cc:470 #, c-format msgid "Error parsing MD5. Offset %lu" msgstr "" -#: apt-inst/deb/debfile.cc:39 apt-inst/deb/debfile.cc:44 +#: apt-inst/deb/debfile.cc:42 apt-inst/deb/debfile.cc:47 #, c-format msgid "This is not a valid DEB archive, missing '%s' member" msgstr "" #. FIXME: add data.tar.xz here - adding it now would require a Translation round for a very small gain -#: apt-inst/deb/debfile.cc:53 +#: apt-inst/deb/debfile.cc:56 #, c-format msgid "This is not a valid DEB archive, it has no '%s', '%s' or '%s' member" msgstr "" -#: apt-inst/deb/debfile.cc:113 +#: apt-inst/deb/debfile.cc:116 #, c-format msgid "Couldn't change to %s" msgstr "" -#: apt-inst/deb/debfile.cc:154 +#: apt-inst/deb/debfile.cc:157 #, c-format msgid "Internal error, could not locate member %s" msgstr "" -#: apt-inst/deb/debfile.cc:189 +#: apt-inst/deb/debfile.cc:192 msgid "Failed to locate a valid control file" msgstr "" -#: apt-inst/deb/debfile.cc:274 +#: apt-inst/deb/debfile.cc:277 msgid "Unparsable control file" msgstr "" -#: methods/bzip2.cc:60 methods/gzip.cc:52 +#: methods/bzip2.cc:63 methods/gzip.cc:54 msgid "Empty files can't be valid archives" msgstr "" -#: methods/bzip2.cc:64 +#: methods/bzip2.cc:67 #, c-format msgid "Couldn't open pipe for %s" msgstr "" -#: methods/bzip2.cc:108 +#: methods/bzip2.cc:111 #, c-format msgid "Read error from %s process" msgstr "" -#: methods/bzip2.cc:140 methods/bzip2.cc:149 methods/copy.cc:43 -#: methods/gzip.cc:92 methods/gzip.cc:101 methods/rred.cc:524 -#: methods/rred.cc:533 +#: methods/bzip2.cc:143 methods/bzip2.cc:152 methods/copy.cc:46 +#: methods/gzip.cc:94 methods/gzip.cc:103 methods/rred.cc:530 +#: methods/rred.cc:539 msgid "Failed to stat" msgstr "" -#: methods/bzip2.cc:146 methods/copy.cc:80 methods/gzip.cc:98 -#: methods/rred.cc:530 +#: methods/bzip2.cc:149 methods/copy.cc:83 methods/gzip.cc:100 +#: methods/rred.cc:536 msgid "Failed to set modification time" msgstr "" -#: methods/cdrom.cc:199 +#: methods/cdrom.cc:203 #, c-format msgid "Unable to read the cdrom database %s" msgstr "" -#: methods/cdrom.cc:208 +#: methods/cdrom.cc:212 msgid "" "Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update " "cannot be used to add new CD-ROMs" msgstr "" -#: methods/cdrom.cc:218 +#: methods/cdrom.cc:222 msgid "Wrong CD-ROM" msgstr "" -#: methods/cdrom.cc:245 +#: methods/cdrom.cc:249 #, c-format msgid "Unable to unmount the CD-ROM in %s, it may still be in use." msgstr "" -#: methods/cdrom.cc:250 +#: methods/cdrom.cc:254 msgid "Disk not found." msgstr "" -#: methods/cdrom.cc:258 methods/file.cc:79 methods/rsh.cc:265 +#: methods/cdrom.cc:262 methods/file.cc:82 methods/rsh.cc:271 msgid "File not found" msgstr "" -#: methods/file.cc:44 +#: methods/file.cc:47 msgid "Invalid URI, local URIS must not start with //" msgstr "" #. Login must be before getpeername otherwise dante won't work. -#: methods/ftp.cc:168 +#: methods/ftp.cc:172 msgid "Logging in" msgstr "" -#: methods/ftp.cc:174 +#: methods/ftp.cc:178 msgid "Unable to determine the peer name" msgstr "" -#: methods/ftp.cc:179 +#: methods/ftp.cc:183 msgid "Unable to determine the local name" msgstr "" -#: methods/ftp.cc:210 methods/ftp.cc:238 +#: methods/ftp.cc:214 methods/ftp.cc:242 #, c-format msgid "The server refused the connection and said: %s" msgstr "" -#: methods/ftp.cc:216 +#: methods/ftp.cc:220 #, c-format msgid "USER failed, server said: %s" msgstr "" -#: methods/ftp.cc:223 +#: methods/ftp.cc:227 #, c-format msgid "PASS failed, server said: %s" msgstr "" -#: methods/ftp.cc:243 +#: methods/ftp.cc:247 msgid "" "A proxy server was specified but no login script, Acquire::ftp::ProxyLogin " "is empty." msgstr "" -#: methods/ftp.cc:271 +#: methods/ftp.cc:275 #, c-format msgid "Login script command '%s' failed, server said: %s" msgstr "" -#: methods/ftp.cc:297 +#: methods/ftp.cc:301 #, c-format msgid "TYPE failed, server said: %s" msgstr "" -#: methods/ftp.cc:335 methods/ftp.cc:446 methods/rsh.cc:184 methods/rsh.cc:227 +#: methods/ftp.cc:339 methods/ftp.cc:450 methods/rsh.cc:190 methods/rsh.cc:233 msgid "Connection timeout" msgstr "" -#: methods/ftp.cc:341 +#: methods/ftp.cc:345 msgid "Server closed the connection" msgstr "" -#: methods/ftp.cc:344 apt-pkg/contrib/fileutl.cc:820 methods/rsh.cc:191 +#: methods/ftp.cc:348 apt-pkg/contrib/fileutl.cc:832 methods/rsh.cc:197 msgid "Read error" msgstr "" -#: methods/ftp.cc:351 methods/rsh.cc:198 +#: methods/ftp.cc:355 methods/rsh.cc:204 msgid "A response overflowed the buffer." msgstr "" -#: methods/ftp.cc:368 methods/ftp.cc:380 +#: methods/ftp.cc:372 methods/ftp.cc:384 msgid "Protocol corruption" msgstr "" -#: methods/ftp.cc:452 apt-pkg/contrib/fileutl.cc:862 methods/rsh.cc:233 +#: methods/ftp.cc:456 apt-pkg/contrib/fileutl.cc:874 methods/rsh.cc:239 msgid "Write error" msgstr "" -#: methods/ftp.cc:692 methods/ftp.cc:698 methods/ftp.cc:734 +#: methods/ftp.cc:696 methods/ftp.cc:702 methods/ftp.cc:738 msgid "Could not create a socket" msgstr "" -#: methods/ftp.cc:703 +#: methods/ftp.cc:707 msgid "Could not connect data socket, connection timed out" msgstr "" -#: methods/ftp.cc:709 +#: methods/ftp.cc:713 msgid "Could not connect passive socket." msgstr "" -#: methods/ftp.cc:727 +#: methods/ftp.cc:731 msgid "getaddrinfo was unable to get a listening socket" msgstr "" -#: methods/ftp.cc:741 +#: methods/ftp.cc:745 msgid "Could not bind a socket" msgstr "" -#: methods/ftp.cc:745 +#: methods/ftp.cc:749 msgid "Could not listen on the socket" msgstr "" -#: methods/ftp.cc:752 +#: methods/ftp.cc:756 msgid "Could not determine the socket's name" msgstr "" -#: methods/ftp.cc:784 +#: methods/ftp.cc:788 msgid "Unable to send PORT command" msgstr "" -#: methods/ftp.cc:794 +#: methods/ftp.cc:798 #, c-format msgid "Unknown address family %u (AF_*)" msgstr "" -#: methods/ftp.cc:803 +#: methods/ftp.cc:807 #, c-format msgid "EPRT failed, server said: %s" msgstr "" -#: methods/ftp.cc:823 +#: methods/ftp.cc:827 msgid "Data socket connect timed out" msgstr "" -#: methods/ftp.cc:830 +#: methods/ftp.cc:834 msgid "Unable to accept connection" msgstr "" -#: methods/ftp.cc:869 methods/http.cc:1023 methods/rsh.cc:303 +#: methods/ftp.cc:873 methods/http.cc:1031 methods/rsh.cc:309 msgid "Problem hashing file" msgstr "" -#: methods/ftp.cc:882 +#: methods/ftp.cc:886 #, c-format msgid "Unable to fetch file, server said '%s'" msgstr "" -#: methods/ftp.cc:897 methods/rsh.cc:322 +#: methods/ftp.cc:901 methods/rsh.cc:328 msgid "Data socket timed out" msgstr "" -#: methods/ftp.cc:927 +#: methods/ftp.cc:931 #, c-format msgid "Data transfer failed, server said '%s'" msgstr "" #. Get the files information -#: methods/ftp.cc:1004 +#: methods/ftp.cc:1008 msgid "Query" msgstr "" -#: methods/ftp.cc:1116 +#: methods/ftp.cc:1120 msgid "Unable to invoke " msgstr "" -#: methods/connect.cc:71 +#: methods/connect.cc:75 #, c-format msgid "Connecting to %s (%s)" msgstr "" -#: methods/connect.cc:82 +#: methods/connect.cc:86 #, c-format msgid "[IP: %s %s]" msgstr "" -#: methods/connect.cc:89 +#: methods/connect.cc:93 #, c-format msgid "Could not create a socket for %s (f=%u t=%u p=%u)" msgstr "" -#: methods/connect.cc:95 +#: methods/connect.cc:99 #, c-format msgid "Cannot initiate the connection to %s:%s (%s)." msgstr "" -#: methods/connect.cc:103 +#: methods/connect.cc:107 #, c-format msgid "Could not connect to %s:%s (%s), connection timed out" msgstr "" -#: methods/connect.cc:121 +#: methods/connect.cc:125 #, c-format msgid "Could not connect to %s:%s (%s)." msgstr "" #. We say this mainly because the pause here is for the #. ssh connection that is still going -#: methods/connect.cc:149 methods/rsh.cc:425 +#: methods/connect.cc:153 methods/rsh.cc:431 #, c-format msgid "Connecting to %s" msgstr "" -#: methods/connect.cc:168 methods/connect.cc:187 +#: methods/connect.cc:172 methods/connect.cc:191 #, c-format msgid "Could not resolve '%s'" msgstr "" -#: methods/connect.cc:193 +#: methods/connect.cc:197 #, c-format msgid "Temporary failure resolving '%s'" msgstr "" -#: methods/connect.cc:196 +#: methods/connect.cc:200 #, c-format msgid "Something wicked happened resolving '%s:%s' (%i - %s)" msgstr "" -#: methods/connect.cc:243 +#: methods/connect.cc:247 #, c-format msgid "Unable to connect to %s:%s:" msgstr "" -#. TRANSLATOR: %s is the trusted keyring parts directory -#: methods/gpgv.cc:71 -#, c-format -msgid "No keyring installed in %s." -msgstr "" - -#: methods/gpgv.cc:163 +#: methods/gpgv.cc:172 msgid "" "Internal error: Good signature, but could not determine key fingerprint?!" msgstr "" -#: methods/gpgv.cc:168 +#: methods/gpgv.cc:177 msgid "At least one invalid signature was encountered." msgstr "" -#: methods/gpgv.cc:172 +#: methods/gpgv.cc:181 msgid "Could not execute 'gpgv' to verify signature (is gpgv installed?)" msgstr "" -#: methods/gpgv.cc:177 +#: methods/gpgv.cc:186 msgid "Unknown error executing gpgv" msgstr "" -#: methods/gpgv.cc:211 methods/gpgv.cc:218 +#: methods/gpgv.cc:220 methods/gpgv.cc:227 msgid "The following signatures were invalid:\n" msgstr "" -#: methods/gpgv.cc:225 +#: methods/gpgv.cc:234 msgid "" "The following signatures couldn't be verified because the public key is not " "available:\n" msgstr "" -#: methods/http.cc:385 +#: methods/http.cc:393 msgid "Waiting for headers" msgstr "" -#: methods/http.cc:531 +#: methods/http.cc:539 #, c-format msgid "Got a single header line over %u chars" msgstr "" -#: methods/http.cc:539 +#: methods/http.cc:547 msgid "Bad header line" msgstr "" -#: methods/http.cc:564 methods/http.cc:571 +#: methods/http.cc:572 methods/http.cc:579 msgid "The HTTP server sent an invalid reply header" msgstr "" -#: methods/http.cc:600 +#: methods/http.cc:608 msgid "The HTTP server sent an invalid Content-Length header" msgstr "" -#: methods/http.cc:615 +#: methods/http.cc:623 msgid "The HTTP server sent an invalid Content-Range header" msgstr "" -#: methods/http.cc:617 +#: methods/http.cc:625 msgid "This HTTP server has broken range support" msgstr "" -#: methods/http.cc:641 +#: methods/http.cc:649 msgid "Unknown date format" msgstr "" -#: methods/http.cc:800 +#: methods/http.cc:808 msgid "Select failed" msgstr "" -#: methods/http.cc:805 +#: methods/http.cc:813 msgid "Connection timed out" msgstr "" -#: methods/http.cc:828 +#: methods/http.cc:836 msgid "Error writing to output file" msgstr "" -#: methods/http.cc:859 +#: methods/http.cc:867 msgid "Error writing to file" msgstr "" -#: methods/http.cc:887 +#: methods/http.cc:895 msgid "Error writing to the file" msgstr "" -#: methods/http.cc:901 +#: methods/http.cc:909 msgid "Error reading from server. Remote end closed connection" msgstr "" -#: methods/http.cc:903 +#: methods/http.cc:911 msgid "Error reading from server" msgstr "" -#: methods/http.cc:1008 apt-pkg/contrib/mmap.cc:291 +#: methods/http.cc:1016 apt-pkg/contrib/mmap.cc:293 msgid "Failed to truncate file" msgstr "" -#: methods/http.cc:1183 +#: methods/http.cc:1191 msgid "Bad header data" msgstr "" -#: methods/http.cc:1200 methods/http.cc:1255 +#: methods/http.cc:1208 methods/http.cc:1263 msgid "Connection failed" msgstr "" -#: methods/http.cc:1347 +#: methods/http.cc:1355 msgid "Internal error" msgstr "" -#: apt-pkg/contrib/mmap.cc:77 +#: apt-pkg/contrib/mmap.cc:79 msgid "Can't mmap an empty file" msgstr "" -#: apt-pkg/contrib/mmap.cc:89 +#: apt-pkg/contrib/mmap.cc:91 #, c-format msgid "Couldn't duplicate file descriptor %i" msgstr "" -#: apt-pkg/contrib/mmap.cc:97 apt-pkg/contrib/mmap.cc:258 +#: apt-pkg/contrib/mmap.cc:99 #, c-format -msgid "Couldn't make mmap of %lu bytes" +msgid "Couldn't make mmap of %llu bytes" msgstr "" -#: apt-pkg/contrib/mmap.cc:124 +#: apt-pkg/contrib/mmap.cc:126 msgid "Unable to close mmap" msgstr "" -#: apt-pkg/contrib/mmap.cc:152 apt-pkg/contrib/mmap.cc:180 +#: apt-pkg/contrib/mmap.cc:154 apt-pkg/contrib/mmap.cc:182 msgid "Unable to synchronize mmap" msgstr "" -#: apt-pkg/contrib/mmap.cc:310 +#: apt-pkg/contrib/mmap.cc:260 +#, c-format +msgid "Couldn't make mmap of %lu bytes" +msgstr "" + +#: apt-pkg/contrib/mmap.cc:312 #, c-format msgid "" "Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. " "Current value: %lu. (man 5 apt.conf)" msgstr "" -#: apt-pkg/contrib/mmap.cc:409 +#: apt-pkg/contrib/mmap.cc:411 #, c-format msgid "" "Unable to increase the size of the MMap as the limit of %lu bytes is already " "reached." msgstr "" -#: apt-pkg/contrib/mmap.cc:412 +#: apt-pkg/contrib/mmap.cc:414 msgid "" "Unable to increase size of the MMap as automatic growing is disabled by user." msgstr "" @@ -2125,93 +2149,93 @@ msgstr "" msgid "%lis" msgstr "" -#: apt-pkg/contrib/strutl.cc:1138 +#: apt-pkg/contrib/strutl.cc:1165 #, c-format msgid "Selection %s not found" msgstr "" -#: apt-pkg/contrib/configuration.cc:452 +#: apt-pkg/contrib/configuration.cc:468 #, c-format msgid "Unrecognized type abbreviation: '%c'" msgstr "" -#: apt-pkg/contrib/configuration.cc:510 +#: apt-pkg/contrib/configuration.cc:526 #, c-format msgid "Opening configuration file %s" msgstr "" -#: apt-pkg/contrib/configuration.cc:678 +#: apt-pkg/contrib/configuration.cc:694 #, c-format msgid "Syntax error %s:%u: Block starts with no name." msgstr "" -#: apt-pkg/contrib/configuration.cc:697 +#: apt-pkg/contrib/configuration.cc:713 #, c-format msgid "Syntax error %s:%u: Malformed tag" msgstr "" -#: apt-pkg/contrib/configuration.cc:714 +#: apt-pkg/contrib/configuration.cc:730 #, c-format msgid "Syntax error %s:%u: Extra junk after value" msgstr "" -#: apt-pkg/contrib/configuration.cc:754 +#: apt-pkg/contrib/configuration.cc:770 #, c-format msgid "Syntax error %s:%u: Directives can only be done at the top level" msgstr "" -#: apt-pkg/contrib/configuration.cc:761 +#: apt-pkg/contrib/configuration.cc:777 #, c-format msgid "Syntax error %s:%u: Too many nested includes" msgstr "" -#: apt-pkg/contrib/configuration.cc:765 apt-pkg/contrib/configuration.cc:770 +#: apt-pkg/contrib/configuration.cc:781 apt-pkg/contrib/configuration.cc:786 #, c-format msgid "Syntax error %s:%u: Included from here" msgstr "" -#: apt-pkg/contrib/configuration.cc:774 +#: apt-pkg/contrib/configuration.cc:790 #, c-format msgid "Syntax error %s:%u: Unsupported directive '%s'" msgstr "" -#: apt-pkg/contrib/configuration.cc:777 +#: apt-pkg/contrib/configuration.cc:793 #, c-format msgid "Syntax error %s:%u: clear directive requires an option tree as argument" msgstr "" -#: apt-pkg/contrib/configuration.cc:827 +#: apt-pkg/contrib/configuration.cc:843 #, c-format msgid "Syntax error %s:%u: Extra junk at end of file" msgstr "" -#: apt-pkg/contrib/progress.cc:144 +#: apt-pkg/contrib/progress.cc:146 #, c-format msgid "%c%s... Error!" msgstr "" -#: apt-pkg/contrib/progress.cc:146 +#: apt-pkg/contrib/progress.cc:148 #, c-format msgid "%c%s... Done" msgstr "" -#: apt-pkg/contrib/cmndline.cc:77 +#: apt-pkg/contrib/cmndline.cc:80 #, c-format msgid "Command line option '%c' [from %s] is not known." msgstr "" -#: apt-pkg/contrib/cmndline.cc:103 apt-pkg/contrib/cmndline.cc:111 -#: apt-pkg/contrib/cmndline.cc:119 +#: apt-pkg/contrib/cmndline.cc:104 apt-pkg/contrib/cmndline.cc:112 +#: apt-pkg/contrib/cmndline.cc:120 #, c-format msgid "Command line option %s is not understood" msgstr "" -#: apt-pkg/contrib/cmndline.cc:124 +#: apt-pkg/contrib/cmndline.cc:125 #, c-format msgid "Command line option %s is not boolean" msgstr "" -#: apt-pkg/contrib/cmndline.cc:165 apt-pkg/contrib/cmndline.cc:186 +#: apt-pkg/contrib/cmndline.cc:166 apt-pkg/contrib/cmndline.cc:187 #, c-format msgid "Option %s requires an argument." msgstr "" @@ -2221,603 +2245,573 @@ msgstr "" msgid "Option %s: Configuration item specification must have an =<val>." msgstr "" -#: apt-pkg/contrib/cmndline.cc:236 +#: apt-pkg/contrib/cmndline.cc:235 #, c-format msgid "Option %s requires an integer argument, not '%s'" msgstr "" -#: apt-pkg/contrib/cmndline.cc:267 +#: apt-pkg/contrib/cmndline.cc:266 #, c-format msgid "Option '%s' is too long" msgstr "" -#: apt-pkg/contrib/cmndline.cc:300 +#: apt-pkg/contrib/cmndline.cc:298 #, c-format msgid "Sense %s is not understood, try true or false." msgstr "" -#: apt-pkg/contrib/cmndline.cc:350 +#: apt-pkg/contrib/cmndline.cc:348 #, c-format msgid "Invalid operation %s" msgstr "" -#: apt-pkg/contrib/cdromutl.cc:52 +#: apt-pkg/contrib/cdromutl.cc:56 #, c-format msgid "Unable to stat the mount point %s" msgstr "" -#: apt-pkg/contrib/cdromutl.cc:175 apt-pkg/contrib/cdromutl.cc:209 -#: apt-pkg/acquire.cc:456 apt-pkg/acquire.cc:481 apt-pkg/clean.cc:39 -#: methods/mirror.cc:97 +#: apt-pkg/contrib/cdromutl.cc:179 apt-pkg/contrib/cdromutl.cc:213 +#: apt-pkg/acquire.cc:462 apt-pkg/acquire.cc:487 apt-pkg/clean.cc:42 +#: methods/mirror.cc:101 #, c-format msgid "Unable to change to %s" msgstr "" -#: apt-pkg/contrib/cdromutl.cc:220 +#: apt-pkg/contrib/cdromutl.cc:224 msgid "Failed to stat the cdrom" msgstr "" -#: apt-pkg/contrib/fileutl.cc:168 +#: apt-pkg/contrib/fileutl.cc:169 #, c-format msgid "Not using locking for read only lock file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:173 +#: apt-pkg/contrib/fileutl.cc:174 #, c-format msgid "Could not open lock file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:191 +#: apt-pkg/contrib/fileutl.cc:192 #, c-format msgid "Not using locking for nfs mounted lock file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:195 +#: apt-pkg/contrib/fileutl.cc:196 #, c-format msgid "Could not get lock %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:335 +#: apt-pkg/contrib/fileutl.cc:336 #, c-format msgid "List of files can't be created as '%s' is not a directory" msgstr "" -#: apt-pkg/contrib/fileutl.cc:362 +#: apt-pkg/contrib/fileutl.cc:363 #, c-format msgid "Ignoring '%s' in directory '%s' as it is not a regular file" msgstr "" -#: apt-pkg/contrib/fileutl.cc:380 +#: apt-pkg/contrib/fileutl.cc:381 #, c-format msgid "Ignoring file '%s' in directory '%s' as it has no filename extension" msgstr "" -#: apt-pkg/contrib/fileutl.cc:389 +#: apt-pkg/contrib/fileutl.cc:390 #, c-format msgid "" "Ignoring file '%s' in directory '%s' as it has an invalid filename extension" msgstr "" -#: apt-pkg/contrib/fileutl.cc:679 +#: apt-pkg/contrib/fileutl.cc:691 #, c-format msgid "Waited for %s but it wasn't there" msgstr "" -#: apt-pkg/contrib/fileutl.cc:691 +#: apt-pkg/contrib/fileutl.cc:703 #, c-format msgid "Sub-process %s received a segmentation fault." msgstr "" -#: apt-pkg/contrib/fileutl.cc:693 +#: apt-pkg/contrib/fileutl.cc:705 #, c-format msgid "Sub-process %s received signal %u." msgstr "" -#: apt-pkg/contrib/fileutl.cc:697 +#: apt-pkg/contrib/fileutl.cc:709 #, c-format msgid "Sub-process %s returned an error code (%u)" msgstr "" -#: apt-pkg/contrib/fileutl.cc:699 +#: apt-pkg/contrib/fileutl.cc:711 #, c-format msgid "Sub-process %s exited unexpectedly" msgstr "" -#: apt-pkg/contrib/fileutl.cc:764 +#: apt-pkg/contrib/fileutl.cc:776 apt-pkg/indexcopy.cc:676 #, c-format msgid "Could not open file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:781 +#: apt-pkg/contrib/fileutl.cc:793 #, c-format msgid "Could not open file descriptor %d" msgstr "" -#: apt-pkg/contrib/fileutl.cc:841 +#: apt-pkg/contrib/fileutl.cc:853 #, c-format -msgid "read, still have %lu to read but none left" +msgid "read, still have %llu to read but none left" msgstr "" -#: apt-pkg/contrib/fileutl.cc:874 +#: apt-pkg/contrib/fileutl.cc:886 #, c-format -msgid "write, still have %lu to write but couldn't" +msgid "write, still have %llu to write but couldn't" msgstr "" -#: apt-pkg/contrib/fileutl.cc:1010 +#: apt-pkg/contrib/fileutl.cc:1023 #, c-format msgid "Problem closing the gzip file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:1013 +#: apt-pkg/contrib/fileutl.cc:1026 #, c-format msgid "Problem closing the file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:1018 +#: apt-pkg/contrib/fileutl.cc:1031 #, c-format msgid "Problem renaming the file %s to %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:1029 +#: apt-pkg/contrib/fileutl.cc:1042 #, c-format msgid "Problem unlinking the file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:1042 +#: apt-pkg/contrib/fileutl.cc:1055 msgid "Problem syncing the file" msgstr "" -#: apt-pkg/pkgcache.cc:145 +#: apt-pkg/pkgcache.cc:148 msgid "Empty package cache" msgstr "" -#: apt-pkg/pkgcache.cc:151 +#: apt-pkg/pkgcache.cc:154 msgid "The package cache file is corrupted" msgstr "" -#: apt-pkg/pkgcache.cc:156 +#: apt-pkg/pkgcache.cc:159 msgid "The package cache file is an incompatible version" msgstr "" -#: apt-pkg/pkgcache.cc:161 +#: apt-pkg/pkgcache.cc:162 +msgid "The package cache file is corrupted, it is too small" +msgstr "" + +#: apt-pkg/pkgcache.cc:167 #, c-format msgid "This APT does not support the versioning system '%s'" msgstr "" -#: apt-pkg/pkgcache.cc:166 +#: apt-pkg/pkgcache.cc:172 msgid "The package cache was built for a different architecture" msgstr "" -#: apt-pkg/pkgcache.cc:299 +#: apt-pkg/pkgcache.cc:305 msgid "Depends" msgstr "" -#: apt-pkg/pkgcache.cc:299 +#: apt-pkg/pkgcache.cc:305 msgid "PreDepends" msgstr "" -#: apt-pkg/pkgcache.cc:299 +#: apt-pkg/pkgcache.cc:305 msgid "Suggests" msgstr "" -#: apt-pkg/pkgcache.cc:300 +#: apt-pkg/pkgcache.cc:306 msgid "Recommends" msgstr "" -#: apt-pkg/pkgcache.cc:300 +#: apt-pkg/pkgcache.cc:306 msgid "Conflicts" msgstr "" -#: apt-pkg/pkgcache.cc:300 +#: apt-pkg/pkgcache.cc:306 msgid "Replaces" msgstr "" -#: apt-pkg/pkgcache.cc:301 +#: apt-pkg/pkgcache.cc:307 msgid "Obsoletes" msgstr "" -#: apt-pkg/pkgcache.cc:301 +#: apt-pkg/pkgcache.cc:307 msgid "Breaks" msgstr "" -#: apt-pkg/pkgcache.cc:301 +#: apt-pkg/pkgcache.cc:307 msgid "Enhances" msgstr "" -#: apt-pkg/pkgcache.cc:312 +#: apt-pkg/pkgcache.cc:318 msgid "important" msgstr "" -#: apt-pkg/pkgcache.cc:312 +#: apt-pkg/pkgcache.cc:318 msgid "required" msgstr "" -#: apt-pkg/pkgcache.cc:312 +#: apt-pkg/pkgcache.cc:318 msgid "standard" msgstr "" -#: apt-pkg/pkgcache.cc:313 +#: apt-pkg/pkgcache.cc:319 msgid "optional" msgstr "" -#: apt-pkg/pkgcache.cc:313 +#: apt-pkg/pkgcache.cc:319 msgid "extra" msgstr "" -#: apt-pkg/depcache.cc:125 apt-pkg/depcache.cc:154 +#: apt-pkg/depcache.cc:130 apt-pkg/depcache.cc:159 msgid "Building dependency tree" msgstr "" -#: apt-pkg/depcache.cc:126 +#: apt-pkg/depcache.cc:131 msgid "Candidate versions" msgstr "" -#: apt-pkg/depcache.cc:155 +#: apt-pkg/depcache.cc:160 msgid "Dependency generation" msgstr "" -#: apt-pkg/depcache.cc:175 apt-pkg/depcache.cc:208 apt-pkg/depcache.cc:212 +#: apt-pkg/depcache.cc:180 apt-pkg/depcache.cc:213 apt-pkg/depcache.cc:217 msgid "Reading state information" msgstr "" -#: apt-pkg/depcache.cc:237 +#: apt-pkg/depcache.cc:242 #, c-format msgid "Failed to open StateFile %s" msgstr "" -#: apt-pkg/depcache.cc:243 +#: apt-pkg/depcache.cc:248 #, c-format msgid "Failed to write temporary StateFile %s" msgstr "" -#: apt-pkg/tagfile.cc:123 +#: apt-pkg/tagfile.cc:126 #, c-format msgid "Unable to parse package file %s (1)" msgstr "" -#: apt-pkg/tagfile.cc:210 +#: apt-pkg/tagfile.cc:213 #, c-format msgid "Unable to parse package file %s (2)" msgstr "" -#: apt-pkg/sourcelist.cc:92 +#: apt-pkg/sourcelist.cc:96 #, c-format msgid "Malformed line %lu in source list %s ([option] unparseable)" msgstr "" -#: apt-pkg/sourcelist.cc:95 +#: apt-pkg/sourcelist.cc:99 #, c-format msgid "Malformed line %lu in source list %s ([option] too short)" msgstr "" -#: apt-pkg/sourcelist.cc:106 +#: apt-pkg/sourcelist.cc:110 #, c-format msgid "Malformed line %lu in source list %s ([%s] is not an assignment)" msgstr "" -#: apt-pkg/sourcelist.cc:112 +#: apt-pkg/sourcelist.cc:116 #, c-format msgid "Malformed line %lu in source list %s ([%s] has no key)" msgstr "" -#: apt-pkg/sourcelist.cc:115 +#: apt-pkg/sourcelist.cc:119 #, c-format msgid "Malformed line %lu in source list %s ([%s] key %s has no value)" msgstr "" -#: apt-pkg/sourcelist.cc:128 +#: apt-pkg/sourcelist.cc:132 #, c-format msgid "Malformed line %lu in source list %s (URI)" msgstr "" -#: apt-pkg/sourcelist.cc:130 +#: apt-pkg/sourcelist.cc:134 #, c-format msgid "Malformed line %lu in source list %s (dist)" msgstr "" -#: apt-pkg/sourcelist.cc:133 +#: apt-pkg/sourcelist.cc:137 #, c-format msgid "Malformed line %lu in source list %s (URI parse)" msgstr "" -#: apt-pkg/sourcelist.cc:139 +#: apt-pkg/sourcelist.cc:143 #, c-format msgid "Malformed line %lu in source list %s (absolute dist)" msgstr "" -#: apt-pkg/sourcelist.cc:146 +#: apt-pkg/sourcelist.cc:150 #, c-format msgid "Malformed line %lu in source list %s (dist parse)" msgstr "" -#: apt-pkg/sourcelist.cc:244 +#: apt-pkg/sourcelist.cc:248 #, c-format msgid "Opening %s" msgstr "" -#: apt-pkg/sourcelist.cc:261 apt-pkg/cdrom.cc:444 +#: apt-pkg/sourcelist.cc:265 apt-pkg/cdrom.cc:447 #, c-format msgid "Line %u too long in source list %s." msgstr "" -#: apt-pkg/sourcelist.cc:281 +#: apt-pkg/sourcelist.cc:285 #, c-format msgid "Malformed line %u in source list %s (type)" msgstr "" -#: apt-pkg/sourcelist.cc:285 +#: apt-pkg/sourcelist.cc:289 #, c-format msgid "Type '%s' is not known on line %u in source list %s" msgstr "" -#: apt-pkg/packagemanager.cc:335 apt-pkg/packagemanager.cc:623 +#: apt-pkg/packagemanager.cc:298 apt-pkg/packagemanager.cc:770 #, c-format msgid "" "Could not perform immediate configuration on '%s'. Please see man 5 apt.conf " "under APT::Immediate-Configure for details. (%d)" msgstr "" -#: apt-pkg/packagemanager.cc:456 +#: apt-pkg/packagemanager.cc:432 apt-pkg/packagemanager.cc:462 #, c-format -msgid "" -"This installation run will require temporarily removing the essential " -"package %s due to a Conflicts/Pre-Depends loop. This is often bad, but if " -"you really want to do it, activate the APT::Force-LoopBreak option." +msgid "Could not configure '%s'. " msgstr "" -#: apt-pkg/packagemanager.cc:501 +#: apt-pkg/packagemanager.cc:502 #, c-format msgid "" -"Could not perform immediate configuration on already unpacked '%s'. Please " -"see man 5 apt.conf under APT::Immediate-Configure for details." +"This installation run will require temporarily removing the essential " +"package %s due to a Conflicts/Pre-Depends loop. This is often bad, but if " +"you really want to do it, activate the APT::Force-LoopBreak option." msgstr "" -#: apt-pkg/pkgrecords.cc:32 +#: apt-pkg/pkgrecords.cc:34 #, c-format msgid "Index file type '%s' is not supported" msgstr "" -#: apt-pkg/algorithms.cc:250 +#: apt-pkg/algorithms.cc:255 #, c-format msgid "" "The package %s needs to be reinstalled, but I can't find an archive for it." msgstr "" -#: apt-pkg/algorithms.cc:1186 +#: apt-pkg/algorithms.cc:1191 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1188 +#: apt-pkg/algorithms.cc:1193 msgid "Unable to correct problems, you have held broken packages." msgstr "" -#: apt-pkg/algorithms.cc:1479 apt-pkg/algorithms.cc:1481 +#: apt-pkg/algorithms.cc:1518 apt-pkg/algorithms.cc:1520 msgid "" "Some index files failed to download. They have been ignored, or old ones " "used instead." msgstr "" -#: apt-pkg/acquire.cc:79 +#: apt-pkg/acquire.cc:81 #, c-format msgid "List directory %spartial is missing." msgstr "" -#: apt-pkg/acquire.cc:83 +#: apt-pkg/acquire.cc:85 #, c-format msgid "Archives directory %spartial is missing." msgstr "" -#: apt-pkg/acquire.cc:91 +#: apt-pkg/acquire.cc:93 #, c-format msgid "Unable to lock directory %s" msgstr "" #. only show the ETA if it makes sense #. two days -#: apt-pkg/acquire.cc:857 +#: apt-pkg/acquire.cc:864 #, c-format msgid "Retrieving file %li of %li (%s remaining)" msgstr "" -#: apt-pkg/acquire.cc:859 +#: apt-pkg/acquire.cc:866 #, c-format msgid "Retrieving file %li of %li" msgstr "" -#: apt-pkg/acquire-worker.cc:110 +#: apt-pkg/acquire-worker.cc:112 #, c-format msgid "The method driver %s could not be found." msgstr "" -#: apt-pkg/acquire-worker.cc:159 +#: apt-pkg/acquire-worker.cc:161 #, c-format msgid "Method %s did not start correctly" msgstr "" -#: apt-pkg/acquire-worker.cc:423 +#: apt-pkg/acquire-worker.cc:425 #, c-format msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter." msgstr "" -#: apt-pkg/init.cc:145 +#: apt-pkg/init.cc:151 #, c-format msgid "Packaging system '%s' is not supported" msgstr "" -#: apt-pkg/init.cc:161 +#: apt-pkg/init.cc:167 msgid "Unable to determine a suitable packaging system type" msgstr "" -#: apt-pkg/clean.cc:56 +#: apt-pkg/clean.cc:59 #, c-format msgid "Unable to stat %s." msgstr "" -#: apt-pkg/srcrecords.cc:44 +#: apt-pkg/srcrecords.cc:47 msgid "You must put some 'source' URIs in your sources.list" msgstr "" -#: apt-pkg/cachefile.cc:84 +#: apt-pkg/cachefile.cc:87 msgid "The package lists or status file could not be parsed or opened." msgstr "" -#: apt-pkg/cachefile.cc:88 +#: apt-pkg/cachefile.cc:91 msgid "You may want to run apt-get update to correct these problems" msgstr "" -#: apt-pkg/cachefile.cc:106 +#: apt-pkg/cachefile.cc:109 msgid "The list of sources could not be read." msgstr "" -#: apt-pkg/policy.cc:355 +#: apt-pkg/policy.cc:74 +#, c-format +msgid "" +"The value '%s' is invalid for APT::Default-Release as such a release is not " +"available in the sources" +msgstr "" + +#: apt-pkg/policy.cc:396 #, c-format msgid "Invalid record in the preferences file %s, no Package header" msgstr "" -#: apt-pkg/policy.cc:377 +#: apt-pkg/policy.cc:418 #, c-format msgid "Did not understand pin type %s" msgstr "" -#: apt-pkg/policy.cc:385 +#: apt-pkg/policy.cc:426 msgid "No priority (or zero) specified for pin" msgstr "" -#: apt-pkg/pkgcachegen.cc:80 +#: apt-pkg/pkgcachegen.cc:83 msgid "Cache has an incompatible versioning system" msgstr "" -#: apt-pkg/pkgcachegen.cc:187 -#, c-format -msgid "Error occurred while processing %s (NewPackage)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:204 -#, c-format -msgid "Error occurred while processing %s (UsePackage1)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:242 -#, c-format -msgid "Error occurred while processing %s (NewFileDesc1)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:274 +#. TRANSLATOR: The first placeholder is a package name, +#. the other two should be copied verbatim as they include debug info +#: apt-pkg/pkgcachegen.cc:209 apt-pkg/pkgcachegen.cc:275 +#: apt-pkg/pkgcachegen.cc:311 apt-pkg/pkgcachegen.cc:353 +#: apt-pkg/pkgcachegen.cc:357 apt-pkg/pkgcachegen.cc:374 +#: apt-pkg/pkgcachegen.cc:384 apt-pkg/pkgcachegen.cc:388 +#: apt-pkg/pkgcachegen.cc:392 apt-pkg/pkgcachegen.cc:413 +#: apt-pkg/pkgcachegen.cc:418 apt-pkg/pkgcachegen.cc:463 +#: apt-pkg/pkgcachegen.cc:494 apt-pkg/pkgcachegen.cc:508 #, c-format -msgid "Error occurred while processing %s (UsePackage2)" +msgid "Error occurred while processing %s (%s%d)" msgstr "" -#: apt-pkg/pkgcachegen.cc:278 -#, c-format -msgid "Error occurred while processing %s (NewFileVer1)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:295 apt-pkg/pkgcachegen.cc:305 -#: apt-pkg/pkgcachegen.cc:313 -#, c-format -msgid "Error occurred while processing %s (NewVersion%d)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:309 -#, c-format -msgid "Error occurred while processing %s (UsePackage3)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:342 -#, c-format -msgid "Error occurred while processing %s (NewFileDesc2)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:348 +#: apt-pkg/pkgcachegen.cc:232 msgid "Wow, you exceeded the number of package names this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:351 +#: apt-pkg/pkgcachegen.cc:235 msgid "Wow, you exceeded the number of versions this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:354 +#: apt-pkg/pkgcachegen.cc:238 msgid "Wow, you exceeded the number of descriptions this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:357 +#: apt-pkg/pkgcachegen.cc:241 msgid "Wow, you exceeded the number of dependencies this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:386 -#, c-format -msgid "Error occurred while processing %s (FindPkg)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:400 -#, c-format -msgid "Error occurred while processing %s (CollectFileProvides)" -msgstr "" - -#: apt-pkg/pkgcachegen.cc:406 +#: apt-pkg/pkgcachegen.cc:515 #, c-format msgid "Package %s %s was not found while processing file dependencies" msgstr "" -#: apt-pkg/pkgcachegen.cc:960 +#: apt-pkg/pkgcachegen.cc:1080 #, c-format msgid "Couldn't stat source package list %s" msgstr "" -#: apt-pkg/pkgcachegen.cc:1065 +#: apt-pkg/pkgcachegen.cc:1185 msgid "Collecting File Provides" msgstr "" -#: apt-pkg/pkgcachegen.cc:1243 apt-pkg/pkgcachegen.cc:1250 +#: apt-pkg/pkgcachegen.cc:1376 apt-pkg/pkgcachegen.cc:1383 msgid "IO Error saving source cache" msgstr "" -#: apt-pkg/acquire-item.cc:135 +#: apt-pkg/acquire-item.cc:139 #, c-format msgid "rename failed, %s (%s -> %s)." msgstr "" -#: apt-pkg/acquire-item.cc:636 +#: apt-pkg/acquire-item.cc:640 msgid "MD5Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:900 apt-pkg/acquire-item.cc:1850 -#: apt-pkg/acquire-item.cc:1993 +#: apt-pkg/acquire-item.cc:911 apt-pkg/acquire-item.cc:1863 +#: apt-pkg/acquire-item.cc:2006 msgid "Hash Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:1388 +#: apt-pkg/acquire-item.cc:1399 #, c-format msgid "" "Unable to find expected entry '%s' in Release file (Wrong sources.list entry " "or malformed file)" msgstr "" -#: apt-pkg/acquire-item.cc:1403 +#: apt-pkg/acquire-item.cc:1415 #, c-format msgid "Unable to find hash sum for '%s' in Release file" msgstr "" -#: apt-pkg/acquire-item.cc:1439 +#: apt-pkg/acquire-item.cc:1450 msgid "There is no public key available for the following key IDs:\n" msgstr "" -#. TRANSLATOR: The first %s is the URL of the bad Release file, the second is -#. the time since then the file is invalid - formated in the same way as in -#. the download progress display (e.g. 7d 3h 42min 1s) -#: apt-pkg/acquire-item.cc:1476 +#: apt-pkg/acquire-item.cc:1488 #, c-format -msgid "Release file expired, ignoring %s (invalid since %s)" +msgid "" +"Release file for %s is expired (invalid since %s). Updates for this " +"repository will not be applied." msgstr "" -#: apt-pkg/acquire-item.cc:1497 +#: apt-pkg/acquire-item.cc:1510 #, c-format msgid "Conflicting distribution: %s (expected %s but got %s)" msgstr "" -#: apt-pkg/acquire-item.cc:1530 +#: apt-pkg/acquire-item.cc:1543 #, c-format msgid "" "A error occurred during the signature verification. The repository is not " @@ -2825,427 +2819,442 @@ msgid "" msgstr "" #. Invalid signature file, reject (LP: #346386) (Closes: #627642) -#: apt-pkg/acquire-item.cc:1540 apt-pkg/acquire-item.cc:1545 +#: apt-pkg/acquire-item.cc:1553 apt-pkg/acquire-item.cc:1558 #, c-format msgid "GPG error: %s: %s" msgstr "" -#: apt-pkg/acquire-item.cc:1637 +#: apt-pkg/acquire-item.cc:1650 #, c-format msgid "" "I wasn't able to locate a file for the %s package. This might mean you need " "to manually fix this package. (due to missing arch)" msgstr "" -#: apt-pkg/acquire-item.cc:1696 +#: apt-pkg/acquire-item.cc:1709 #, c-format msgid "" "I wasn't able to locate a file for the %s package. This might mean you need " "to manually fix this package." msgstr "" -#: apt-pkg/acquire-item.cc:1755 +#: apt-pkg/acquire-item.cc:1768 #, c-format msgid "" "The package index files are corrupted. No Filename: field for package %s." msgstr "" -#: apt-pkg/acquire-item.cc:1842 +#: apt-pkg/acquire-item.cc:1855 msgid "Size mismatch" msgstr "" -#: apt-pkg/indexrecords.cc:53 +#: apt-pkg/indexrecords.cc:61 #, c-format msgid "Unable to parse Release file %s" msgstr "" -#: apt-pkg/indexrecords.cc:63 +#: apt-pkg/indexrecords.cc:71 #, c-format msgid "No sections in Release file %s" msgstr "" -#: apt-pkg/indexrecords.cc:97 +#: apt-pkg/indexrecords.cc:105 #, c-format msgid "No Hash entry in Release file %s" msgstr "" -#: apt-pkg/indexrecords.cc:110 +#: apt-pkg/indexrecords.cc:118 #, c-format msgid "Invalid 'Valid-Until' entry in Release file %s" msgstr "" -#: apt-pkg/indexrecords.cc:125 +#: apt-pkg/indexrecords.cc:137 #, c-format msgid "Invalid 'Date' entry in Release file %s" msgstr "" -#: apt-pkg/vendorlist.cc:71 +#: apt-pkg/vendorlist.cc:78 #, c-format msgid "Vendor block %s contains no fingerprint" msgstr "" -#: apt-pkg/cdrom.cc:525 +#: apt-pkg/cdrom.cc:528 #, c-format msgid "" "Using CD-ROM mount point %s\n" "Mounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:534 apt-pkg/cdrom.cc:631 +#: apt-pkg/cdrom.cc:537 apt-pkg/cdrom.cc:634 msgid "Identifying.. " msgstr "" -#: apt-pkg/cdrom.cc:562 +#: apt-pkg/cdrom.cc:565 #, c-format msgid "Stored label: %s\n" msgstr "" -#: apt-pkg/cdrom.cc:571 apt-pkg/cdrom.cc:847 +#: apt-pkg/cdrom.cc:574 apt-pkg/cdrom.cc:850 msgid "Unmounting CD-ROM...\n" msgstr "" -#: apt-pkg/cdrom.cc:591 +#: apt-pkg/cdrom.cc:594 #, c-format msgid "Using CD-ROM mount point %s\n" msgstr "" -#: apt-pkg/cdrom.cc:609 +#: apt-pkg/cdrom.cc:612 msgid "Unmounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:614 +#: apt-pkg/cdrom.cc:617 msgid "Waiting for disc...\n" msgstr "" -#: apt-pkg/cdrom.cc:623 +#: apt-pkg/cdrom.cc:626 msgid "Mounting CD-ROM...\n" msgstr "" -#: apt-pkg/cdrom.cc:642 +#: apt-pkg/cdrom.cc:645 msgid "Scanning disc for index files..\n" msgstr "" -#: apt-pkg/cdrom.cc:684 +#: apt-pkg/cdrom.cc:687 #, c-format msgid "" "Found %zu package indexes, %zu source indexes, %zu translation indexes and " "%zu signatures\n" msgstr "" -#: apt-pkg/cdrom.cc:695 +#: apt-pkg/cdrom.cc:698 msgid "" "Unable to locate any package files, perhaps this is not a Debian Disc or the " "wrong architecture?" msgstr "" -#: apt-pkg/cdrom.cc:722 +#: apt-pkg/cdrom.cc:725 #, c-format msgid "Found label '%s'\n" msgstr "" -#: apt-pkg/cdrom.cc:751 +#: apt-pkg/cdrom.cc:754 msgid "That is not a valid name, try again.\n" msgstr "" -#: apt-pkg/cdrom.cc:768 +#: apt-pkg/cdrom.cc:771 #, c-format msgid "" "This disc is called: \n" "'%s'\n" msgstr "" -#: apt-pkg/cdrom.cc:770 +#: apt-pkg/cdrom.cc:773 msgid "Copying package lists..." msgstr "" -#: apt-pkg/cdrom.cc:797 +#: apt-pkg/cdrom.cc:800 msgid "Writing new source list\n" msgstr "" -#: apt-pkg/cdrom.cc:805 +#: apt-pkg/cdrom.cc:808 msgid "Source list entries for this disc are:\n" msgstr "" -#: apt-pkg/indexcopy.cc:270 apt-pkg/indexcopy.cc:909 +#: apt-pkg/indexcopy.cc:273 apt-pkg/indexcopy.cc:930 #, c-format msgid "Wrote %i records.\n" msgstr "" -#: apt-pkg/indexcopy.cc:272 apt-pkg/indexcopy.cc:911 +#: apt-pkg/indexcopy.cc:275 apt-pkg/indexcopy.cc:932 #, c-format msgid "Wrote %i records with %i missing files.\n" msgstr "" -#: apt-pkg/indexcopy.cc:275 apt-pkg/indexcopy.cc:914 +#: apt-pkg/indexcopy.cc:278 apt-pkg/indexcopy.cc:935 #, c-format msgid "Wrote %i records with %i mismatched files\n" msgstr "" -#: apt-pkg/indexcopy.cc:278 apt-pkg/indexcopy.cc:917 +#: apt-pkg/indexcopy.cc:281 apt-pkg/indexcopy.cc:938 #, c-format msgid "Wrote %i records with %i missing files and %i mismatched files\n" msgstr "" -#: apt-pkg/indexcopy.cc:537 +#: apt-pkg/indexcopy.cc:540 #, c-format msgid "Skipping nonexistent file %s" msgstr "" -#: apt-pkg/indexcopy.cc:543 +#: apt-pkg/indexcopy.cc:546 #, c-format msgid "Can't find authentication record for: %s" msgstr "" -#: apt-pkg/indexcopy.cc:549 +#: apt-pkg/indexcopy.cc:552 #, c-format msgid "Hash mismatch for: %s" msgstr "" -#: apt-pkg/cacheset.cc:337 +#: apt-pkg/indexcopy.cc:680 +#, c-format +msgid "File %s doesn't start with a clearsigned message" +msgstr "" + +#. TRANSLATOR: %s is the trusted keyring parts directory +#: apt-pkg/indexcopy.cc:711 +#, c-format +msgid "No keyring installed in %s." +msgstr "" + +#: apt-pkg/cacheset.cc:342 #, c-format msgid "Release '%s' for '%s' was not found" msgstr "" -#: apt-pkg/cacheset.cc:340 +#: apt-pkg/cacheset.cc:345 #, c-format msgid "Version '%s' for '%s' was not found" msgstr "" -#: apt-pkg/cacheset.cc:447 +#: apt-pkg/cacheset.cc:452 #, c-format msgid "Couldn't find task '%s'" msgstr "" -#: apt-pkg/cacheset.cc:454 +#: apt-pkg/cacheset.cc:459 #, c-format msgid "Couldn't find any package by regex '%s'" msgstr "" -#: apt-pkg/cacheset.cc:467 +#: apt-pkg/cacheset.cc:472 #, c-format msgid "Can't select versions from package '%s' as it is purely virtual" msgstr "" -#: apt-pkg/cacheset.cc:475 apt-pkg/cacheset.cc:483 +#: apt-pkg/cacheset.cc:480 apt-pkg/cacheset.cc:488 #, c-format msgid "" "Can't select installed nor candidate version from package '%s' as it has " "neither of them" msgstr "" -#: apt-pkg/cacheset.cc:491 +#: apt-pkg/cacheset.cc:496 #, c-format msgid "Can't select newest version from package '%s' as it is purely virtual" msgstr "" -#: apt-pkg/cacheset.cc:499 +#: apt-pkg/cacheset.cc:504 #, c-format msgid "Can't select candidate version from package %s as it has no candidate" msgstr "" -#: apt-pkg/cacheset.cc:507 +#: apt-pkg/cacheset.cc:512 #, c-format msgid "Can't select installed version from package %s as it is not installed" msgstr "" -#: apt-pkg/edsp.cc:32 apt-pkg/edsp.cc:52 +#: apt-pkg/edsp.cc:41 apt-pkg/edsp.cc:61 msgid "Send scenario to solver" msgstr "" -#: apt-pkg/edsp.cc:204 +#: apt-pkg/edsp.cc:213 msgid "Send request to solver" msgstr "" -#: apt-pkg/edsp.cc:272 +#: apt-pkg/edsp.cc:281 msgid "Prepare for receiving solution" msgstr "" -#: apt-pkg/edsp.cc:279 +#: apt-pkg/edsp.cc:288 msgid "External solver failed without a proper error message" msgstr "" -#: apt-pkg/edsp.cc:550 apt-pkg/edsp.cc:553 apt-pkg/edsp.cc:558 +#: apt-pkg/edsp.cc:559 apt-pkg/edsp.cc:562 apt-pkg/edsp.cc:567 msgid "Execute external solver" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:69 +#: apt-pkg/deb/dpkgpm.cc:71 #, c-format msgid "Installing %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:70 apt-pkg/deb/dpkgpm.cc:864 +#: apt-pkg/deb/dpkgpm.cc:72 apt-pkg/deb/dpkgpm.cc:866 #, c-format msgid "Configuring %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:71 apt-pkg/deb/dpkgpm.cc:871 +#: apt-pkg/deb/dpkgpm.cc:73 apt-pkg/deb/dpkgpm.cc:873 #, c-format msgid "Removing %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:72 +#: apt-pkg/deb/dpkgpm.cc:74 #, c-format msgid "Completely removing %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:73 +#: apt-pkg/deb/dpkgpm.cc:75 #, c-format msgid "Noting disappearance of %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:74 +#: apt-pkg/deb/dpkgpm.cc:76 #, c-format msgid "Running post-installation trigger %s" msgstr "" #. FIXME: use a better string after freeze -#: apt-pkg/deb/dpkgpm.cc:670 +#: apt-pkg/deb/dpkgpm.cc:672 #, c-format msgid "Directory '%s' missing" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:685 apt-pkg/deb/dpkgpm.cc:705 +#: apt-pkg/deb/dpkgpm.cc:687 apt-pkg/deb/dpkgpm.cc:707 #, c-format msgid "Could not open file '%s'" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:857 +#: apt-pkg/deb/dpkgpm.cc:859 #, c-format msgid "Preparing %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:858 +#: apt-pkg/deb/dpkgpm.cc:860 #, c-format msgid "Unpacking %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:863 +#: apt-pkg/deb/dpkgpm.cc:865 #, c-format msgid "Preparing to configure %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:865 +#: apt-pkg/deb/dpkgpm.cc:867 #, c-format msgid "Installed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:870 +#: apt-pkg/deb/dpkgpm.cc:872 #, c-format msgid "Preparing for removal of %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:872 +#: apt-pkg/deb/dpkgpm.cc:874 #, c-format msgid "Removed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:877 +#: apt-pkg/deb/dpkgpm.cc:879 #, c-format msgid "Preparing to completely remove %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:878 +#: apt-pkg/deb/dpkgpm.cc:880 #, c-format msgid "Completely removed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:1098 +#: apt-pkg/deb/dpkgpm.cc:1111 msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:1129 +#: apt-pkg/deb/dpkgpm.cc:1141 msgid "Running dpkg" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:1354 +#: apt-pkg/deb/dpkgpm.cc:1320 +msgid "Operation was interrupted before it could finish" +msgstr "" + +#: apt-pkg/deb/dpkgpm.cc:1377 msgid "No apport report written because MaxReports is reached already" msgstr "" #. check if its not a follow up error -#: apt-pkg/deb/dpkgpm.cc:1359 +#: apt-pkg/deb/dpkgpm.cc:1382 msgid "dependency problems - leaving unconfigured" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:1361 +#: apt-pkg/deb/dpkgpm.cc:1384 msgid "" "No apport report written because the error message indicates its a followup " "error from a previous failure." msgstr "" -#: apt-pkg/deb/dpkgpm.cc:1367 +#: apt-pkg/deb/dpkgpm.cc:1390 msgid "" "No apport report written because the error message indicates a disk full " "error" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:1373 +#: apt-pkg/deb/dpkgpm.cc:1396 msgid "" "No apport report written because the error message indicates a out of memory " "error" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:1380 +#: apt-pkg/deb/dpkgpm.cc:1403 msgid "" "No apport report written because the error message indicates a dpkg I/O error" msgstr "" -#: apt-pkg/deb/debsystem.cc:79 +#: apt-pkg/deb/debsystem.cc:84 #, c-format msgid "" "Unable to lock the administration directory (%s), is another process using " "it?" msgstr "" -#: apt-pkg/deb/debsystem.cc:82 +#: apt-pkg/deb/debsystem.cc:87 #, c-format msgid "Unable to lock the administration directory (%s), are you root?" msgstr "" #. TRANSLATORS: the %s contains the recovery command, usually #. dpkg --configure -a -#: apt-pkg/deb/debsystem.cc:98 +#: apt-pkg/deb/debsystem.cc:103 #, c-format msgid "" "dpkg was interrupted, you must manually run '%s' to correct the problem. " msgstr "" -#: apt-pkg/deb/debsystem.cc:116 +#: apt-pkg/deb/debsystem.cc:121 msgid "Not locked" msgstr "" #. FIXME: fallback to a default mirror here instead #. and provide a config option to define that default -#: methods/mirror.cc:260 +#: methods/mirror.cc:279 #, c-format msgid "No mirror file '%s' found " msgstr "" #. FIXME: fallback to a default mirror here instead #. and provide a config option to define that default -#: methods/mirror.cc:267 +#: methods/mirror.cc:286 #, c-format msgid "Can not read mirror file '%s'" msgstr "" -#: methods/mirror.cc:422 +#: methods/mirror.cc:441 #, c-format msgid "[Mirror: %s]" msgstr "" -#: methods/rred.cc:503 +#: methods/rred.cc:509 #, c-format msgid "" "Could not patch %s with mmap and with file operation usage - the patch seems " "to be corrupt." msgstr "" -#: methods/rred.cc:508 +#: methods/rred.cc:514 #, c-format msgid "" "Could not patch %s with mmap (but no mmap specific fail) - the patch seems " "to be corrupt." msgstr "" -#: methods/rsh.cc:330 +#: methods/rsh.cc:336 msgid "Connection closed prematurely" msgstr "" @@ -1080,7 +1080,7 @@ msgstr "La commande de mise à jour ne prend pas d'argument" #: cmdline/apt-get.cc:1653 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "" -"Aucune suppression n'est sensée se produire : impossible de lancer " +"Aucune suppression n'est censée se produire : impossible de lancer " "« Autoremover »" #: cmdline/apt-get.cc:1748 diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 000000000..da0a49b0c --- /dev/null +++ b/test/Makefile @@ -0,0 +1,16 @@ +# -*- make -*- + +# This is the top level test makefile for APT, it recurses to each lower +# level make file and runs it with the proper target +ifndef NOISY +.SILENT: +endif + +.PHONY: headers library clean veryclean all binary program doc test +all clean veryclean binary program dirs test: + $(MAKE) -C libapt $@ + $(MAKE) -C interactive-helper $@ + +# Some very common aliases +.PHONY: maintainer-clean dist-clean distclean pristine sanity +maintainer-clean dist-clean distclean pristine sanity: veryclean diff --git a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Packages b/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Packages deleted file mode 100644 index 3e7265438..000000000 --- a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Packages +++ /dev/null @@ -1,25 +0,0 @@ -Package: libglib2.0-data -Priority: optional -Section: misc -Installed-Size: 2288 -Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com> -Original-Maintainer: Loic Minier <lool@dooz.org> -Architecture: all -Source: glib2.0 -Version: 2.13.6-1ubuntu1 -Replaces: libglib1.3, libglib1.3-data -Depends: libglib2.0-0 (>= 2.13.6-1ubuntu1) -Conflicts: libglib1.3-data -Filename: ./libglib2.0-data_2.13.6-1ubuntu1_all.deb -Size: 958 -MD5sum: 803fc5e2e31a4345b3e9c771e1eae49f -SHA1: 75b2c62b21bae60c58e694dd40ed6d4df946e304 -SHA256: 142d8466eac252f06bc957d76fe1bb87f86f2d3512b99c8d4b08c1ad79fbe59e -Description: Common files for GLib library - GLib is a library containing many useful C routines for things such - as trees, hashes, lists, and strings. It is a useful general-purpose - C library used by projects such as GTK+, GIMP, and GNOME. - . - This package is needed for the runtime libraries to display messages in - languages other than English. - diff --git a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release b/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release deleted file mode 100644 index 7ecd4cd19..000000000 --- a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release +++ /dev/null @@ -1,13 +0,0 @@ -Date: Fri, 27 Jul 2007 14:39:41 UTC -MD5Sum: - 4672dadea6a144839f823c9f3d5fd44b 934 Packages - 82ebcf09a8d78a2b9cf7759349da4936 603 Packages.gz - d41d8cd98f00b204e9800998ecf8427e 0 Release -SHA1: - fa0f294aa30789529371066b10e9497be1284d26 934 Packages - f4032808663b2810d87b4a4dab6f5ae4a1e8fa8e 603 Packages.gz - da39a3ee5e6b4b0d3255bfef95601890afd80709 0 Release -SHA256: - 92c9b605480dc74e6be79c0ddc24738bfcbd6dd3148af531acd68717de528049 934 Packages - 659ccc0d07ff21f0247f9fa5abe149221c90d5e17da52c7afddb035b93c23d39 603 Packages.gz - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Release diff --git a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release.gpg b/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release.gpg deleted file mode 100644 index 85c356e6f..000000000 --- a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release.gpg +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) - -iD8DBQBGqgOwliSD4VZixzQRAs6jAJ9p7Aiob9gzkUNCtoW8UPrBo0E/YwCdEaz0 -CQJszU6fRYX5jGWXSWzfc5c= -=ugH0 ------END PGP SIGNATURE----- diff --git a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages b/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages deleted file mode 100644 index 3e7265438..000000000 --- a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages +++ /dev/null @@ -1,25 +0,0 @@ -Package: libglib2.0-data -Priority: optional -Section: misc -Installed-Size: 2288 -Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com> -Original-Maintainer: Loic Minier <lool@dooz.org> -Architecture: all -Source: glib2.0 -Version: 2.13.6-1ubuntu1 -Replaces: libglib1.3, libglib1.3-data -Depends: libglib2.0-0 (>= 2.13.6-1ubuntu1) -Conflicts: libglib1.3-data -Filename: ./libglib2.0-data_2.13.6-1ubuntu1_all.deb -Size: 958 -MD5sum: 803fc5e2e31a4345b3e9c771e1eae49f -SHA1: 75b2c62b21bae60c58e694dd40ed6d4df946e304 -SHA256: 142d8466eac252f06bc957d76fe1bb87f86f2d3512b99c8d4b08c1ad79fbe59e -Description: Common files for GLib library - GLib is a library containing many useful C routines for things such - as trees, hashes, lists, and strings. It is a useful general-purpose - C library used by projects such as GTK+, GIMP, and GNOME. - . - This package is needed for the runtime libraries to display messages in - languages other than English. - diff --git a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release b/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release deleted file mode 100644 index 7ecd4cd19..000000000 --- a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release +++ /dev/null @@ -1,13 +0,0 @@ -Date: Fri, 27 Jul 2007 14:39:41 UTC -MD5Sum: - 4672dadea6a144839f823c9f3d5fd44b 934 Packages - 82ebcf09a8d78a2b9cf7759349da4936 603 Packages.gz - d41d8cd98f00b204e9800998ecf8427e 0 Release -SHA1: - fa0f294aa30789529371066b10e9497be1284d26 934 Packages - f4032808663b2810d87b4a4dab6f5ae4a1e8fa8e 603 Packages.gz - da39a3ee5e6b4b0d3255bfef95601890afd80709 0 Release -SHA256: - 92c9b605480dc74e6be79c0ddc24738bfcbd6dd3148af531acd68717de528049 934 Packages - 659ccc0d07ff21f0247f9fa5abe149221c90d5e17da52c7afddb035b93c23d39 603 Packages.gz - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Release diff --git a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg b/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg deleted file mode 100644 index 85c356e6f..000000000 --- a/test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) - -iD8DBQBGqgOwliSD4VZixzQRAs6jAJ9p7Aiob9gzkUNCtoW8UPrBo0E/YwCdEaz0 -CQJszU6fRYX5jGWXSWzfc5c= -=ugH0 ------END PGP SIGNATURE----- diff --git a/test/authReliability/sources.list.failure b/test/authReliability/sources.list.failure deleted file mode 100644 index 110f31884..000000000 --- a/test/authReliability/sources.list.failure +++ /dev/null @@ -1,2 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/gpg-package-broken/ / - diff --git a/test/authReliability/sources.list.good b/test/authReliability/sources.list.good deleted file mode 100644 index 2e9a4458a..000000000 --- a/test/authReliability/sources.list.good +++ /dev/null @@ -1,2 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/gpg-package-ok/ / - diff --git a/test/conf.cc b/test/conf.cc deleted file mode 100644 index 340647b5f..000000000 --- a/test/conf.cc +++ /dev/null @@ -1,37 +0,0 @@ -#include <apt-pkg/configuration.h> -#include <apt-pkg/error.h> - -using namespace std; - -int main(int argc,const char *argv[]) -{ - Configuration Cnf; - - ReadConfigFile(Cnf,argv[1],true); - - // Process 'simple-key' type sections - const Configuration::Item *Top = Cnf.Tree("simple-key"); - for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) - { - Configuration Block(Top); - - string VendorID = Top->Tag; - string FingerPrint = Block.Find("Fingerprint"); - string Name = Block.Find("Name"); // Description? - - if (FingerPrint.empty() == true || Name.empty() == true) - _error->Error("Block %s is invalid",VendorID.c_str()); - - cout << VendorID << ' ' << FingerPrint << ' ' << Name << endl; - } - - // Print any errors or warnings found during parsing - if (_error->empty() == false) - { - bool Errors = _error->PendingError(); - _error->DumpErrors(); - return Errors == true?100:0; - } - - return 0; -} diff --git a/test/conf_clear.cc b/test/conf_clear.cc deleted file mode 100644 index 259aa0f39..000000000 --- a/test/conf_clear.cc +++ /dev/null @@ -1,23 +0,0 @@ -#include <apt-pkg/configuration.h> -#include <apt-pkg/error.h> - -using namespace std; - -int main(int argc,const char *argv[]) -{ - Configuration Cnf; - - cout << "adding elements" << endl; - Cnf.Set("APT::Keep-Fds::",28); - Cnf.Set("APT::Keep-Fds::",17); - Cnf.Set("APT::Keep-Fds::",47); - Cnf.Dump(); - - cout << "Removing elements" << endl; - Cnf.Clear("APT::Keep-Fds",17); - Cnf.Clear("APT::Keep-Fds",28); - Cnf.Clear("APT::Keep-Fds",47); - Cnf.Dump(); - - return 0; -} diff --git a/test/fake-status b/test/fake-status deleted file mode 100644 index 9e6366d5b..000000000 --- a/test/fake-status +++ /dev/null @@ -1,16 +0,0 @@ -Package: libglib2.0-0 -Status: install ok installed -Priority: optional -Section: libs -Installed-Size: 1376 -Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com> -Architecture: all -Source: glib2.0 -Version: 2.13.7-1ubuntu1 -Description: The GLib library of C routines - GLib is a library containing many useful C routines for things such - as trees, hashes, lists, and strings. It is a useful general-purpose - C library used by projects such as GTK+, GIMP, and GNOME. - . - This package contains the shared libraries. -Original-Maintainer: Loic Minier <lool@dooz.org> diff --git a/test/integration/framework b/test/integration/framework index fa451cf4f..b55f793a4 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1,16 +1,19 @@ #!/bin/sh -- # no runable script, just for vi # we all like colorful messages -CERROR="[1;31m" # red -CWARNING="[1;33m" # yellow -CMSG="[1;32m" # green -CINFO="[1;96m" # light blue -CDEBUG="[1;94m" # blue -CNORMAL="[0;39m" # default system console color -CDONE="[1;32m" # green -CPASS="[1;32m" # green -CFAIL="[1;31m" # red -CCMD="[1;35m" # pink +if expr match "$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev/null && \ + expr match "$(readlink -f /proc/$$/fd/2)" '/dev/pts/[0-9]\+' > /dev/null; then + CERROR="[1;31m" # red + CWARNING="[1;33m" # yellow + CMSG="[1;32m" # green + CINFO="[1;96m" # light blue + CDEBUG="[1;94m" # blue + CNORMAL="[0;39m" # default system console color + CDONE="[1;32m" # green + CPASS="[1;32m" # green + CFAIL="[1;31m" # red + CCMD="[1;35m" # pink +fi msgdie() { echo "${CERROR}E: $1${CNORMAL}" >&2; exit 1; } msgwarn() { echo "${CWARNING}W: $1${CNORMAL}" >&2; } @@ -42,7 +45,11 @@ if [ $MSGLEVEL -le 2 ]; then msgtest() { true; } msgpass() { echo -n " ${CPASS}P${CNORMAL}" >&2; } msgskip() { echo -n " ${CWARNING}S${CNORMAL}" >&2; } - msgfail() { echo -n " ${CFAIL}FAIL${CNORMAL}" >&2; } + if [ -n "$CFAIL" ]; then + msgfail() { echo -n " ${CFAIL}FAIL${CNORMAL}" >&2; } + else + msgfail() { echo -n " ###FAILED###" >&2; } + fi fi if [ $MSGLEVEL -le 3 ]; then msginfo() { true; } @@ -142,6 +149,7 @@ setupenvironment() { echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf echo "DPKG::options:: \"--force-bad-path\";" >> aptconfig.conf + echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it… echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf echo 'quiet::NoUpdate "true";' >> aptconfig.conf export LC_ALL=C @@ -149,13 +157,26 @@ setupenvironment() { msgdone "info" } +getarchitecture() { + if [ "$1" = "native" -o -z "$1" ]; then + eval `aptconfig shell ARCH APT::Architecture` + if [ -n "$ARCH" ]; then + echo $ARCH + else + dpkg-architecture -qDEB_BUILD_ARCH + fi + else + echo $1 + fi +} + configarchitecture() { local CONFFILE=rootdir/etc/apt/apt.conf.d/01multiarch.conf rm -f $CONFFILE - echo "APT::Architecture \"$1\";" > $CONFFILE + echo "APT::Architecture \"$(getarchitecture $1)\";" > $CONFFILE shift while [ -n "$1" ]; do - echo "APT::Architectures:: \"$1\";" >> $CONFFILE + echo "APT::Architectures:: \"$(getarchitecture $1)\";" >> $CONFFILE shift done } @@ -268,7 +289,7 @@ Package: $NAME" > ${BUILDDIR}/debian/control echo "pool/${SRC}" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.srclist done - for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do + for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do rm -rf ${BUILDDIR}/debian/tmp mkdir -p ${BUILDDIR}/debian/tmp/DEBIAN ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME} ${BUILDDIR}/debian/tmp/usr/bin cp ${BUILDDIR}/debian/copyright ${BUILDDIR}/debian/changelog ${BUILDDIR}/FEATURES ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME} @@ -291,6 +312,7 @@ buildpackage() { local BUILDDIR=$1 local RELEASE=$2 local SECTION=$3 + local ARCH=$(getarchitecture $4) msgninfo "Build package $(echo "$BUILDDIR" | grep -o '[^/]*$') for ${RELEASE} in ${SECTION}… " cd $BUILDDIR if [ "$ARCH" = "all" ]; then @@ -401,7 +423,7 @@ insertpackage() { local DEPENDENCIES="$5" local PRIORITY="${6:-optional}" local ARCHS="" - for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do + for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do if [ "$arch" = "all" ]; then ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')" else @@ -458,7 +480,7 @@ insertinstalledpackage() { local DEPENDENCIES="$4" local PRIORITY="${5:-optional}" local FILE="rootdir/var/lib/dpkg/status" - for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do + for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do echo "Package: $NAME Status: install ok installed Priority: $PRIORITY @@ -506,10 +528,12 @@ buildaptarchivefromfiles() { # can be overridden by testcases for their pleasure getcodenamefromsuite() { echo -n "$1"; } getreleaseversionfromsuite() { true; } +getlabelfromsuite() { true; } generatereleasefiles() { + # $1 is the Date header and $2 is the ValidUntil header to be set + # both should be given in notation date/touch can understand msgninfo "\tGenerate Release files… " - local DATE="${1:-now}" if [ -e aptarchive/dists ]; then for dir in $(find ./aptarchive/dists -mindepth 3 -maxdepth 3 -type d -name 'i18n'); do aptftparchive -qq release $dir -o APT::FTPArchive::Release::Patterns::='Translation-*' > $dir/Index @@ -518,27 +542,35 @@ generatereleasefiles() { local SUITE="$(echo "$dir" | cut -d'/' -f 4)" local CODENAME="$(getcodenamefromsuite $SUITE)" local VERSION="$(getreleaseversionfromsuite $SUITE)" - if [ -z "$VERSION" ]; then - aptftparchive -qq release $dir \ - -o APT::FTPArchive::Release::Suite="${SUITE}" \ - -o APT::FTPArchive::Release::Codename="${CODENAME}" \ - | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference - else - aptftparchive -qq release $dir \ - -o APT::FTPArchive::Release::Suite="${SUITE}" \ - -o APT::FTPArchive::Release::Codename="${CODENAME}" \ - -o APT::FTPArchive::Release::Version="${VERSION}" \ - | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference + local LABEL="$(getlabelfromsuite $SUITE)" + if [ -n "$VERSION" ]; then + VERSION="-o APT::FTPArchive::Release::Version=${VERSION}" + fi + if [ -n "$LABEL" ]; then + LABEL="-o APT::FTPArchive::Release::Label=${LABEL}" fi + aptftparchive -qq release $dir \ + -o APT::FTPArchive::Release::Suite="${SUITE}" \ + -o APT::FTPArchive::Release::Codename="${CODENAME}" \ + ${LABEL} \ + ${VERSION} \ + | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference if [ "$SUITE" = "experimental" -o "$SUITE" = "experimental2" ]; then sed -i '/^Date: / a\ NotAutomatic: yes' $dir/Release fi + if [ -n "$1" -a "$1" != "now" ]; then + sed -i "s/^Date: .*$/Date: $(date -d "$1" '+%a, %d %b %Y %H:%M:%S %Z')/" $dir/Release + fi + if [ -n "$2" ]; then + sed -i "/^Date: / a\ +Valid-Until: $(date -d "$2" '+%a, %d %b %Y %H:%M:%S %Z')" $dir/Release + fi done else aptftparchive -qq release ./aptarchive | sed -e '/0 Release$/ d' > aptarchive/Release # remove the self reference fi - if [ "$DATE" != "now" ]; then + if [ -n "$1" -a "$1" != "now" ]; then for release in $(find ./aptarchive -name 'Release'); do touch -d "$1" $release done @@ -612,6 +644,11 @@ changetowebserver() { if which weborf > /dev/null; then weborf -xb aptarchive/ 2>&1 > /dev/null & addtrap "kill $!;" + elif which gatling > /dev/null; then + cd aptarchive + gatling -p 8080 -F -S 2>&1 > /dev/null & + addtrap "kill $!;" + cd - > /dev/null elif which lighttpd > /dev/null; then echo "server.document-root = \"$(readlink -f ./aptarchive)\" server.port = 8080 @@ -693,8 +730,7 @@ N: Can't select versions from package '$1' as it is purely virtual" N: No packages found" local COMPAREFILE=$(mktemp) addtrap "rm $COMPAREFILE;" - local ARCH=$(dpkg-architecture -qDEB_HOST_ARCH_CPU) - eval `apt-config shell ARCH APT::Architecture` + local ARCH="$(getarchitecture 'native')" echo "$VIRTUAL" | sed -e "s/:$ARCH//" -e 's/:all//' > $COMPAREFILE aptcache show -q=0 $PACKAGE 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail } diff --git a/test/integration/makefile b/test/integration/makefile new file mode 100644 index 000000000..fb12fe9a8 --- /dev/null +++ b/test/integration/makefile @@ -0,0 +1,10 @@ +# -*- make -*- +BASE=../.. +SUBDIR=test/integration + +# Bring in the default rules +include ../../buildlib/defaults.mak + +.PHONY: test +test: + ./run-tests diff --git a/test/integration/run-tests b/test/integration/run-tests index edac07dbf..75f2ad662 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -8,17 +8,30 @@ if [ "$1" = "-q" ]; then elif [ "$1" = "-v" ]; then export MSGLEVEL=4 fi + +if expr match "$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev/null; then + CTEST='\033[1;32m' + CHIGH='\033[1;35m' + CRESET='\033[0m' +elif [ -z "${MSGLEVEL}" ]; then + export MSGLEVEL=2 +fi + +if [ -z "$MSGLEVEL" ]; then + MSGLEVEL=5 +fi + for testcase in $(run-parts --list $DIR | grep '/test-'); do - if [ "$1" = "-q" ]; then - echo -n "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m" + if [ "$MSGLEVEL" -le 2 ]; then + echo -n "${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: " else - echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m" + echo "${CTEST}Run Testcase ${CHIGH}$(basename ${testcase})${CRESET}" fi if ! ${testcase}; then FAIL=$((FAIL+1)) echo "$(basename $testcase) ... FAIL" fi - if [ "$1" = "-q" ]; then + if [ "$MSGLEVEL" -le 2 ]; then echo fi done diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download index 7db93c32f..4edb7c173 100755 --- a/test/integration/test-apt-get-download +++ b/test/integration/test-apt-get-download @@ -13,13 +13,12 @@ buildsimplenativepackage 'apt' 'all' '2.0' 'unstable' setupaptarchive testdownload() { - msgtest 'Test download of package file' $1 - if [ -z "$3" ]; then - aptget download ${2} - else - aptget download ${2}/${3} + local APT="$2" + if [ -n "$3" ]; then + APT="${APT}/${3}" fi - test -f $1 && msgpass || msgfail + msgtest "Test download of package file $1 with" "$APT" + aptget -qq download ${APT} && test -f $1 && msgpass || msgfail } testdownload apt_1.0_all.deb apt stable diff --git a/test/integration/test-bug-254770-segfault-if-cache-not-buildable b/test/integration/test-bug-254770-segfault-if-cache-not-buildable index b9f45b131..8fa337ccc 100755 --- a/test/integration/test-bug-254770-segfault-if-cache-not-buildable +++ b/test/integration/test-bug-254770-segfault-if-cache-not-buildable @@ -12,7 +12,6 @@ trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM chmod a-x rootdir/var/lib/dpkg testsegfault() { - rm -f rootdir/var/cache/apt/*.bin msgtest "No segfault in" "$*" local TEST="$($* 2>&1 | grep -v 'E:')" if [ -z "$TEST" ]; then diff --git a/test/integration/test-bug-407511-fail-invalid-default-release b/test/integration/test-bug-407511-fail-invalid-default-release index d0a73af7d..7f23a1e82 100755 --- a/test/integration/test-bug-407511-fail-invalid-default-release +++ b/test/integration/test-bug-407511-fail-invalid-default-release @@ -23,18 +23,31 @@ getreleaseversionfromsuite() { fi } +getlabelfromsuite() { + if [ "$SUITE" = 'unstable' ]; then + echo -n 'UnstableTestcases' + else + echo -n 'Testcases' + fi +} + setupaptarchive passdist() { - msgtest "Test that target-release is accepted" $1 + msgtest 'Test that target-release is accepted' $1 aptget dist-upgrade -t $1 -qq && msgpass || msgfail + msgtest 'Test that target-release pins with' $1 + aptcache policy -t $1 | grep -q ' 990' && msgpass || msgfail } faildist() { - msgtest "Test that target-release is refused" $1 + msgtest 'Test that target-release is refused' $1 aptget dist-upgrade -t $1 -qq 2> /dev/null && msgfail || msgpass } +msgtest 'Test that no default-release is active in this test' 'setup' +aptcache policy | grep -q ' 990' && msgfall || msgpass + passdist unstable passdist sid faildist sidd @@ -45,3 +58,9 @@ passdist 42* passdist 4*.0 faildist 21.0 faildist 21* +# we accept, but don't validate the following +passdist a=unstable +passdist n=sid +passdist v=42.0 +passdist c=main +passdist l=UnstableTestcases diff --git a/test/integration/test-bug-590041-prefer-non-virtual-packages b/test/integration/test-bug-590041-prefer-non-virtual-packages index 3e2693f85..e0dd7737f 100755 --- a/test/integration/test-bug-590041-prefer-non-virtual-packages +++ b/test/integration/test-bug-590041-prefer-non-virtual-packages @@ -3,7 +3,7 @@ set -e . $(readlink -f $(dirname $0))/framework setupenvironment -configarchitecture "i386" "armel" +configarchitecture 'i386' 'armel' pkglibc6="Package: libc6 Architecture: armel diff --git a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order index 0f6493948..645e86d7d 100755 --- a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order +++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order @@ -25,7 +25,6 @@ MD5sum: 8489687ce10e656babd467c9ee389349 Description-de: Verschiedene Dateien für das Basis-System von Debian" predependsgawk() { - rm rootdir/var/cache/apt/*.bin cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status echo "$pkgbasefile Pre-Depends: $1 @@ -57,7 +56,6 @@ predependsgawk "awk | aawk" predependsgawk "awk" predependsgawk2() { - rm rootdir/var/cache/apt/*.bin cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status echo "$pkgbasefile Pre-Depends: $1 diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files index 11dee0628..bb1ac0e54 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -11,9 +11,9 @@ touch aptarchive/Packages setupflataptarchive testaptgetupdate() { - rm -rf rootdir/var/lib/apt rootdir/var/cache/apt + rm -rf rootdir/var/lib/apt aptget update 2>> testaptgetupdate.diff >> testaptgetupdate.diff || true - sed -i -e '/^Fetched / d' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff + sed -i -e '/^Fetched / d' -e '/Ign / d' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff GIVEN="$1" shift msgtest "Test for correctness of" "apt-get update with $*" @@ -78,7 +78,6 @@ testoverfile() { createemptyfile 'en' testaptgetupdate "Get:1 file: InRelease [] -Ign file: Translation-en Reading package lists..." "empty file en.$COMPRESS over file" createemptyarchive 'en' @@ -89,12 +88,10 @@ Reading package lists..." "empty archive en.$COMPRESS over file" # FIXME: Why omits the file transport the Packages Get line? #Get:3 file: Packages [] testaptgetupdate "Get:1 file: InRelease [] -Ign file: Translation-en Reading package lists..." "empty archive Packages.$COMPRESS over file" createemptyfile 'Packages' testaptgetupdate "Get:1 file: InRelease [] -Ign file: Translation-en Err file: Packages Empty files can't be valid archives W: Failed to fetch ${COMPRESSOR}:$(readlink -f aptarchive/Packages.$COMPRESS) Empty files can't be valid archives @@ -109,7 +106,6 @@ testoverhttp() { testaptgetupdate "Get:1 http://localhost InRelease [] Get:2 http://localhost Packages [] Get:3 http://localhost Translation-en -Ign http://localhost Translation-en Reading package lists..." "empty file en.$COMPRESS over http" createemptyarchive 'en' @@ -121,14 +117,12 @@ Reading package lists..." "empty archive en.$COMPRESS over http" createemptyarchive 'Packages' testaptgetupdate "Get:1 http://localhost InRelease [] Get:2 http://localhost Packages [] -Ign http://localhost Translation-en Reading package lists..." "empty archive Packages.$COMPRESS over http" createemptyfile 'Packages' #FIXME: we should response with a good error message instead testaptgetupdate "Get:1 http://localhost InRelease [] Get:2 http://localhost Packages -Ign http://localhost Translation-en Err http://localhost Packages Empty files can't be valid archives W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial/localhost:8080_Packages) Empty files can't be valid archives diff --git a/test/integration/test-bug-601016-description-translation b/test/integration/test-bug-601016-description-translation index 2a323a201..03fddbfda 100755 --- a/test/integration/test-bug-601016-description-translation +++ b/test/integration/test-bug-601016-description-translation @@ -4,7 +4,7 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture "i386" +configarchitecture 'i386' 'amd64' # we need a valid locale here, otherwise the language configuration # will be overridden by LC_ALL=C @@ -22,8 +22,22 @@ Size: 2140230 MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08 Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c" +PACKAGESTANZA2='Package: apt +Priority: important +Section: admin +Installed-Size: 5984 +Maintainer: APT Development Team <deity@lists.debian.org> +Architecture: amd64 +Version: 0.8.7 +Filename: pool/main/a/apt/apt_0.8.7_amd64.deb +Size: 2210342 +MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a +Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c' echo "$PACKAGESTANZA +Description: Advanced front-end for dpkg + +$PACKAGESTANZA2 Description: Advanced front-end for dpkg" > aptarchive/Packages echo "Package: apt @@ -53,13 +67,22 @@ Description-${LOCALE}: Mächtige Oberfläche für dpkg APT-Dselect-Methode. Beides sind einfache und sicherere Wege, um Pakete zu installieren und Upgrades durchzuführen. " +LOCALESTANZA2="$PACKAGESTANZA2 +Description-${LOCALE}: Mächtige Oberfläche für dpkg + Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff + auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die + APT-Dselect-Methode. Beides sind einfache und sicherere Wege, + um Pakete zu installieren und Upgrades durchzuführen. +" testrun() { echo "Acquire::Languages { \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages export LC_ALL="" - rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/ + rm -rf rootdir/var/lib/apt/lists setupaptarchive testequal "$LOCALESTANZA" aptcache show apt -o Test=File-${LOCALE} + testequal "$LOCALESTANZA" aptcache show apt:i386 -o Test=File-${LOCALE} + testequal "$LOCALESTANZA2" aptcache show apt:amd64 -o Test=File-${LOCALE} testequal "$NOLONGSTANZA" aptcache show apt -o Acquire::Languages="ww" -o Test=File-${LOCALE} testequal "$LOCALESTANZA" aptcache show apt -o Acquire::Languages::="ww" -o Test=File-${LOCALE} LC_ALL=C testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-${LOCALE} @@ -73,6 +96,9 @@ testrun() { testrun echo "$PACKAGESTANZA +Description: Advanced front-end for dpkg + +$PACKAGESTANZA2 Description: Advanced front-end for dpkg" > aptarchive/Packages echo "Package: apt @@ -88,5 +114,11 @@ Description-en: Advanced front-end for dpkg It provides the apt-get utility and APT dselect method that provides a simpler, safer way to install and upgrade packages. " +ENGLISHSTANZA2="$PACKAGESTANZA2 +Description-en: Advanced front-end for dpkg + This is Debian's next generation front-end for the dpkg package manager. + It provides the apt-get utility and APT dselect method that provides a + simpler, safer way to install and upgrade packages. +" testrun diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts index b8cfe59e2..dd9efb785 100755 --- a/test/integration/test-bug-612099-multiarch-conflicts +++ b/test/integration/test-bug-612099-multiarch-conflicts @@ -4,9 +4,7 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture "i386" "amd64" - -buildsimplenativepackage 'peace-dpkg' 'all' '1.0' 'stable' +configarchitecture 'i386' 'amd64' buildsimplenativepackage 'libc6' 'i386' '1.0' 'stable' buildsimplenativepackage 'libc6' 'amd64' '1.0' 'stable' @@ -17,9 +15,6 @@ buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6' setupaptarchive -aptget install peace-dpkg:i386 -y -qq 2>&1 > /dev/null -testdpkginstalled peace-dpkg - aptget install libc6:i386 -t stable -y -qq 2>&1 > /dev/null testdpkginstalled libc6 testequal 'Reading package lists... diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep index 7e384e428..7333054cc 100755 --- a/test/integration/test-bug-618288-multiarch-same-lockstep +++ b/test/integration/test-bug-618288-multiarch-same-lockstep @@ -17,7 +17,20 @@ buildsimplenativepackage 'apt2' 'amd64' '2' 'unstable' 'Depends: libsame (= 2)' setupaptarchive -testequal 'Reading package lists... +# order in switch libsame:{amd64,i386} are unpacked is irrelevant, as both are installed - but we need to do it together +testequalor2 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + apt:i386 apt2 libsame libsame:i386 +4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst libsame:i386 [1] (2 unstable [i386]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:amd64 apt:i386 ] +Inst libsame [1] (2 unstable [amd64]) [apt2:amd64 apt:i386 ] +Conf libsame:i386 (2 unstable [i386]) [apt2:amd64 apt:i386 ] +Conf libsame (2 unstable [amd64]) [apt2:amd64 apt:i386 ] +Inst apt2 [1] (2 unstable [amd64]) [apt:i386 ] +Conf apt2 (2 unstable [amd64]) [apt:i386 ] +Inst apt:i386 [1] (2 unstable [i386]) +Conf apt:i386 (2 unstable [i386])' 'Reading package lists... Building dependency tree... The following packages will be upgraded: apt:i386 apt2 libsame libsame:i386 diff --git a/test/integration/test-bug-624218-Translation-file-handling b/test/integration/test-bug-624218-Translation-file-handling new file mode 100755 index 000000000..a1e708d2e --- /dev/null +++ b/test/integration/test-bug-624218-Translation-file-handling @@ -0,0 +1,87 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +buildsimplenativepackage 'coolstuff' 'all' '1.0' 'unstable' + +setupaptarchive + +changetowebserver + +rm -rf rootdir/var/lib/apt/lists + +msgtest 'No download of non-existent locals' 'with Index' +LC_ALL="" aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download of existent locals' 'with Index' +LC_ALL="" aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download of en in LC_ALL=C' 'with Index' +LC_ALL=C aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download of en as forced language' 'with Index' +aptget update -o Acquire::Languages=en | grep -q -e 'Translation-en ' && msgpass || msgfail +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download of nothing else in forced language' 'with Index' +aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download no Translation- if forced language is non-existent' 'with Index' +aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-' && msgfail || msgpass +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download of nothing if none is forced' 'with Index' +aptget update -o Acquire::Languages=none | grep -q -e 'Translation' && msgfail || msgpass +rm -rf rootdir/var/lib/apt/lists + +sed -i '/i18n\/Index$/ d' $(find aptarchive -name 'Release') +signreleasefiles + +# we have to try as not every archive includes the i18n Index in the Release file - if it has one at all +msgtest 'Download no Translation- if forced language is non-existent' 'with not-announced Index' +aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-' && msgfail || msgpass +rm -rf rootdir/var/lib/apt/lists + +find aptarchive -name 'Index' -delete + +msgtest 'Download of en as forced language' 'without Index' +aptget update -o Acquire::Languages=en | grep -q -e 'Translation-en ' && msgpass || msgfail +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download of nothing else in forced language' 'without Index' +aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download of ast_DE as forced language' 'without Index' +aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-ast_DE$' && msgpass || msgfail +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download of nothing else in forced language' 'without Index' +aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-[^a][^s]' && msgfail || msgpass +rm -rf rootdir/var/lib/apt/lists + +msgtest 'Download of nothing if none is forced' 'without Index' +aptget update -o Acquire::Languages=none | grep -q -e 'Translation' && msgfail || msgpass +rm -rf rootdir/var/lib/apt/lists + +mkdir -p rootdir/var/lib/apt/lists +touch rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_i18n_Translation-ast_DE + +msgtest 'Download of builtin files' 'without Index' +aptget update | grep -q -e 'Translation-ast_DE' && msgpass || msgfail +rm -rf rootdir/var/lib/apt/lists + +mkdir -p rootdir/var/lib/apt/lists +touch rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_i18n_Translation-ast_DE + +msgtest 'Download of nothing (even builtin) if none is forced' 'without Index' +aptget update -o Acquire::Languages=none | grep -q -e 'Translation' && msgfail || msgpass +rm -rf rootdir/var/lib/apt/lists diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction index 58de44843..4299f052f 100755 --- a/test/integration/test-bug-632221-cross-dependency-satisfaction +++ b/test/integration/test-bug-632221-cross-dependency-satisfaction @@ -47,10 +47,10 @@ Inst amdboot (1.0 unstable [amd64]) Inst cool (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [amd64]) Inst foreigner (1.0 unstable [amd64]) -Inst libc6:armel (1.0 unstable [armel]) Inst libc6 (1.0 unstable [amd64]) -Inst libc6-dev:armel (1.0 unstable [armel]) +Inst libc6:armel (1.0 unstable [armel]) Inst libc6-dev (1.0 unstable [amd64]) +Inst libc6-dev:armel (1.0 unstable [armel]) Conf amdboot (1.0 unstable [amd64]) Conf cool (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) @@ -90,10 +90,10 @@ Inst amdboot:amd64 (1.0 unstable [amd64]) Inst cool (1.0 unstable [armel]) Inst doxygen (1.0 unstable [armel]) Inst foreigner (1.0 unstable [armel]) -Inst libc6 (1.0 unstable [armel]) Inst libc6:amd64 (1.0 unstable [amd64]) -Inst libc6-dev (1.0 unstable [armel]) +Inst libc6 (1.0 unstable [armel]) Inst libc6-dev:amd64 (1.0 unstable [amd64]) +Inst libc6-dev (1.0 unstable [armel]) Conf amdboot:amd64 (1.0 unstable [amd64]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) @@ -129,10 +129,10 @@ The following NEW packages will be installed: 0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded. Inst amdboot (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [amd64]) -Inst libc6:armel (1.0 unstable [armel]) Inst libc6 (1.0 unstable [amd64]) -Inst libc6-dev:armel (1.0 unstable [armel]) +Inst libc6:armel (1.0 unstable [armel]) Inst libc6-dev (1.0 unstable [amd64]) +Inst libc6-dev:armel (1.0 unstable [armel]) Conf amdboot (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) @@ -169,10 +169,10 @@ The following NEW packages will be installed: 0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded. Inst amdboot:amd64 (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [armel]) -Inst libc6 (1.0 unstable [armel]) Inst libc6:amd64 (1.0 unstable [amd64]) -Inst libc6-dev (1.0 unstable [armel]) +Inst libc6 (1.0 unstable [armel]) Inst libc6-dev:amd64 (1.0 unstable [amd64]) +Inst libc6-dev (1.0 unstable [armel]) Conf amdboot:amd64 (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [armel]) Conf libc6:amd64 (1.0 unstable [amd64]) diff --git a/test/integration/test-bug-633350-do-not-kill-last-char-in-Release b/test/integration/test-bug-633350-do-not-kill-last-char-in-Release index 3d3835507..2aae7cfcc 100755 --- a/test/integration/test-bug-633350-do-not-kill-last-char-in-Release +++ b/test/integration/test-bug-633350-do-not-kill-last-char-in-Release @@ -15,7 +15,7 @@ echo 'NotAutomatic: yes' >> aptarchive/dists/unstable/Release signreleasefiles find aptarchive/dists -name 'InRelease' -delete -rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt +rm -rf rootdir/var/lib/apt/lists OUTPUT="$(aptget update 2>&1)" msgtest 'Check that parsing happens without warnings' 'with missing newline' diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index 99943574e..a5e885745 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -10,10 +10,10 @@ configarchitecture "i386" buildsimplenativepackage "testpkg" "i386" "1.0" setupaptarchive -local GOODSHOW="$(aptcache show testpkg) +GOODSHOW="$(aptcache show testpkg) " -local GOODPOLICY="$(aptcache policy testpkg)" -local GOODSHOWSRC="$(aptcache showsrc testpkg) +GOODPOLICY="$(aptcache policy testpkg)" +GOODSHOWSRC="$(aptcache showsrc testpkg) " test $(echo "$GOODSHOW" | grep -e '^Package: testpkg' -e '^Version: 1.0' -e '^Architecture: i386' | wc -l) -eq 3 || msgdie 'show is broken' @@ -51,17 +51,16 @@ testrun() { aptget clean msgtest "\tdeb file is gone"; ! test -f rootdir/var/cache/apt/archives/testpkg_1.0_i386.deb && msgpass || msgfail fi - rm rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin + rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin testequal "$GOODSHOW" aptcache show testpkg testequal "$GOODSHOW" aptcache show testpkg - rm rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin + rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin testequal "$GOODPOLICY" aptcache policy testpkg testequal "$GOODPOLICY" aptcache policy testpkg - rm rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin + rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin testequal "$GOODSHOWSRC" aptcache showsrc testpkg testequal "$GOODSHOWSRC" aptcache showsrc testpkg - rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin - rm -rf rootdir/var/cache/apt/archives + aptget clean msgtest "Check if the source is aptgetable" aptget source testpkg -qq 2> /dev/null > /dev/null && msgpass || msgfail msgtest "\tdsc file is present"; test -f testpkg_1.0.dsc && msgpass || msgfail @@ -100,7 +99,7 @@ testrun "compressed" rm rootdir/etc/apt/apt.conf.d/02compressindex changetowebserver aptget update -qq -local GOODPOLICY="$(aptcache policy testpkg)" +GOODPOLICY="$(aptcache policy testpkg)" test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 http://' | wc -l) -eq 4 testequal "$GOODPOLICY" aptcache policy testpkg diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop new file mode 100755 index 000000000..7b5724d74 --- /dev/null +++ b/test/integration/test-conflicts-loop @@ -0,0 +1,35 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertinstalledpackage 'openjdk-6-jre' 'i386' '6b16-1.8-0ubuntu1' +insertpackage 'unstable' 'openjdk-6-jre' 'i386' '6b20-1.9.8-0ubuntu1~10.04.1' 'Conflicts: openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jre-lib (<< 6b17~pre3-1)' +insertinstalledpackage 'openjdk-6-jre-lib' 'i386' '6b16-1.8-0ubuntu1' +insertpackage 'unstable' 'openjdk-6-jre-lib' 'i386' '6b20-1.9.8-0ubuntu1~10.04.1' 'Conflicts: openjdk-6-jre (<< 6b17~pre3-1), openjdk-6-jre-headless (<< 6b17~pre3-1)' +insertinstalledpackage 'openjdk-6-jre-headless' 'i386' '6b16-1.8-0ubuntu1' +insertpackage 'unstable' 'openjdk-6-jre-headless' 'i386' '6b20-1.9.8-0ubuntu1~10.04.1' 'Conflicts: openjdk-6-jre (<< 6b17~pre3-1), openjdk-6-jre-lib (<< 6b17~pre3-1)' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib +3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. + openjdk-6-jre-lib conflicts with openjdk-6-jre + openjdk-6-jre conflicts with openjdk-6-jre-headless + openjdk-6-jre-headless conflicts with openjdk-6-jre +Remv openjdk-6-jre [6b16-1.8-0ubuntu1] + openjdk-6-jre-headless conflicts with openjdk-6-jre-lib +Remv openjdk-6-jre-lib [6b16-1.8-0ubuntu1] +Inst openjdk-6-jre-headless [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) + openjdk-6-jre conflicts with openjdk-6-jre-lib +Inst openjdk-6-jre [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) +Inst openjdk-6-jre-lib [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) +Conf openjdk-6-jre-lib (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) +Conf openjdk-6-jre (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) +Conf openjdk-6-jre-headless (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386])' aptget dist-upgrade -s -o APT::Immediate-Configure-All=true diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages index b5d565c2f..0e0e9618d 100755 --- a/test/integration/test-disappearing-packages +++ b/test/integration/test-disappearing-packages @@ -4,21 +4,21 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture "i386" +configarchitecture 'native' -buildsimplenativepackage "old-pkg" "i386" "1.0" "stable" +buildsimplenativepackage "old-pkg" "native" "1.0" "stable" buildsimplenativepackage "unrelated" "all" "0.5" "unstable" -setupsimplenativepackage "new-pkg" "i386" "2.0" "unstable" "Provides: old-pkg +setupsimplenativepackage "new-pkg" "native" "2.0" "unstable" "Provides: old-pkg Replaces: old-pkg Conflicts: old-pkg (<< 2.0)" -local BUILDDIR="incoming/new-pkg-2.0" +BUILDDIR="incoming/new-pkg-2.0" echo "/usr/share/doc/new-pkg /usr/share/doc/old-pkg" > ${BUILDDIR}/debian/new-pkg.links buildpackage "$BUILDDIR" "unstable" "main" rm -rf "$BUILDDIR" setupsimplenativepackage "old-pkg" "all" "2.0" "unstable" "Depends: new-pkg" -local BUILDDIR="incoming/old-pkg-2.0" +BUILDDIR="incoming/old-pkg-2.0" echo "/usr/share/doc/new-pkg /usr/share/doc/old-pkg" > ${BUILDDIR}/debian/old-pkg.links echo " override_dh_link: @@ -33,9 +33,9 @@ aptget install old-pkg=1.0 --trivial-only -qq 2>&1 > /dev/null testmarkedauto # old-pkg is manual installed -local CMD="aptget dist-upgrade -y -q=0" +CMD="aptget dist-upgrade -y -q=0" msgtest "Test for equality of" "$CMD" -local COMPAREFILE=$(mktemp) +COMPAREFILE=$(mktemp) echo "The following package disappeared from your system as all files have been overwritten by other packages: old-pkg @@ -43,12 +43,12 @@ Note: This is done automatic and on purpose by dpkg." > $COMPAREFILE $CMD 2>&1 | tail -n 4 | diff $COMPAREFILE - && msgpass || msgfail rm $COMPAREFILE -sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' +sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -e "s#:$(getarchitecture 'native') #:native #" testfileequal "rootdir/var/log/apt/history.log" " -Install: old-pkg:i386 (1.0) +Install: old-pkg:native (1.0) -Install: new-pkg:i386 (2.0, automatic) -Upgrade: old-pkg:i386 (1.0, 2.0) +Install: new-pkg:native (2.0, automatic) +Upgrade: old-pkg:native (1.0, 2.0) Disappeared: old-pkg (1.0)" testmarkedauto # new-pkg should have get the manual flag from old-pkg diff --git a/test/integration/test-hashsum-verification b/test/integration/test-hashsum-verification index 033096ee8..3ac9eccfb 100755 --- a/test/integration/test-hashsum-verification +++ b/test/integration/test-hashsum-verification @@ -19,8 +19,6 @@ prepare() { for release in $(find rootdir/var/lib/apt/lists 2> /dev/null); do touch -d 'now - 6 hours' $release done - rm -rf rootdir/var/cache/apt/archives - rm -f rootdir/var/cache/apt/*.bin cp $1 aptarchive/Packages find aptarchive -name 'Release' -delete cat aptarchive/Packages | gzip > aptarchive/Packages.gz diff --git a/test/integration/test-package-reinstallation b/test/integration/test-package-reinstallation new file mode 100755 index 000000000..b4f2061ec --- /dev/null +++ b/test/integration/test-package-reinstallation @@ -0,0 +1,23 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertinstalledpackage 'libc-bin' 'i386' '2.13-8' 'Replaces: libc6' +insertpackage 'unstable' 'libc-bin' 'i386' '2.13-8' 'Replaces: libc6' +insertinstalledpackage 'libc6' 'i386' '2.13-8' 'Depends: libc-bin (= 2.13-8)' +insertpackage 'unstable' 'libc6' 'i386' '2.13-8' 'Depends: libc-bin (= 2.13-8)' +insertinstalledpackage 'apt' 'i386' '0.8.15' 'Depends: libc6' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded. +Inst libc-bin [2.13-8] (2.13-8 unstable [i386]) +Conf libc-bin (2.13-8 unstable [i386]) +Inst libc6 [2.13-8] (2.13-8 unstable [i386]) +Conf libc6 (2.13-8 unstable [i386])' aptget install --reinstall libc6 libc-bin -s diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning index fa356ed54..9e1ea4ac5 100755 --- a/test/integration/test-policy-pinning +++ b/test/integration/test-policy-pinning @@ -25,31 +25,70 @@ testequalpolicy() { Pinned packages:" aptcache policy $* } -aptget update -qq +aptgetupdate() { + # just to be sure that no old files are used + rm -rf rootdir/var/lib/apt + if aptget update -qq 2>&1 | grep '^E: '; then + msgwarn 'apt-get update failed with an error' + fi +} + +### not signed archive + +aptgetupdate testequalpolicy 100 500 testequalpolicy 990 500 -t now sed -i aptarchive/Release -e 1i"NotAutomatic: yes" -rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin -aptget update -qq +aptgetupdate testequalpolicy 100 1 -o Test=NotAutomatic testequalpolicy 990 1 -o Test=NotAutomatic -t now sed -i aptarchive/Release -e 1i"ButAutomaticUpgrades: yes" -rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin -aptget update -qq +aptgetupdate testequalpolicy 100 100 -o Test=ButAutomaticUpgrades testequalpolicy 990 100 -o Test=ButAutomaticUpgrades -t now sed -i aptarchive/Release -e 's#NotAutomatic: yes#NotAutomatic: no#' -e '/ButAutomaticUpgrades: / d' -rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin -aptget update -qq +aptgetupdate testequalpolicy 100 500 -o Test=Automatic testequalpolicy 990 500 -o Test=Automatic -t now +sed -i aptarchive/Release -e '/NotAutomatic: / d' -e '/ButAutomaticUpgrades: / d' + +### signed but no key in trusted + +signreleasefiles 'Marvin Paranoid' +aptgetupdate +testequalpolicy 100 500 +testequalpolicy 990 500 -t now + +sed -i aptarchive/Release -e 1i"NotAutomatic: yes" +signreleasefiles 'Marvin Paranoid' +aptgetupdate + +testequalpolicy 100 1 -o Test=NotAutomatic +testequalpolicy 990 1 -o Test=NotAutomatic -t now + +sed -i aptarchive/Release -e 1i"ButAutomaticUpgrades: yes" +signreleasefiles 'Marvin Paranoid' +aptgetupdate + +testequalpolicy 100 100 -o Test=ButAutomaticUpgrades +testequalpolicy 990 100 -o Test=ButAutomaticUpgrades -t now + +sed -i aptarchive/Release -e 's#NotAutomatic: yes#NotAutomatic: no#' -e '/ButAutomaticUpgrades: / d' +signreleasefiles 'Marvin Paranoid' +aptgetupdate + +testequalpolicy 100 500 -o Test=Automatic +testequalpolicy 990 500 -o Test=Automatic -t now + +### signed and valid key + buildsimplenativepackage "coolstuff" "all" "1.0" "stable" buildsimplenativepackage "coolstuff" "all" "2.0~bpo1" "backports" @@ -135,8 +174,7 @@ Pin-Priority: -1" > rootdir/etc/apt/preferences rm rootdir/etc/apt/preferences sed -i aptarchive/dists/backports/Release -e 1i"NotAutomatic: yes" signreleasefiles -rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin -aptget update -qq +aptgetupdate testequalpolicycoolstuff "" "1.0" 1 500 0 "" -o Test=NotAutomatic testequalpolicycoolstuff "" "1.0" 1 990 0 "" -o Test=NotAutomatic -t stable @@ -164,8 +202,7 @@ testequalpolicycoolstuff "" "1.0" 1 990 600 "2.0~bpo1" -o Test=NotAutomatic -t s rm rootdir/etc/apt/preferences sed -i aptarchive/dists/backports/Release -e 1i"ButAutomaticUpgrades: yes" signreleasefiles -rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin -aptget update -qq +aptgetupdate testequalpolicycoolstuff "" "1.0" 100 500 0 "" -o Test=ButAutomaticUpgrades testequalpolicycoolstuff "" "1.0" 100 990 0 "" -o Test=ButAutomaticUpgrades -t stable @@ -211,8 +248,7 @@ setupaptarchive sed -i aptarchive/dists/backports/Release -e 1i"NotAutomatic: yes" signreleasefiles -rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin -aptget update -qq +aptgetupdate testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 500 0 "" "2.0~bpo2" -o Test=NotAutomatic testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 990 0 "" "2.0~bpo2" -o Test=NotAutomatic -t stable @@ -220,8 +256,7 @@ testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 990 500 0 "" "2.0~bpo2" -o Test=N sed -i aptarchive/dists/backports/Release -e 1i"ButAutomaticUpgrades: yes" signreleasefiles -rm rootdir/var/cache/apt/srcpkgcache.bin rootdir/var/cache/apt/pkgcache.bin -aptget update -qq +aptgetupdate testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 500 0 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 990 0 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades -t stable diff --git a/test/integration/test-provides-gone-with-upgrade b/test/integration/test-provides-gone-with-upgrade new file mode 100755 index 000000000..70384ce29 --- /dev/null +++ b/test/integration/test-provides-gone-with-upgrade @@ -0,0 +1,26 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertinstalledpackage 'apt' 'i386' '0.8.14' 'Provides: libapt-pkg4.10' +insertpackage 'unstable' 'apt' 'i386' '0.8.15' 'Depends: libapt-pkg4.10' +insertpackage 'unstable' 'libapt-pkg4.10' 'i386' '0.8.15' 'Breaks: apt (<< 0.8.15) +Replaces: apt (<< 0.8.15)' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + libapt-pkg4.10 +The following packages will be upgraded: + apt +1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst apt [0.8.14] (0.8.15 unstable [i386]) [] +Inst libapt-pkg4.10 (0.8.15 unstable [i386]) +Conf libapt-pkg4.10 (0.8.15 unstable [i386]) +Conf apt (0.8.15 unstable [i386])' aptget dist-upgrade -s diff --git a/test/integration/test-releasefile-valid-until b/test/integration/test-releasefile-valid-until new file mode 100755 index 000000000..680a370cb --- /dev/null +++ b/test/integration/test-releasefile-valid-until @@ -0,0 +1,95 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +insertpackage 'wheezy' 'apt' 'all' '0.8.15' + +getlabelfromsuite() { + echo -n 'Testcases' +} + + +setupaptarchive + +setupreleasefile() { + rm -rf rootdir/var/lib/apt/lists + aptget clean + generatereleasefiles "$1" "$2" + signreleasefiles +} + +aptgetupdate() { + if aptget update $* 2>&1 | grep -q 'is expired'; then + return 1 + else + return 0 + fi +} + +setupreleasefile +msgtest 'Release file is accepted as it has' 'no Until' +aptgetupdate && msgpass || msgfail + +setupreleasefile +msgtest 'Release file is accepted as it has' 'no Until and good Max-Valid' +aptgetupdate -o Acquire::Max-ValidTime=3600 && msgpass || msgfail + +setupreleasefile 'now - 2 days' +msgtest 'Release file is rejected as it has' 'no Until, but bad Max-Valid' +aptgetupdate -o Acquire::Max-ValidTime=3600 && msgfail || msgpass + +setupreleasefile 'now - 3 days' 'now + 1 day' +msgtest 'Release file is accepted as it has' 'good Until' +aptgetupdate && msgpass || msgfail + +setupreleasefile 'now - 7 days' 'now - 4 days' +msgtest 'Release file is rejected as it has' 'bad Until' +aptgetupdate && msgfail || msgpass + +setupreleasefile 'now - 7 days' 'now - 4 days' +msgtest 'Release file is rejected as it has' 'bad Until (ignore good Max-Valid)' +aptgetupdate -o Acquire::Max-ValidTime=1209600 && msgfail || msgpass + +setupreleasefile 'now - 7 days' 'now - 4 days' +msgtest 'Release file is rejected as it has' 'bad Max-Valid (bad Until)' +aptgetupdate -o Acquire::Max-ValidTime=86400 && msgfail || msgpass + +setupreleasefile 'now - 7 days' 'now + 4 days' +msgtest 'Release file is rejected as it has' 'bad Max-Valid (good Until)' +aptgetupdate -o Acquire::Max-ValidTime=86400 && msgfail || msgpass + +setupreleasefile 'now - 7 days' 'now + 4 days' +msgtest 'Release file is accepted as it has' 'good labeled Max-Valid' +aptgetupdate -o Acquire::Max-ValidTime=86400 -o Acquire::Max-ValidTime::Testcases=1209600 && msgpass || msgfail + +setupreleasefile 'now - 7 days' 'now + 4 days' +msgtest 'Release file is rejected as it has' 'bad labeled Max-Valid' +aptgetupdate -o Acquire::Max-ValidTime=1209600 -o Acquire::Max-ValidTime::Testcases=86400 && msgfail || msgpass + +setupreleasefile 'now - 7 days' 'now + 1 days' +msgtest 'Release file is accepted as it has' 'good Until (good Min-Valid, no Max-Valid)' +aptgetupdate -o Acquire::Min-ValidTime=1209600 && msgpass || msgfail + +setupreleasefile 'now - 7 days' 'now - 4 days' +msgtest 'Release file is accepted as it has' 'good Min-Valid (bad Until, no Max-Valid)' +aptgetupdate -o Acquire::Min-ValidTime=1209600 && msgpass || msgfail + +setupreleasefile 'now - 7 days' 'now - 2 days' +msgtest 'Release file is accepted as it has' 'good Min-Valid (bad Until, good Max-Valid) <' +aptgetupdate -o Acquire::Min-ValidTime=1209600 -o Acquire::Max-ValidTime=2419200 && msgpass || msgfail + +setupreleasefile 'now - 7 days' 'now - 2 days' +msgtest 'Release file is rejected as it has' 'bad Max-Valid (bad Until, good Min-Valid) >' +aptgetupdate -o Acquire::Max-ValidTime=12096 -o Acquire::Min-ValidTime=2419200 && msgfail || msgpass + +setupreleasefile 'now - 7 days' 'now - 2 days' +msgtest 'Release file is rejected as it has' 'bad Max-Valid (bad Until, bad Min-Valid) <' +aptgetupdate -o Acquire::Min-ValidTime=12096 -o Acquire::Max-ValidTime=241920 && msgfail || msgpass + +setupreleasefile 'now - 7 days' 'now - 2 days' +msgtest 'Release file is rejected as it has' 'bad Max-Valid (bad Until, bad Min-Valid) >' +aptgetupdate -o Acquire::Max-ValidTime=12096 -o Acquire::Min-ValidTime=241920 && msgfail || msgpass diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification index 961c49895..8bf02a78f 100755 --- a/test/integration/test-releasefile-verification +++ b/test/integration/test-releasefile-verification @@ -19,8 +19,7 @@ prepare() { for release in $(find rootdir/var/lib/apt/lists 2> /dev/null); do touch -d 'now - 6 hours' $release done - rm -rf rootdir/var/cache/apt/archives - rm -f rootdir/var/cache/apt/*.bin + aptget clean cp $1 aptarchive/Packages find aptarchive -name 'Release' -delete cat aptarchive/Packages | gzip > aptarchive/Packages.gz diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge index 93b67fc02..f55c6e909 100755 --- a/test/integration/test-ubuntu-bug-761175-remove-purge +++ b/test/integration/test-ubuntu-bug-761175-remove-purge @@ -4,14 +4,14 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture 'i386' +configarchitecture 'native' -setupsimplenativepackage 'compiz-core' 'i386' '1.0' 'unstable' +setupsimplenativepackage 'compiz-core' 'native' '1.0' 'unstable' BUILDDIR='incoming/compiz-core-1.0' mkdir -p ${BUILDDIR}/debian/compiz-core/etc echo 'foo=bar;' > ${BUILDDIR}/compiz.conf echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install -buildpackage "$BUILDDIR" 'unstable' 'main' +buildpackage "$BUILDDIR" 'unstable' 'main' 'native' rm -rf "$BUILDDIR" setupaptarchive @@ -27,7 +27,7 @@ aptget remove compiz-core -y -qq 2>&1 >/dev/null && msgpass || msgfail testdpkgnotinstalled compiz-core msgtest 'Check that conffiles are still around for' 'compiz-core' -dpkg -l compiz-core | grep '^rc' 2>&1 >/dev/null && msgpass || msgfail +dpkg -l compiz-core | grep -q '^rc' && msgpass || msgfail testequal 'Reading package lists... Building dependency tree... diff --git a/test/integration/test-ubuntu-bug-802901-multiarch-early-remove b/test/integration/test-ubuntu-bug-802901-multiarch-early-remove new file mode 100755 index 000000000..bdb4e5e4f --- /dev/null +++ b/test/integration/test-ubuntu-bug-802901-multiarch-early-remove @@ -0,0 +1,24 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertinstalledpackage 'libgl1-mesa-glx' 'amd64' '2.0' 'Multi-Arch: same +Provides: libgl1 +Conflicts: libgl1' +insertpackage 'unstable' 'libgl1-mesa-glx' 'i386,amd64' '2.0' 'Multi-Arch: same +Provides: libgl1 +Conflicts: libgl1' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + libgl1-mesa-glx:i386 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libgl1-mesa-glx:i386 (2.0 unstable [i386]) +Conf libgl1-mesa-glx:i386 (2.0 unstable [i386])' aptget install libgl1-mesa-glx:i386 -s diff --git a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first new file mode 100755 index 000000000..a9a4069cf --- /dev/null +++ b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first @@ -0,0 +1,31 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertinstalledpackage 'libsame' 'i386' '1' +insertinstalledpackage 'apt' 'i386' '1' 'Depends: libsame (= 1)' + +insertpackage 'unstable' 'libsame' 'i386,amd64' '2' 'Multi-Arch: same' +insertpackage 'unstable' 'apt' 'i386' '2' 'Depends: libsame (= 2)' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + apt:i386 libsame:i386 +The following NEW packages will be installed: + libsame +The following packages will be upgraded: + apt:i386 libsame:i386 +2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libsame:i386 [1] (2 unstable [i386]) [apt:i386 ] +Inst libsame (2 unstable [amd64]) [apt:i386 ] +Conf libsame:i386 (2 unstable [i386]) [apt:i386 ] +Conf libsame (2 unstable [amd64]) [apt:i386 ] +Inst apt:i386 [1] (2 unstable [i386]) +Conf apt:i386 (2 unstable [i386])' aptget install libsame:amd64 -s diff --git a/test/extract-control.cc b/test/interactive-helper/extract-control.cc index 29dcbf371..a1b3600aa 100644 --- a/test/extract-control.cc +++ b/test/interactive-helper/extract-control.cc @@ -1,5 +1,6 @@ #include <apt-pkg/debfile.h> #include <apt-pkg/error.h> +#include <apt-pkg/fileutl.h> #include <iostream> #include <unistd.h> diff --git a/test/makefile b/test/interactive-helper/makefile index 52adb96a2..b96139fda 100644 --- a/test/makefile +++ b/test/interactive-helper/makefile @@ -1,9 +1,9 @@ # -*- make -*- -BASE=.. -SUBDIR=test +BASE=../.. +SUBDIR=test/interactive-helper # Bring in the default rules -include ../buildlib/defaults.mak +include ../../buildlib/defaults.mak # Program for testing methods PROGRAM=mthdcat @@ -11,19 +11,6 @@ SLIBS = SOURCE = mthdcat.cc include $(PROGRAM_H) -# Program for testing methods -PROGRAM=uritest -SLIBS = -lapt-pkg -SOURCE = uri.cc -include $(PROGRAM_H) - -# Scratch program to test incomplete code fragments in -PROGRAM=scratch-test -SLIBS = -lapt-inst -lapt-pkg -LIB_MAKES = apt-pkg/makefile apt-inst/makefile -SOURCE = scratch.cc -include $(PROGRAM_H) - # Version compare tester PROGRAM=testextract SLIBS = -lapt-pkg -lapt-inst @@ -31,18 +18,6 @@ LIB_MAKES = apt-pkg/makefile apt-inst/makefile SOURCE = testextract.cc include $(PROGRAM_H) -# Program for testing the config file parser -PROGRAM=conftest_clear -SLIBS = -lapt-pkg -SOURCE = conf_clear.cc -include $(PROGRAM_H) - -# Program for testing the config file parser -PROGRAM=conftest -SLIBS = -lapt-pkg -SOURCE = conf.cc -include $(PROGRAM_H) - # Program for testing the tar/deb extractor PROGRAM=testdeb SLIBS = -lapt-pkg -lapt-inst @@ -55,12 +30,6 @@ SLIBS = -lapt-pkg -lapt-inst SOURCE = extract-control.cc include $(PROGRAM_H) -# Program for testing hashes -PROGRAM=hash -SLIBS = -lapt-pkg -SOURCE = hash.cc -include $(PROGRAM_H) - # Program for testing udevcdrom PROGRAM=test_udevcdrom SLIBS = -lapt-pkg diff --git a/test/mthdcat.cc b/test/interactive-helper/mthdcat.cc index 25d09a3f5..25d09a3f5 100644 --- a/test/mthdcat.cc +++ b/test/interactive-helper/mthdcat.cc diff --git a/test/networkless-install-fixes/README b/test/interactive-helper/networkless-install-fixes/README index e7ee2b03d..e7ee2b03d 100644 --- a/test/networkless-install-fixes/README +++ b/test/interactive-helper/networkless-install-fixes/README diff --git a/test/networkless-install-fixes/sources.test.list b/test/interactive-helper/networkless-install-fixes/sources.test.list index 380e1804d..380e1804d 100644 --- a/test/networkless-install-fixes/sources.test.list +++ b/test/interactive-helper/networkless-install-fixes/sources.test.list diff --git a/test/networkless-install-fixes/test.sh b/test/interactive-helper/networkless-install-fixes/test.sh index 809d467ba..809d467ba 100755 --- a/test/networkless-install-fixes/test.sh +++ b/test/interactive-helper/networkless-install-fixes/test.sh diff --git a/test/rpmver.cc b/test/interactive-helper/rpmver.cc index 9fc807de8..9fc807de8 100644 --- a/test/rpmver.cc +++ b/test/interactive-helper/rpmver.cc diff --git a/test/test_udevcdrom.cc b/test/interactive-helper/test_udevcdrom.cc index e65c7a297..88f5f0153 100644 --- a/test/test_udevcdrom.cc +++ b/test/interactive-helper/test_udevcdrom.cc @@ -2,16 +2,18 @@ #include <stdio.h> #include <assert.h> +#include <vector> +#include <iostream> + int main() { - int i; pkgUdevCdromDevices c; assert(c.Dlopen()); - vector<CdromDevice> l; + std::vector<CdromDevice> l; l = c.Scan(); - assert(l.size() > 0); - for (i=0;i<l.size();i++) + assert(l.empty() == false); + for (size_t i = 0; i < l.size(); ++i) std::cerr << l[i].DeviceName << " " << l[i].Mounted << " " << l[i].MountPath << std::endl; diff --git a/test/testdeb.cc b/test/interactive-helper/testdeb.cc index d28f20114..d28f20114 100644 --- a/test/testdeb.cc +++ b/test/interactive-helper/testdeb.cc diff --git a/test/testextract.cc b/test/interactive-helper/testextract.cc index b790df618..f7ddb72f0 100644 --- a/test/testextract.cc +++ b/test/interactive-helper/testextract.cc @@ -6,6 +6,8 @@ #include <apt-pkg/extract.h> #include <apt-pkg/init.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> +#include <apt-pkg/pkgsystem.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/libapt/assert.h b/test/libapt/assert.h index 92b662dfa..a07be4b57 100644 --- a/test/libapt/assert.h +++ b/test/libapt/assert.h @@ -26,6 +26,18 @@ void assertEquals(int const &expect, unsigned int const &get, unsigned long cons assertEquals<unsigned int const&, unsigned int const&>(expect, get, line); } +void assertEquals(unsigned long const &expect, int const &get, unsigned long const &line) { + if (get < 0) + OutputAssertEqual(expect, "==", get, line); + assertEquals<unsigned long const&, unsigned long const&>(expect, get, line); +} + +void assertEquals(int const &expect, unsigned long const &get, unsigned long const &line) { + if (expect < 0) + OutputAssertEqual(expect, "==", get, line); + assertEquals<unsigned long const&, unsigned long const&>(expect, get, line); +} + #define equalsOr2(x,y,z) assertEqualsOr2(y, z, x, __LINE__) @@ -53,3 +65,26 @@ void assertEqualsOr2(int const &expect1, int const &expect2, unsigned int const assertEqualsOr2<unsigned int const&, unsigned int const&>(expect1, expect2, get, line); } + +#define equalsOr3(w,x,y,z) assertEqualsOr3(x, y, z, w, __LINE__) + +template < typename X, typename Y > +void OutputAssertEqualOr3(X expect1, X expect2, X expect3, char const* compare, Y get, unsigned long const &line) { + std::cerr << "Test FAILED: »" << expect1 << "« or »" << expect2 << "« or »" << expect3 << "« " << compare << " »" << get << "« at line " << line << std::endl; +} + +template < typename X, typename Y > +void assertEqualsOr3(X expect1, X expect2, X expect3, Y get, unsigned long const &line) { + if (expect1 == get || expect2 == get || expect3 == get) + return; + OutputAssertEqualOr3(expect1, expect2, expect3, "==", get, line); +} + + +// simple helper to quickly output a vectors +template < typename X > +void dumpVector(X vec) { + for (typename X::const_iterator v = vec.begin(); + v != vec.end(); ++v) + std::cout << *v << std::endl; +} diff --git a/test/libapt/compareversion_test.cc b/test/libapt/compareversion_test.cc index b6213e84c..fdb1d5674 100644 --- a/test/libapt/compareversion_test.cc +++ b/test/libapt/compareversion_test.cc @@ -63,6 +63,9 @@ void assertVersion(int const &CurLine, string const &A, string const &B, int con bool RunTest(const char *File) { + if (FileExists(File) == false) + return _error->Error("Versiontestfile %s doesn't exist!", File); + ifstream F(File,ios::in); if (!F != 0) return false; @@ -112,8 +115,8 @@ bool RunTest(const char *File) int main(int argc, char *argv[]) { - if (argc <= 1) - RunTest("../versions.lst"); + if (argc != 2) + return 1; else RunTest(argv[1]); diff --git a/test/libapt/configuration_test.cc b/test/libapt/configuration_test.cc new file mode 100644 index 000000000..5b23d17fb --- /dev/null +++ b/test/libapt/configuration_test.cc @@ -0,0 +1,78 @@ +#include <apt-pkg/configuration.h> + +#include <string> +#include <vector> + +#include "assert.h" + +int main(int argc,const char *argv[]) { + Configuration Cnf; + std::vector<std::string> fds; + + Cnf.Set("APT::Keep-Fds::",28); + Cnf.Set("APT::Keep-Fds::",17); + Cnf.Set("APT::Keep-Fds::2",47); + Cnf.Set("APT::Keep-Fds::","broken"); + fds = Cnf.FindVector("APT::Keep-Fds"); + equals(fds[0], "28"); + equals(fds[1], "17"); + equals(fds[2], "47"); + equals(fds[3], "broken"); + equals(fds.size(), 4); + equals(Cnf.Exists("APT::Keep-Fds::2"), true); + equals(Cnf.Find("APT::Keep-Fds::2"), "47"); + equals(Cnf.FindI("APT::Keep-Fds::2"), 47); + equals(Cnf.Exists("APT::Keep-Fds::3"), false); + equals(Cnf.Find("APT::Keep-Fds::3"), ""); + equals(Cnf.FindI("APT::Keep-Fds::3", 56), 56); + equals(Cnf.Find("APT::Keep-Fds::3", "not-set"), "not-set"); + + Cnf.Clear("APT::Keep-Fds::2"); + fds = Cnf.FindVector("APT::Keep-Fds"); + equals(fds[0], "28"); + equals(fds[1], "17"); + equals(fds[2], ""); + equals(fds[3], "broken"); + equals(fds.size(), 4); + equals(Cnf.Exists("APT::Keep-Fds::2"), true); + + Cnf.Clear("APT::Keep-Fds",28); + fds = Cnf.FindVector("APT::Keep-Fds"); + equals(fds[0], "17"); + equals(fds[1], ""); + equals(fds[2], "broken"); + equals(fds.size(), 3); + + Cnf.Clear("APT::Keep-Fds",""); + equals(Cnf.Exists("APT::Keep-Fds::2"), false); + + Cnf.Clear("APT::Keep-Fds",17); + Cnf.Clear("APT::Keep-Fds","broken"); + fds = Cnf.FindVector("APT::Keep-Fds"); + equals(fds.empty(), true); + + Cnf.Set("APT::Keep-Fds::",21); + Cnf.Set("APT::Keep-Fds::",42); + fds = Cnf.FindVector("APT::Keep-Fds"); + equals(fds[0], "21"); + equals(fds[1], "42"); + equals(fds.size(), 2); + + Cnf.Clear("APT::Keep-Fds"); + fds = Cnf.FindVector("APT::Keep-Fds"); + equals(fds.empty(), true); + + Cnf.CndSet("APT::Version", 42); + Cnf.CndSet("APT::Version", "66"); + equals(Cnf.Find("APT::Version"), "42"); + equals(Cnf.FindI("APT::Version"), 42); + equals(Cnf.Find("APT::Version", "33"), "42"); + equals(Cnf.FindI("APT::Version", 33), 42); + equals(Cnf.Find("APT2::Version", "33"), "33"); + equals(Cnf.FindI("APT2::Version", 33), 33); + + //FIXME: Test for configuration file parsing; + // currently only integration/ tests test them implicitly + + return 0; +} diff --git a/test/libapt/getarchitectures_test.cc b/test/libapt/getarchitectures_test.cc index e3ca7bbc2..807469263 100644 --- a/test/libapt/getarchitectures_test.cc +++ b/test/libapt/getarchitectures_test.cc @@ -7,13 +7,6 @@ #include <iostream> -// simple helper to quickly output a vector of strings -void dumpVector(std::vector<std::string> vec) { - for (std::vector<std::string>::const_iterator v = vec.begin(); - v != vec.end(); v++) - std::cout << *v << std::endl; -} - int main(int argc,char *argv[]) { std::vector<std::string> vec; diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc index 3d63e0e74..a1c801ea2 100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@ -7,13 +7,6 @@ #include <iostream> -// simple helper to quickly output a vector of strings -void dumpVector(std::vector<std::string> vec) { - for (std::vector<std::string>::const_iterator v = vec.begin(); - v != vec.end(); v++) - std::cout << *v << std::endl; -} - int main(int argc,char *argv[]) { if (argc != 2) { @@ -133,13 +126,19 @@ int main(int argc,char *argv[]) _config->Set("Dir::State::lists", argv[1]); vec = APT::Configuration::getLanguages(true, false, env); - equals(vec.size(), 6); + equals(vec.size(), 7); equals(vec[0], "de_DE"); equals(vec[1], "de"); equals(vec[2], "en"); equals(vec[3], "none"); - equalsOr2(vec[4], "pt", "tr"); - equalsOr2(vec[5], "tr", "pt"); + equalsOr3(vec[4], "pt", "tr", "ast_DE"); + equalsOr3(vec[5], "tr", "pt", "ast_DE"); + equalsOr3(vec[6], "tr", "pt", "ast_DE"); + + _config->Set("Acquire::Languages", "none"); + vec = APT::Configuration::getLanguages(true, false, env); + equals(vec.size(), 0); + _config->Set("Acquire::Languages", ""); _config->Set("Dir::State::lists", "/non-existing-dir"); _config->Set("Acquire::Languages::1", "none"); diff --git a/test/libapt/getlistoffilesindir_test.cc b/test/libapt/getlistoffilesindir_test.cc index ed8d2dad6..b2c95e840 100644 --- a/test/libapt/getlistoffilesindir_test.cc +++ b/test/libapt/getlistoffilesindir_test.cc @@ -7,14 +7,7 @@ #include <stdio.h> #include <iostream> -// simple helper to quickly output a vector of strings -void dumpVector(std::vector<std::string> vec) { - for (std::vector<std::string>::const_iterator v = vec.begin(); - v != vec.end(); v++) - std::cout << *v << std::endl; -} - -#define P(x) string(argv[1]).append("/").append(x) +#define P(x) std::string(argv[1]).append("/").append(x) int main(int argc,char *argv[]) { diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc index 7d933f5a8..5d27414f9 100644 --- a/test/libapt/globalerror_test.cc +++ b/test/libapt/globalerror_test.cc @@ -101,7 +101,7 @@ int main(int argc,char *argv[]) longText.clear(); for (size_t i = 0; i < 50; ++i) longText.append("РезийбёбAZ"); - equals(_error->Warning(longText.c_str()), false); + equals(_error->Warning("%s", longText.c_str()), false); equals(_error->PopMessage(text), false); equals(text, longText); diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc index 2cb71cc38..396e4cf6b 100644 --- a/test/libapt/hashsums_test.cc +++ b/test/libapt/hashsums_test.cc @@ -146,7 +146,7 @@ int main(int argc, char** argv) equals(sha2.VerifyFile(argv[1]), true); } { - HashString sha2("SHA256:"+string(argv[4])); + HashString sha2("SHA256:" + std::string(argv[4])); equals(sha2.VerifyFile(argv[1]), true); } diff --git a/test/libapt/makefile b/test/libapt/makefile index a8acabd8e..d3dddaeed 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -6,6 +6,10 @@ BASENAME=_libapt_test # Bring in the default rules include ../../buildlib/defaults.mak +.PHONY: test +test: + ./run-tests + # Program for testing getLanguageCode PROGRAM = getLanguages${BASENAME} SLIBS = -lapt-pkg @@ -58,3 +62,15 @@ PROGRAM = StrUtil${BASENAME} SLIBS = -lapt-pkg SOURCE = strutil_test.cc include $(PROGRAM_H) + +# test the URI parsing stuff +PROGRAM = URI${BASENAME} +SLIBS = -lapt-pkg +SOURCE = uri_test.cc +include $(PROGRAM_H) + +# test the Configuration class +PROGRAM = Configuration${BASENAME} +SLIBS = -lapt-pkg +SOURCE = configuration_test.cc +include $(PROGRAM_H) diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc index 7b496878d..b5d92d9d2 100644 --- a/test/libapt/parsedepends_test.cc +++ b/test/libapt/parsedepends_test.cc @@ -4,8 +4,8 @@ #include "assert.h" int main(int argc,char *argv[]) { - string Package; - string Version; + std::string Package; + std::string Version; unsigned int Op = 5; unsigned int Null = 0; bool StripMultiArch = true; diff --git a/test/libapt/run-tests b/test/libapt/run-tests index 0eea6d4f8..ada2dc38b 100755 --- a/test/libapt/run-tests +++ b/test/libapt/run-tests @@ -3,19 +3,32 @@ set -e DIR=$(readlink -f $(dirname $0)) echo "Compiling the tests …" -test -d "$DIR/../../build/obj/test/libapt/" || mkdir -p "$DIR/../../build/obj/test/libapt/" (cd $DIR && make) echo "Running all testcases …" LDPATH="$DIR/../../build/bin" EXT="_libapt_test" + +# detect if output is on a terminal (colorful) or better not +if expr match "$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev/null; then + COLHIGH='\033[1;35m' + COLRESET='\033[0m' + TESTOKAY='\033[1;32mOKAY\033[0m' + TESTFAIL='\033[1;31mFAILED\033[0m' +else + COLHIGH='' + COLRESET='' + TESTOKAY='OK' + TESTFAIL='###FAILED###' +fi + for testapp in $(ls ${LDPATH}/*$EXT) do name=$(basename ${testapp}) + NAME="${COLHIGH}${name}${COLRESET}" tmppath="" if [ $name = "GetListOfFilesInDir${EXT}" ]; then # TODO: very-low: move env creation to the actual test-app - echo "Prepare Testarea for \033[1;35m$name\033[0m ..." tmppath=$(mktemp -d) touch "${tmppath}/anormalfile" \ "${tmppath}/01yet-anothernormalfile" \ @@ -47,12 +60,12 @@ do ln -s "${tmppath}/anormalfile" "${tmppath}/linkedfile.list" ln -s "${tmppath}/non-existing-file" "${tmppath}/brokenlink.list" elif [ $name = "getLanguages${EXT}" ]; then - echo "Prepare Testarea for \033[1;35m$name\033[0m ..." tmppath=$(mktemp -d) touch "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-tr" \ "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-pt" \ "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-se~" \ - "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-st.bak" + "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-st.bak" \ + "${tmppath}/ftp.de.debian.org_debian_dists_sid_main_i18n_Translation-ast_DE" elif [ $name = "HashSums${EXT}" ]; then TMP="$(mktemp)" dmesg > $TMP @@ -60,14 +73,14 @@ do LD_LIBRARY_PATH=${LDPATH} ${testapp} $TMP $(md5sum $TMP | cut -d' ' -f 1) $(sha1sum $TMP | cut -d' ' -f 1) $(sha256sum $TMP | cut -d' ' -f 1) $(sha512sum $TMP | cut -d' ' -f 1) && echo "\033[1;32mOKAY\033[0m" || echo "\033[1;31mFAILED\033[0m" rm $TMP continue + elif [ $name = "CompareVersion${EXT}" ]; then + tmppath="${DIR}/versions.lst" fi - echo -n "Testing with \033[1;35m${name}\033[0m ... " - LD_LIBRARY_PATH=${LDPATH} ${testapp} ${tmppath} && echo "\033[1;32mOKAY\033[0m" || echo "\033[1;31mFAILED\033[0m" + echo -n "Testing with ${NAME} " + LD_LIBRARY_PATH=${LDPATH} ${testapp} ${tmppath} && echo "$TESTOKAY" || echo "$TESTFAIL" if [ -n "$tmppath" -a -d "$tmppath" ]; then - echo "Cleanup Testarea after \033[1;35m$name\033[0m ..." rm -rf "$tmppath" fi - done diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc index af6eb2cc6..bfe0d7222 100644 --- a/test/libapt/strutil_test.cc +++ b/test/libapt/strutil_test.cc @@ -4,7 +4,7 @@ int main(int argc,char *argv[]) { - string input, output, expected; + std::string input, output, expected; // no input input = "foobar"; diff --git a/test/libapt/uri_test.cc b/test/libapt/uri_test.cc new file mode 100644 index 000000000..99bb3067e --- /dev/null +++ b/test/libapt/uri_test.cc @@ -0,0 +1,112 @@ +#include <apt-pkg/strutl.h> + +#include "assert.h" + +int main() { + // Basic stuff + { + URI U("http://www.debian.org:90/temp/test"); + equals("http", U.Access); + equals("", U.User); + equals("", U.Password); + equals(90, U.Port); + equals("www.debian.org", U.Host); + equals("/temp/test", U.Path); + } { + URI U("http://jgg:foo@ualberta.ca/blah"); + equals("http", U.Access); + equals("jgg", U.User); + equals("foo", U.Password); + equals(0, U.Port); + equals("ualberta.ca", U.Host); + equals("/blah", U.Path); + } { + URI U("file:/usr/bin/foo"); + equals("file", U.Access); + equals("", U.User); + equals("", U.Password); + equals(0, U.Port); + equals("", U.Host); + equals("/usr/bin/foo", U.Path); + } { + URI U("cdrom:Moo Cow Rom:/debian"); + equals("cdrom", U.Access); + equals("", U.User); + equals("", U.Password); + equals(0, U.Port); + equals("Moo Cow Rom", U.Host); + equals("/debian", U.Path); + } { + URI U("gzip:./bar/cow"); + equals("gzip", U.Access); + equals("", U.User); + equals("", U.Password); + equals(0, U.Port); + equals(".", U.Host); + equals("/bar/cow", U.Path); + } { + URI U("ftp:ftp.fr.debian.org/debian/pool/main/x/xtel/xtel_3.2.1-15_i386.deb"); + equals("ftp", U.Access); + equals("", U.User); + equals("", U.Password); + equals(0, U.Port); + equals("ftp.fr.debian.org", U.Host); + equals("/debian/pool/main/x/xtel/xtel_3.2.1-15_i386.deb", U.Path); + } + + // RFC 2732 stuff + { + URI U("http://[1080::8:800:200C:417A]/foo"); + equals("http", U.Access); + equals("", U.User); + equals("", U.Password); + equals(0, U.Port); + equals("1080::8:800:200C:417A", U.Host); + equals("/foo", U.Path); + } { + URI U("http://[::FFFF:129.144.52.38]:80/index.html"); + equals("http", U.Access); + equals("", U.User); + equals("", U.Password); + equals(80, U.Port); + equals("::FFFF:129.144.52.38", U.Host); + equals("/index.html", U.Path); + } { + URI U("http://[::FFFF:129.144.52.38:]:80/index.html"); + equals("http", U.Access); + equals("", U.User); + equals("", U.Password); + equals(80, U.Port); + equals("::FFFF:129.144.52.38:", U.Host); + equals("/index.html", U.Path); + } { + URI U("http://[::FFFF:129.144.52.38:]/index.html"); + equals("http", U.Access); + equals("", U.User); + equals("", U.Password); + equals(0, U.Port); + equals("::FFFF:129.144.52.38:", U.Host); + equals("/index.html", U.Path); + } + /* My Evil Corruption of RFC 2732 to handle CDROM names! Fun for + the whole family! */ + { + URI U("cdrom:[The Debian 1.2 disk, 1/2 R1:6]/debian/"); + equals("cdrom", U.Access); + equals("", U.User); + equals("", U.Password); + equals(0, U.Port); + equals("The Debian 1.2 disk, 1/2 R1:6", U.Host); + equals("/debian/", U.Path); + } { + URI U("cdrom:Foo Bar Cow/debian/"); + equals("cdrom", U.Access); + equals("", U.User); + equals("", U.Password); + equals(0, U.Port); + equals("Foo Bar Cow", U.Host); + equals("/debian/", U.Path); + } + + return 0; +} diff --git a/test/versions.lst b/test/libapt/versions.lst index 8dd8ebdc9..8dd8ebdc9 100644 --- a/test/versions.lst +++ b/test/libapt/versions.lst diff --git a/test/local-repo/Packages b/test/local-repo/Packages deleted file mode 100644 index fe62fc038..000000000 --- a/test/local-repo/Packages +++ /dev/null @@ -1,11 +0,0 @@ -Package: gdebi-test4 -Architecture: all -Version: 1.0 -Conflicts: apt (<= 0.1) -Filename: ./gdebi-test4.deb -Size: 2306 -MD5sum: 0952a2b4a566215e0794c7603f3fcfcc -SHA1: 318688ea2d53352a1bdb669ebd2cd4847f6c4e7c -SHA256: 35f600b57253cef807a1da7c5deb06e7821de9223842a310a77b4da87cf51e2c -Description: testpackage for gdebi - Conflicts: apt (<= 0.1) - diff --git a/test/local-repo/Packages.gz b/test/local-repo/Packages.gz Binary files differdeleted file mode 100644 index b5d528435..000000000 --- a/test/local-repo/Packages.gz +++ /dev/null diff --git a/test/local-repo/Packages.gz.save b/test/local-repo/Packages.gz.save Binary files differdeleted file mode 100644 index c73f56395..000000000 --- a/test/local-repo/Packages.gz.save +++ /dev/null diff --git a/test/local-repo/Release b/test/local-repo/Release deleted file mode 100644 index 7f206ef25..000000000 --- a/test/local-repo/Release +++ /dev/null @@ -1,13 +0,0 @@ -Date: Thu, 09 Aug 2007 10:13:06 UTC -MD5Sum: - 29f79161fafe1f0c393e7fc6ddcb99b5 338 Packages - 2f885b2ebdb77d3354ba63d8b5aad614 269 Packages.gz - d41d8cd98f00b204e9800998ecf8427e 0 Release -SHA1: - d8860d409a8b0db443fbf254e2d6afbfc9bc04a8 338 Packages - 8b668a7b730ceb4d702737a13a723959c20b67df 269 Packages.gz - da39a3ee5e6b4b0d3255bfef95601890afd80709 0 Release -SHA256: - 39aa9fc59d868a71030d24aeaa4b574d7a11a10ea79491a0881f8d755b36a06d 338 Packages - 62898623498ebf8304647db1ba2d33e4d8ec0e3e45250c2b66907c812b099297 269 Packages.gz - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Release diff --git a/test/local-repo/Release.gpg b/test/local-repo/Release.gpg deleted file mode 100644 index e1c309566..000000000 --- a/test/local-repo/Release.gpg +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) - -iD8DBQBGuui6liSD4VZixzQRApSlAJ9D6G1QXvtXH1jH1I4SStsb1VsImQCbBPfp -+1p0bDANcBVY+GckjJvFRkY= -=a0AR ------END PGP SIGNATURE----- diff --git a/test/local-repo/gdebi-test4.deb b/test/local-repo/gdebi-test4.deb Binary files differdeleted file mode 100644 index 9eb92d1b4..000000000 --- a/test/local-repo/gdebi-test4.deb +++ /dev/null diff --git a/test/pre-upload-check.py b/test/pre-upload-check.py deleted file mode 100755 index f9da8f941..000000000 --- a/test/pre-upload-check.py +++ /dev/null @@ -1,266 +0,0 @@ -#!/usr/bin/python - -import sys -import os -import glob -import os.path -import shutil -import time -from subprocess import call, PIPE - -import unittest - -stdout = os.open("/dev/null",0) #sys.stdout -stderr = os.open("/dev/null",0) # sys.stderr - -apt_args = [] -#apt_args = ["-o","Debug::pkgAcquire::Auth=true"] - -class testAptAuthenticationReliability(unittest.TestCase): - """ - test if the spec https://wiki.ubuntu.com/AptAuthenticationReliability - is properly implemented - """ - #apt = "../bin/apt-get" - apt = "apt-get" - - def setUp(self): - if os.path.exists("/tmp/autFailure"): - os.unlink("/tmp/authFailure"); - if os.path.exists("/tmp/autFailure2"): - os.unlink("/tmp/authFailure2"); - def testRepositorySigFailure(self): - """ - test if a repository that used to be authenticated and fails on - apt-get update refuses to update and uses the old state - """ - # copy valid signatures into lists (those are ok, even - # if the name is "-broken-" ... - for f in glob.glob("./authReliability/lists/*"): - shutil.copy(f,"/var/lib/apt/lists") - # ensure we do *not* get a I-M-S hit - os.utime("/var/lib/apt/lists/%s" % os.path.basename(f), (0,0)) - res = call([self.apt, - "update", - "-o","Dir::Etc::sourcelist=./authReliability/sources.list.failure", - "-o",'APT::Update::Auth-Failure::=touch /tmp/authFailure', - ] + apt_args, - stdout=stdout, stderr=stderr) - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release.gpg"), - "The gpg file disappeared, this should not happen") - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Packages"), - "The Packages file disappeared, this should not happen") - self.assert_(os.path.exists("/tmp/authFailure"), - "The APT::Update::Auth-Failure script did not run (1)") - # the same with i-m-s hit this time - for f in glob.glob("./authReliability/lists/*"): - shutil.copy(f,"/var/lib/apt/lists") - os.utime("/var/lib/apt/lists/%s" % os.path.basename(f), (time.time(),time.time())) - res = call([self.apt, - "update", - "-o","Dir::Etc::sourcelist=./authReliability/sources.list.failure", - "-o",'APT::Update::Auth-Failure::=touch /tmp/authFailure2', - ] + apt_args, - stdout=stdout, stderr=stderr) - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release.gpg"), - "The gpg file disappeared, this should not happen") - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Packages"), - "The Packages file disappeared, this should not happen") - self.assert_(os.path.exists("/tmp/authFailure2"), - "The APT::Update::Auth-Failure script did not run (2)") - def testRepositorySigGood(self): - """ - test that a regular repository with good data stays good - """ - res = call([self.apt, - "update", - "-o","Dir::Etc::sourcelist=./authReliability/sources.list.good" - ] + apt_args, - stdout=stdout, stderr=stderr) - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg"), - "The gpg file disappeared after a regular download, this should not happen") - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages"), - "The Packages file disappeared, this should not happen") - # test good is still good after non I-M-S hit and a previous files in lists/ - for f in glob.glob("./authReliability/lists/*"): - shutil.copy(f,"/var/lib/apt/lists") - # ensure we do *not* get a I-M-S hit - os.utime("/var/lib/apt/lists/%s" % os.path.basename(f), (0,0)) - res = call([self.apt, - "update", - "-o","Dir::Etc::sourcelist=./authReliability/sources.list.good" - ] + apt_args, - stdout=stdout, stderr=stderr) - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg"), - "The gpg file disappeared after a I-M-S hit, this should not happen") - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages"), - "The Packages file disappeared, this should not happen") - # test good is still good after I-M-S hit - for f in glob.glob("./authReliability/lists/*"): - shutil.copy(f,"/var/lib/apt/lists") - # ensure we do get a I-M-S hit - os.utime("/var/lib/apt/lists/%s" % os.path.basename(f), (time.time(),time.time())) - res = call([self.apt, - "update", - "-o","Dir::Etc::sourcelist=./authReliability/sources.list.good" - ] + apt_args, - stdout=stdout, stderr=stderr) - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg"), - "The gpg file disappeared, this should not happen") - self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages"), - "The Packages file disappeared, this should not happen") - - -class testAuthentication(unittest.TestCase): - """ - test if the authentication is working, the repository - of the test-data can be found here: - bzr get http://people.ubuntu.com/~mvo/bzr/apt/apt-auth-test-suit/ - """ - - # some class wide data - apt = "apt-get" - pkg = "libglib2.0-data" - pkgver = "2.13.6-1ubuntu1" - pkgpath = "/var/cache/apt/archives/libglib2.0-data_2.13.6-1ubuntu1_all.deb" - - def setUp(self): - for f in glob.glob("testkeys/*,key"): - call(["apt-key", "add", f], stdout=stdout, stderr=stderr) - - def _cleanup(self): - " make sure we get new lists and no i-m-s " - call(["rm","-f", "/var/lib/apt/lists/*"]) - if os.path.exists(self.pkgpath): - os.unlink(self.pkgpath) - - def _expectedRes(self, resultstr): - if resultstr == 'ok': - return 0 - elif resultstr == 'broken': - return 100 - - - def testPackages(self): - for f in glob.glob("testsources.list/sources.list*package*"): - self._cleanup() - (prefix, testtype, result) = f.split("-") - expected_res = self._expectedRes(result) - # update first - call([self.apt,"update", - "-o","Dir::Etc::sourcelist=./%s" % f]+apt_args, - stdout=stdout, stderr=stderr) - # then get the pkg - cmd = ["install", "-y", "-d", "--reinstall", - "%s=%s" % (self.pkg, self.pkgver), - "-o","Dir::state::Status=./fake-status"] - res = call([self.apt, "-o","Dir::Etc::sourcelist=./%s" % f]+cmd+apt_args, - stdout=stdout, stderr=stderr) - self.assert_(res == expected_res, - "test '%s' failed (got %s expected %s" % (f,res,expected_res)) - - - def testGPG(self): - for f in glob.glob("testsources.list/sources.list*gpg*"): - self._cleanup() - (prefix, testtype, result) = f.split("-") - expected_res = self._expectedRes(result) - # update first - call([self.apt,"update", - "-o","Dir::Etc::sourcelist=./%s" % f]+apt_args, - stdout=stdout, stderr=stderr) - cmd = ["install", "-y", "-d", "--reinstall", - "%s=%s" % (self.pkg, self.pkgver), - "-o","Dir::state::Status=./fake-status"] - res = call([self.apt, "-o","Dir::Etc::sourcelist=./%s" % f]+ - cmd+apt_args, - stdout=stdout, stderr=stderr) - self.assert_(res == expected_res, - "test '%s' failed (got %s expected %s" % (f,res,expected_res)) - - def testRelease(self): - for f in glob.glob("testsources.list/sources.list*release*"): - self._cleanup() - (prefix, testtype, result) = f.split("-") - expected_res = self._expectedRes(result) - cmd = ["update"] - res = call([self.apt,"-o","Dir::Etc::sourcelist=./%s" % f]+cmd+apt_args, - stdout=stdout, stderr=stderr) - self.assert_(res == expected_res, - "test '%s' failed (got %s expected %s" % (f,res,expected_res)) - if expected_res == 0: - self.assert_(len(glob.glob("/var/lib/apt/lists/partial/*")) == 0, - "partial/ dir has leftover files: %s" % glob.glob("/var/lib/apt/lists/partial/*")) - - def testValid(self): - for f in glob.glob("testsources.list/sources.list*validuntil*"): - self._cleanup() - (prefix, testtype, result) = f.split("-") - expected_res = self._expectedRes(result) - cmd = ["update"] - res = call([self.apt,"-o","Dir::Etc::sourcelist=./%s" % f]+cmd+apt_args, - stdout=stdout, stderr=stderr) - self.assert_(res == expected_res, - "test '%s' failed (got %s expected %s" % (f,res,expected_res)) - if expected_res == 0: - self.assert_(len(glob.glob("/var/lib/apt/lists/partial/*")) == 0, - "partial/ dir has leftover files: %s" % glob.glob("/var/lib/apt/lists/partial/*")) - - -class testLocalRepositories(unittest.TestCase): - " test local repository regressions " - - repo_dir = "local-repo" - apt = "apt-get" - pkg = "gdebi-test4" - - def setUp(self): - self.repo = os.path.abspath(os.path.join(os.getcwd(), self.repo_dir)) - self.sources = os.path.join(self.repo, "sources.list") - s = open(self.sources,"w") - s.write("deb file://%s/ /\n" % self.repo) - s.close() - - def testLocalRepoAuth(self): - # two times to get at least one i-m-s hit - for i in range(2): - self.assert_(os.path.exists(self.sources)) - cmd = [self.apt,"update","-o", "Dir::Etc::sourcelist=%s" % self.sources]+apt_args - res = call(cmd, stdout=stdout, stderr=stderr) - self.assertEqual(res, 0, "local repo test failed") - self.assert_(os.path.exists(os.path.join(self.repo,"Packages.gz")), - "Packages.gz vanished from local repo") - - def testInstallFromLocalRepo(self): - apt = [self.apt,"-o", "Dir::Etc::sourcelist=%s"% self.sources]+apt_args - cmd = apt+["update"] - res = call(cmd, stdout=stdout, stderr=stderr) - self.assertEqual(res, 0) - res = call(apt+["-y","install","--reinstall",self.pkg], - stdout=stdout, stderr=stderr) - self.assert_(res == 0, - "installing %s failed (got %s)" % (self.pkg, res)) - res = call(apt+["-y","remove",self.pkg], - stdout=stdout, stderr=stderr) - self.assert_(res == 0, - "removing %s failed (got %s)" % (self.pkg, res)) - - def testPythonAptInLocalRepo(self): - import apt, apt_pkg - apt_pkg.Config.Set("Dir::Etc::sourcelist",self.sources) - cache = apt.Cache() - cache.update() - pkg = cache["apt"] - self.assert_(pkg.name == 'apt') - - - -if __name__ == "__main__": - print "Runing simple testsuit on current apt-get and libapt" - if len(sys.argv) > 1 and sys.argv[1] == "-v": - stdout = sys.stdout - stderr = sys.stderr - - # run only one for now - #unittest.main(defaultTest="testAptAuthenticationReliability") - unittest.main() diff --git a/test/scratch.cc b/test/scratch.cc deleted file mode 100644 index d638c7097..000000000 --- a/test/scratch.cc +++ /dev/null @@ -1,105 +0,0 @@ -#include <apt-pkg/dpkgdb.h> -#include <apt-pkg/debfile.h> -#include <apt-pkg/error.h> -#include <apt-pkg/configuration.h> -#include <apt-pkg/progress.h> -#include <apt-pkg/extract.h> -#include <apt-pkg/init.h> -#include <apt-pkg/fileutl.h> - -using namespace std; - -int main(int argc,char *argv[]) -{ - pkgInitConfig(*_config); - pkgInitSystem(*_config,_system); - -// cout << flNoLink(argv[1]) << endl; - -// #if 0 -/* DynamicMMap *FileMap = new DynamicMMap(MMap::Public); - pkgFLCache *FList = new pkgFLCache(*FileMap); - - char *Name = "/tmp/test"; - pkgFLCache::PkgIterator Pkg(*FList,0); - pkgFLCache::NodeIterator Node = FList->GetNode(Name,Name+strlen(Name),Pkg.Offset(),true,false); - cout << (pkgFLCache::Node *)Node << endl; - Node = FList->GetNode(Name,Name+strlen(Name),Pkg.Offset(),true,false); - cout << (pkgFLCache::Node *)Node << endl; -*/ -// #if 0 - _config->Set("Dir::State::status","/tmp/testing/status"); - - debDpkgDB Db; - - { - OpTextProgress Prog; - - if (Db.ReadyPkgCache(Prog) == false) - cerr << "Error!" << endl; - Prog.Done(); - - if (Db.ReadyFileList(Prog) == false) - cerr << "Error!" << endl; - } - - if (_error->PendingError() == true) - { - _error->DumpErrors(); - return 0; - } - -/* Db.GetFLCache().BeginDiverLoad(); - pkgFLCache::PkgIterator Pkg(Db.GetFLCache(),0); - if (Db.GetFLCache().AddDiversion(Pkg,"/usr/include/linux/kerneld.h","/usr/bin/nslookup") == false) - cerr << "Error!" << endl; - - const char *Tmp = "/usr/include/linux/kerneld.h"; - pkgFLCache::NodeIterator Nde = Db.GetFLCache().GetNode(Tmp,Tmp+strlen(Tmp),0,false,false); - map_ptrloc Loc = Nde->File; - - for (; Nde.end() == false && Nde->File == Loc; Nde++) - cout << Nde->Flags << ',' << Nde->Pointer << ',' << Nde.File() << endl; - Db.GetFLCache().FinishDiverLoad();*/ - -/* unsigned int I = 0; - pkgFLCache &Fl = Db.GetFLCache(); - while (I < Fl.HeaderP->HashSize) - { - cout << I << endl; - pkgFLCache::NodeIterator Node(Fl,Fl.NodeP + Fl.HeaderP->FileHash + I++); - if (Node->Pointer == 0) - continue; - for (; Node.end() == false; Node++) - { - cout << Node.DirN() << '/' << Node.File(); - if (Node->Flags == pkgFLCache::Node::Diversion) - cout << " (div)"; - if (Node->Flags == pkgFLCache::Node::ConfFile) - cout << " (conf)"; - cout << endl; - } - }*/ - - for (int I = 1; I < argc; I++) - { - FileFd F(argv[I],FileFd::ReadOnly); - debDebFile Deb(F); - - if (Deb.ExtractControl(Db) == false) - cerr << "Error!" << endl; - cout << argv[I] << endl; - - pkgCache::VerIterator Ver = Deb.MergeControl(Db); - if (Ver.end() == true) - cerr << "Failed" << endl; - else - cout << Ver.ParentPkg().Name() << ' ' << Ver.VerStr() << endl; - - pkgExtract Extract(Db.GetFLCache(),Ver); - Deb.ExtractArchive(Extract); - } -// #endif -//#endif - _error->DumpErrors(); -} diff --git a/test/test-indexes.sh b/test/test-indexes.sh deleted file mode 100755 index 50d54f691..000000000 --- a/test/test-indexes.sh +++ /dev/null @@ -1,235 +0,0 @@ -#!/bin/sh -e - -# Test behaviour of index retrieval and usage, in particular with uncompressed -# and gzip compressed indexes. -# Author: Martin Pitt <martin.pitt@ubuntu.com> -# (C) 2010 Canonical Ltd. - -BUILDDIR=$(readlink -f $(dirname $0)/../build) - -TEST_SOURCE="http://ftp.debian.org/debian unstable contrib" -GPG_KEYSERVER=gpg-keyserver.de -# should be a small package with dependencies satisfiable in TEST_SOURCE, i. e. -# ideally no depends at all -TEST_PKG="python-psyco-doc" - -export LD_LIBRARY_PATH=$BUILDDIR/bin - -OPTS="-qq -o Dir::Bin::Methods=$BUILDDIR/bin/methods -o Debug::NoLocking=true" -DEBUG="" -#DEBUG="-o Debug::pkgCacheGen=true" -#DEBUG="-o Debug::pkgAcquire=true" -APT_GET="$BUILDDIR/bin/apt-get $OPTS $DEBUG" -APT_CACHE="$BUILDDIR/bin/apt-cache $OPTS $DEBUG" -APT_FTPARCHIVE="$BUILDDIR/bin/apt-ftparchive" - -[ -x "$BUILDDIR/bin/apt-get" ] || { - echo "please build the tree first" >&2 - exit 1 -} - -check_update() { - echo "--- apt-get update $@ (no trusted keys)" - - rm -f etc/apt/trusted.gpg etc/apt/secring.gpg - touch etc/apt/trusted.gpg etc/apt/secring.gpg - find var/lib/apt/lists/ -type f | xargs -r rm - - # first attempt should fail, no trusted GPG key - out=$($APT_GET "$@" update 2>&1) - echo "$out" | grep -q NO_PUBKEY - key=$(echo "$out" | sed -n '/NO_PUBKEY/ { s/^.*NO_PUBKEY \([[:alnum:]]\+\)$/\1/; p}') - - # get keyring - gpg -q --no-options --no-default-keyring --secret-keyring etc/apt/secring.gpg --trustdb-name etc/apt/trustdb.gpg --keyring etc/apt/trusted.gpg --primary-keyring etc/apt/trusted.gpg --keyserver $GPG_KEYSERVER --recv-keys $key - - # now it should work - echo "--- apt-get update $@ (with trusted keys)" - find var/lib/apt/lists/ -type f | xargs -r rm - $APT_GET "$@" update -} - -# if $1 == "compressed", check that we have compressed indexes, otherwise -# uncompressed ones -check_indexes() { - echo "--- only ${1:-uncompressed} index files present" - local F - if [ "$1" = "compressed" ]; then - ! test -e var/lib/apt/lists/*_Packages || F=1 - ! test -e var/lib/apt/lists/*_Sources || F=1 - test -e var/lib/apt/lists/*_Packages.gz || F=1 - test -e var/lib/apt/lists/*_Sources.gz || F=1 - else - test -e var/lib/apt/lists/*_Packages || F=1 - test -e var/lib/apt/lists/*_Sources || F=1 - ! test -e var/lib/apt/lists/*_Packages.gz || F=1 - ! test -e var/lib/apt/lists/*_Sources.gz || F=1 - fi - - if [ -n "$F" ]; then - ls -laR var/lib/apt/lists/ - exit 1 - fi -} - -# test apt-cache commands -check_cache() { - echo "--- apt-cache commands" - - $APT_CACHE show $TEST_PKG | grep -q ^Version: - # again (with cache) - $APT_CACHE show $TEST_PKG | grep -q ^Version: - rm var/cache/apt/*.bin - $APT_CACHE policy $TEST_PKG | egrep -q '500 (http://|file:/)' - # again (with cache) - $APT_CACHE policy $TEST_PKG | egrep -q '500 (http://|file:/)' - - TEST_SRC=`$APT_CACHE show $TEST_PKG | grep ^Source: | awk '{print $2}'` - rm var/cache/apt/*.bin - $APT_CACHE showsrc $TEST_SRC | grep -q ^Binary: - # again (with cache) - $APT_CACHE showsrc $TEST_SRC | grep -q ^Binary: -} - -# test apt-get install -check_install() { - echo "--- apt-get install" - - $APT_GET install -d $TEST_PKG - test -e var/cache/apt/archives/$TEST_PKG*.deb - $APT_GET clean - ! test -e var/cache/apt/archives/$TEST_PKG*.deb -} - -# test apt-get source -check_get_source() { - echo "--- apt-get source" - # quiesce: it'll complain about not being able to verify the signature - $APT_GET source $TEST_PKG >/dev/null 2>&1 - test -f $TEST_SRC_*.dsc - test -d $TEST_SRC-* - rm -r $TEST_SRC* -} - -############################################################################ -# main -############################################################################ - -echo "===== building sandbox =====" -WORKDIR=$(mktemp -d) -trap "cd /; rm -rf $WORKDIR" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM -cd $WORKDIR - -rm -fr etc var -rm -f home -ln -s /home home -mkdir -p etc/apt/preferences.d etc/apt/trusted.gpg.d etc/apt/apt.conf.d var/cache/apt/archives/partial var/lib/apt/lists/partial var/lib/dpkg -cp /etc/apt/trusted.gpg etc/apt -touch var/lib/dpkg/status -echo "deb $TEST_SOURCE" > etc/apt/sources.list -echo "deb-src $TEST_SOURCE" >> etc/apt/sources.list - -# specifying -o RootDir at the command line does not work for -# etc/apt/apt.conf.d/ since it is parsed after pkgInitConfig(); $APT_CONFIG is -# checked first, so this works -echo "RootDir \"$WORKDIR\";" > apt_config -export APT_CONFIG=`pwd`/apt_config - -echo "==== no indexes ====" -echo '--- apt-get check works without indexes' -[ -z `$APT_GET check` ] -echo '--- apt-cache policy works without indexes' -$APT_CACHE policy bash >/dev/null -echo '--- apt-cache show works without indexes' -! LC_MESSAGES=C $APT_CACHE show bash 2>&1| grep -q 'E: No packages found' - -echo "===== uncompressed indexes =====" -echo 'Acquire::GzipIndexes "false";' > etc/apt/apt.conf.d/02compress-indexes -check_update -check_indexes -check_cache -check_install -check_get_source - -echo "--- apt-get update with preexisting indexes" -$APT_GET update -check_indexes -check_cache - -echo "--- apt-get update with preexisting indexes and pdiff mode" -$APT_GET -o Acquire::PDiffs=true update -check_indexes -check_cache - -echo "===== compressed indexes (CLI option) =====" -check_update -o Acquire::GzipIndexes=true -check_indexes compressed -check_cache -check_install -check_get_source - -echo "--- apt-get update with preexisting indexes" -$APT_GET -o Acquire::GzipIndexes=true update -check_indexes compressed -check_cache - -echo "--- apt-get update with preexisting indexes and pdiff mode" -$APT_GET -o Acquire::GzipIndexes=true -o Acquire::PDiffs=true update -check_indexes compressed -check_cache - -echo "===== compressed indexes (apt.conf.d option) =====" -cat <<EOF > etc/apt/apt.conf.d/02compress-indexes -Acquire::GzipIndexes "true"; -Acquire::CompressionTypes::Order:: "gz"; -EOF - -check_update -check_indexes compressed -check_cache -check_install -check_get_source - -echo "--- apt-get update with preexisting indexes" -$APT_GET update -check_indexes compressed -check_cache - -echo "--- apt-get update with preexisting indexes and pdiff mode" -$APT_GET -o Acquire::PDiffs=true update -check_indexes compressed -check_cache - -rm etc/apt/apt.conf.d/02compress-indexes - -echo "==== apt-ftparchive ====" -mkdir arch -$APT_GET install -d $TEST_PKG -cp var/cache/apt/archives/$TEST_PKG*.deb arch/ -cd arch -$APT_GET source -d $TEST_PKG >/dev/null 2>&1 -$APT_FTPARCHIVE packages . | gzip -9 > Packages.gz -$APT_FTPARCHIVE sources . | gzip -9 > Sources.gz -cd .. - -echo "deb file://$WORKDIR/arch / -deb-src file://$WORKDIR/arch /" > etc/apt/sources.list -$APT_GET clean - -echo "==== uncompressed indexes from local file:// archive ====" -echo "--- apt-get update" -$APT_GET update -check_indexes -check_cache -check_get_source - -echo "==== compressed indexes from local file:// archive ====" -echo "--- apt-get update" -$APT_GET -o Acquire::GzipIndexes=true update -# EXFAIL: file:/ URIs currently decompress even with above option -#check_indexes compressed -check_indexes -check_cache -check_get_source - -echo "===== ALL TESTS PASSED =====" diff --git a/test/testkeys/mvo.key b/test/testkeys/mvo.key deleted file mode 100644 index e1ab50119..000000000 --- a/test/testkeys/mvo.key +++ /dev/null @@ -1,1182 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.6 (GNU/Linux) - -mQGiBDgbNk0RBACbHfepY/RojAOL0tqkJOLnJ0ppvoAcFj427ZxdUbEwdwc7BNL+ -XtRgZ1WBURA+qb2inC3rA9a9TrQA2x2luq7XmCVbP7jv0K/8nYqzSHp0oPuMsrCO -6EhK/XLOzKw7Bk1rfl4JVOX92QFBXodJiaemUok29CXVSn8vUR2lqGdypwCgpiBJ -zxjf/eSvPp4IihsTC3kke9ED/2ASOhlkfWobIaed47/ehIYc9gvbdMOnoGDrwXN6 -8ba+3FGvtY5qbUKg2HinOYQoBjXW9NDjeJ6b8klpyG2LMAhS2UzPQjhwUIn9WnNX -Qsvreq0e3ad+kXCjPFjtfjCPno19mPvTSevLEXIUoG02fjpDdHT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ohQTfxmbsWNqp8066ix2Z+IRgQQEQIABgUCQnIiswAKCRDT+ZXVd2r+ -Em3+AJ9iOcXpqIA9u99C7v30zr/WxgsEkwCfTLANSobqy/GLvVyItLjiGrEFp4KI -RgQQEQIABgUCQ7l+AAAKCRByHrGwzuRJeEZRAKDphuCQVBHnJ0jNRt5gE6ry7Bjz -+wCg3X1hA3hzleqMay8Kazhx5H1+712IRgQQEQIABgUCRBqs7AAKCRBBUuHxxnGG -/61lAKDr6KW9NaW7hf9+uQ0+sz58icccrwCgkvm+iYD3ROLubSn7ZmtTa2Xh1caI -RgQQEQIABgUCRBqtCQAKCRCqDNHu0ItH/tFCAJwL56EGCMAq/ojS4PlLwyWFlCnz -rACgjKI++vABdNS01zi30QJMSf6OS1uIRgQSEQIABgUCQfwrkwAKCRCY8qTu/+W0 -tm4fAJ9+N/ujThD65SquB2oBmyXsQTcBcwCdHvcqGVYM7/u0cZwY3K+jIAA0F6mI -RgQSEQIABgUCQnIN3wAKCRDz6FQA1wqv+UqaAKCjoNCBKl+bwWkdTGHuyXmlOZEI -jQCfVTKpX8xgxXHqv6k6/ulMOUD31YqIRgQTEQIABgUCPxvrDwAKCRDYDvNai7Un -r5ilAJ46rCD0b3Ywssdgc/bBBUS9kgUzkACguVCo26D///////////////////+I -RgQTEQIABgUCPxvrDwAKCRDYDvNai7Unr5ilAJ46rCD0b3Ywssdgc/bBBUS9kgUz -kACg//////////////////////////+IRgQTEQIABgUCQHezHgAKCRBsv4suVls4 -+UPzAJ43hajJMePyTwGZmhE077EeXOtXSwCbB27L/y+tt1DooFNT64/skgJXC/6I -RgQTEQIABgUCQdHolwAKCRDg0NExEXGwT+X+AJ4/oqNYw44Nxn/N1U10XRpumuJi -KQCfRJrb6+M7rLOidrXahHwMPkeBURaIRgQTEQIABgUCQjgRawAKCRCvc7YIqUBQ -r8bpAJ9UKImdTczoRmWQZJPu7niWnc/HDgCgihWFL/uI9cKn0vGVUcFHbeTNEx2I -RgQTEQIABgUCQj2It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+ccHkhClXjwYZIiXggUYuIM2E -J0MZ9EA+Db6WKrgrpLLMBiTTwZIRp8J9hrbo7a9WZ2iz+X/A0qWxVzB3vdpBX73z -NRAcf57uk6VdWmQsSFhiCSiC1gPvakJ5rQQvgcQdB0PkpFNv20ncZCyqCyjl23zg -6VUU6hjRRuZC6zlQ4bOasANIHZ1i6Ri17eHyisKoid0lSk3RXpL+XEBrpo/gZ80q -/aQa39F8TSyPborks368BFqT3z6z9CjuErynpZTDbGBGPx1hNOmkLGccExY9oI6g -7RBMyGdllkruN+Me7O/3gEdhMwLoOZX54zJyiL9IWMITjr9DCyjTAN58g/hw1k3s -bMQeCzSJ3qm8sgqh4+9392ILbDZQqugaVRq5enVEp4EedZhKDm0OMDHkz4yos/sf -FvHGJ9IJV7KNPgtKbIufVmElGstUEO75sAbJXKKf9RDF3mS3l10fW5PzUhd7QoPk -bctnq2G1Fuc4XdZj51mxj/d3NE+guQENBDgbNloQBACMDd+3MOnocx85heT7zsiL -wQznw0dA554+XKh7HNjpQOGaCtIgKbvXi56K1jblx5NVyaV1VmGL9woCUfG5lGME -uJE0PbL4XlMEj1txa2yJQFQcNAiICrRfQgqQE1LZMht0fpXvwmbxdTqubsG2382V -jXtGVrAv0l3jYIGWSTo+QwADBQP+JVwIi8Qv0AzMEhMcYovMVoidMGvSCtLoIeOQ -J9KuQuKkoUhoW27oEJlYYC8XqEJ3sIQnYmc7fGaMjt+/QVr5Pq/g9iG5JTgWWCJe -8zy/+upwzE0EN6W6TqKXOBsDsENMGIok58d59z7ykI3VQRmu7TfTM1QJHVImyALj -7F0mph6IRgQYEQIABgUCOBs2WgAKCRCWJIPhVmLHNIEGAKCWcOaIYvLspRW11j2b -qlFfyUDwnQCfTTs8DO0AFWVdMrwydOYSow2cI5o= -=CfD6 ------END PGP PUBLIC KEY BLOCK----- diff --git a/test/testsources.list/sources.list.all-gpg-broken b/test/testsources.list/sources.list.all-gpg-broken deleted file mode 100644 index 110f31884..000000000 --- a/test/testsources.list/sources.list.all-gpg-broken +++ /dev/null @@ -1,2 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/gpg-package-broken/ / - diff --git a/test/testsources.list/sources.list.all-gpg-ok b/test/testsources.list/sources.list.all-gpg-ok deleted file mode 100644 index 2e9a4458a..000000000 --- a/test/testsources.list/sources.list.all-gpg-ok +++ /dev/null @@ -1,2 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/gpg-package-ok/ / - diff --git a/test/testsources.list/sources.list.all-release-broken b/test/testsources.list/sources.list.all-release-broken deleted file mode 100644 index 5e138323a..000000000 --- a/test/testsources.list/sources.list.all-release-broken +++ /dev/null @@ -1 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/all-release-broken/ / diff --git a/test/testsources.list/sources.list.all-release-ok b/test/testsources.list/sources.list.all-release-ok deleted file mode 100644 index 8bcceeee8..000000000 --- a/test/testsources.list/sources.list.all-release-ok +++ /dev/null @@ -1 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/all-release-ok/ / diff --git a/test/testsources.list/sources.list.all-validuntil-broken b/test/testsources.list/sources.list.all-validuntil-broken deleted file mode 100644 index bab59bb81..000000000 --- a/test/testsources.list/sources.list.all-validuntil-broken +++ /dev/null @@ -1 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/all-validuntil-broken/ / diff --git a/test/testsources.list/sources.list.md5-package-broken b/test/testsources.list/sources.list.md5-package-broken deleted file mode 100644 index 3ba43181e..000000000 --- a/test/testsources.list/sources.list.md5-package-broken +++ /dev/null @@ -1,2 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/md5-package-broken/ / - diff --git a/test/testsources.list/sources.list.md5-package-ok b/test/testsources.list/sources.list.md5-package-ok deleted file mode 100644 index 9bf207780..000000000 --- a/test/testsources.list/sources.list.md5-package-ok +++ /dev/null @@ -1,2 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/md5-package-ok/ / - diff --git a/test/testsources.list/sources.list.md5-release-broken b/test/testsources.list/sources.list.md5-release-broken deleted file mode 100644 index 1c8f1dd79..000000000 --- a/test/testsources.list/sources.list.md5-release-broken +++ /dev/null @@ -1 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/md5-release-broken/ / diff --git a/test/testsources.list/sources.list.md5-release-ok b/test/testsources.list/sources.list.md5-release-ok deleted file mode 100644 index f27e04f16..000000000 --- a/test/testsources.list/sources.list.md5-release-ok +++ /dev/null @@ -1 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/md5-release-ok/ / diff --git a/test/testsources.list/sources.list.sha1-release-broken b/test/testsources.list/sources.list.sha1-release-broken deleted file mode 100644 index 29a277899..000000000 --- a/test/testsources.list/sources.list.sha1-release-broken +++ /dev/null @@ -1 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/sha1-release-broken/ / diff --git a/test/testsources.list/sources.list.sha1-release-ok b/test/testsources.list/sources.list.sha1-release-ok deleted file mode 100644 index 6f95d0247..000000000 --- a/test/testsources.list/sources.list.sha1-release-ok +++ /dev/null @@ -1 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/sha1-release-ok/ / diff --git a/test/testsources.list/sources.list.sha256-package-broken b/test/testsources.list/sources.list.sha256-package-broken deleted file mode 100644 index d6d284b9c..000000000 --- a/test/testsources.list/sources.list.sha256-package-broken +++ /dev/null @@ -1,2 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/sha256-package-broken/ / - diff --git a/test/testsources.list/sources.list.sha256-package-ok b/test/testsources.list/sources.list.sha256-package-ok deleted file mode 100644 index c2d7570d1..000000000 --- a/test/testsources.list/sources.list.sha256-package-ok +++ /dev/null @@ -1,2 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/sha256-package-ok/ / - diff --git a/test/testsources.list/sources.list.sha256-release-broken b/test/testsources.list/sources.list.sha256-release-broken deleted file mode 100644 index 713a4d9c8..000000000 --- a/test/testsources.list/sources.list.sha256-release-broken +++ /dev/null @@ -1 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/sha256-release-broken/ / diff --git a/test/testsources.list/sources.list.sha256-release-ok b/test/testsources.list/sources.list.sha256-release-ok deleted file mode 100644 index 93b44e366..000000000 --- a/test/testsources.list/sources.list.sha256-release-ok +++ /dev/null @@ -1 +0,0 @@ -deb http://people.ubuntu.com/~mvo/apt/auth-test-suit/sha256-release-ok/ / diff --git a/test/uri.cc b/test/uri.cc deleted file mode 100644 index ae9dc9d05..000000000 --- a/test/uri.cc +++ /dev/null @@ -1,34 +0,0 @@ -#include <apt-pkg/strutl.h> -#include <stdio.h> - -void Test(const char *Foo) -{ - URI U(Foo); - - printf("%s a='%s' u='%s' p='%s' port='%u'\n h='%s' p='%s'\n", - Foo,U.Access.c_str(),U.User.c_str(),U.Password.c_str(), - U.Port,U.Host.c_str(),U.Path.c_str()); -} - -int main() -{ - // Basic stuff - Test("http://www.debian.org:90/temp/test"); - Test("http://jgg:foo@ualberta.ca/blah"); - Test("file:/usr/bin/foo"); - Test("cdrom:Moo Cow Rom:/debian"); - Test("gzip:./bar/cow"); - - // RFC 2732 stuff - Test("http://[1080::8:800:200C:417A]/foo"); - Test("http://[::FFFF:129.144.52.38]:80/index.html"); - Test("http://[::FFFF:129.144.52.38:]:80/index.html"); - Test("http://[::FFFF:129.144.52.38:]/index.html"); - - /* My Evil Corruption of RFC 2732 to handle CDROM names! Fun for - the whole family! */ - Test("cdrom:[The Debian 1.2 disk, 1/2 R1:6]/debian/"); - Test("cdrom:Foo Bar Cow/debian/"); - - Test("ftp:ftp.fr.debian.org/debian/pool/main/x/xtel/xtel_3.2.1-15_i386.deb"); -} |