From 4e9ccfb2ff599b7a65ecec3c2f1383636f068f0c Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 5 Jul 2011 11:30:35 +0100 Subject: Removed some debug stuff, corrected the VerifyConfigure calls to VerifyAndConfigure --- test/integration/test-package-reinstallation | 17 +++++++++ test/integration/test-provides-gone-with-upgrade | 46 ++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100755 test/integration/test-package-reinstallation create mode 100755 test/integration/test-provides-gone-with-upgrade (limited to 'test') diff --git a/test/integration/test-package-reinstallation b/test/integration/test-package-reinstallation new file mode 100755 index 000000000..359f69284 --- /dev/null +++ b/test/integration/test-package-reinstallation @@ -0,0 +1,17 @@ +#!/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 + +aptget install --reinstall libc6 libc-bin -s -o Debug::pkgPackageManager=1 diff --git a/test/integration/test-provides-gone-with-upgrade b/test/integration/test-provides-gone-with-upgrade new file mode 100755 index 000000000..ece2eaa41 --- /dev/null +++ b/test/integration/test-provides-gone-with-upgrade @@ -0,0 +1,46 @@ +#!/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 libapt-pkg4.10 (0.8.15 unstable [i386]) [libapt-pkg4.10:i386 on apt:i386] [] +#Conf libapt-pkg4.10:i386 broken +# Breaks:apt:i386 +# [] +#Inst apt [0.8.14] (0.8.15 unstable [i386]) +#Conf apt (0.8.15 unstable [i386]) +#E: Conf Broken libapt-pkg4.10:i386' +aptget dist-upgrade -s -o Debug::pkgPackageManager=1 +# the solution by dpkg will be to deconfigure apt with the configuration of libapt-pkg4.10 + +exit 0 + +#FIXME: a good result would be this instead, but it requires that APT can delay his immediate configuration… +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 libapt-pkg4.10 (0.8.15 unstable [i386]) +Conf libapt-pkg4.10 (0.8.15 unstable [i386]) +Inst apt [0.8.14] (0.8.15 unstable [i386]) +Conf apt (0.8.15 unstable [i386])' aptget dist-upgrade -s -- cgit v1.2.3-70-g09d2 From aaf991a8640da0d18f8e9bbea6d9bcda166fb60c Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 13 Jul 2011 10:50:41 +0100 Subject: Added test for conflicts loop --- test/integration/test-conflicts-loop | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 test/integration/test-conflicts-loop (limited to 'test') diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop new file mode 100755 index 000000000..f76c016fb --- /dev/null +++ b/test/integration/test-conflicts-loop @@ -0,0 +1,18 @@ +#!/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 + +aptget dist-upgrade -s -o Debug::pkgPackageManager=true -o Debug::pkgDpkgPM=true -o APT::Immediate-Configure-All=true -- cgit v1.2.3-70-g09d2 From f7f0d6c7560a8f71707e7852a512469147aa9f84 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 11 Aug 2011 20:53:28 +0200 Subject: cppcheck complains about some possible speed improvements which could be done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types. --- apt-pkg/acquire-item.cc | 22 +++---- apt-pkg/acquire-method.cc | 2 +- apt-pkg/acquire.cc | 20 +++--- apt-pkg/algorithms.cc | 62 +++++++++---------- apt-pkg/aptconfiguration.cc | 4 +- apt-pkg/cdrom.cc | 26 ++++---- apt-pkg/clean.cc | 4 +- apt-pkg/contrib/configuration.cc | 6 +- apt-pkg/contrib/error.cc | 6 +- apt-pkg/contrib/strutl.cc | 30 ++++----- apt-pkg/deb/debindexfile.cc | 6 +- apt-pkg/deb/deblistparser.cc | 2 +- apt-pkg/deb/debmetaindex.cc | 12 ++-- apt-pkg/deb/debrecords.cc | 2 +- apt-pkg/deb/dpkgpm.cc | 20 +++--- apt-pkg/depcache.cc | 28 ++++----- apt-pkg/indexcopy.cc | 18 +++--- apt-pkg/orderlist.cc | 16 ++--- apt-pkg/packagemanager.cc | 20 +++--- apt-pkg/pkgcache.cc | 26 ++++---- apt-pkg/pkgcachegen.cc | 28 ++++----- apt-pkg/pkgrecords.cc | 2 +- apt-pkg/policy.cc | 14 ++--- apt-pkg/sourcelist.cc | 14 ++--- apt-pkg/srcrecords.cc | 10 +-- apt-pkg/vendorlist.cc | 6 +- apt-pkg/versionmatch.cc | 6 +- cmdline/apt-cache.cc | 104 ++++++++++++++++---------------- cmdline/apt-get.cc | 56 ++++++++--------- ftparchive/apt-ftparchive.cc | 16 ++--- ftparchive/multicompress.cc | 8 +-- ftparchive/override.cc | 6 +- ftparchive/writer.cc | 4 +- methods/ftp.cc | 2 +- methods/gpgv.cc | 6 +- methods/http.cc | 6 +- methods/mirror.cc | 4 +- test/libapt/assert.h | 8 +++ test/libapt/getarchitectures_test.cc | 7 --- test/libapt/getlanguages_test.cc | 7 --- test/libapt/getlistoffilesindir_test.cc | 7 --- test/test_udevcdrom.cc | 2 +- 42 files changed, 321 insertions(+), 334 deletions(-) (limited to 'test') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7eb5920e0..2a514b088 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -681,17 +681,17 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/ // remove all patches until the next matching patch is found // this requires the Index file to be ordered for(vector::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 +756,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, /* 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(); @@ -1375,7 +1375,7 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ #endif for (vector ::const_iterator Target = IndexTargets->begin(); Target != IndexTargets->end(); - Target++) + ++Target) { HashString ExpectedIndexHash; if (verify) @@ -1672,7 +1672,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) @@ -1709,7 +1709,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) @@ -1820,7 +1820,7 @@ bool pkgAcqArchive::QueueNext() Desc.ShortDesc = Version.ParentPkg().Name(); QueueURI(Desc); - Vf++; + ++Vf; return true; } return false; @@ -1894,7 +1894,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-method.cc b/apt-pkg/acquire-method.cc index 79a7519a8..7e9061e56 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -81,7 +81,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 = ' '; diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 9478cdfb4..a2da196be 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -116,7 +116,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 +155,7 @@ void pkgAcquire::Remove(Item *Itm) I = Items.begin(); } else - I++; + ++I; } } /*}}}*/ @@ -411,7 +411,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()) @@ -467,7 +467,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 +488,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 +499,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 +511,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 +781,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 +795,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/algorithms.cc b/apt-pkg/algorithms.cc index 7c911b865..5fbcb47be 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -91,7 +91,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; @@ -140,7 +140,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) @@ -204,7 +204,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) { @@ -226,7 +226,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; @@ -295,13 +295,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) @@ -338,19 +338,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); @@ -359,7 +359,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) { @@ -387,7 +387,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); @@ -421,7 +421,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) @@ -438,7 +438,7 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache) Change = true; } } - Count++; + ++Count; } while (Change == true && Count < 10); @@ -525,7 +525,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; @@ -552,12 +552,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) @@ -574,12 +574,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 || @@ -594,9 +594,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) @@ -607,7 +607,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; @@ -704,7 +704,7 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) if (Start == End) break; - Start++; + ++Start; } if (Fail == true) break; @@ -750,7 +750,7 @@ bool pkgProblemResolver::Resolve(bool 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; @@ -781,7 +781,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) would cause the removal of even lower score packages. */ SPtrArray 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); @@ -901,7 +901,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) } else { - Start++; + ++Start; // We only worry about critical deps. if (Start.IsCritical() != true) continue; @@ -1150,7 +1150,7 @@ bool pkgProblemResolver::Resolve(bool 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; @@ -1162,7 +1162,7 @@ bool pkgProblemResolver::Resolve(bool 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) @@ -1220,7 +1220,7 @@ bool pkgProblemResolver::ResolveByKeep() 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); @@ -1317,7 +1317,7 @@ bool pkgProblemResolver::ResolveByKeep() if (Start == End) break; - Start++; + ++Start; } if (InstOrNewPolicyBroken(I) == false) @@ -1344,7 +1344,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) { @@ -1424,7 +1424,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/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 9ccbeecf1..6ec5fa03a 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -53,7 +53,7 @@ const Configuration::getCompressionTypes(bool const &Cached) { // load the order setting into our vector std::vector const order = _config->FindVector("Acquire::CompressionTypes::Order"); for (std::vector::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 @@ -274,7 +274,7 @@ std::vector const Configuration::getLanguages(bool const &All, // then needed and ensure the codes are not listed twice. bool noneSeen = false; for (std::vector::const_iterator l = lang.begin(); - l != lang.end(); l++) { + l != lang.end(); ++l) { if (*l == "environment") { for (std::vector::const_iterator e = environment.begin(); e != environment.end(); ++e) { diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 2a914c665..b8acf0cbe 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -310,7 +310,7 @@ void pkgCdrom::ReduceSourcelist(string CD,vector &List) sort(List.begin(),List.end()); // Collect similar entries - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { // Find a space.. string::size_type Space = (*I).find(' '); @@ -322,7 +322,7 @@ void pkgCdrom::ReduceSourcelist(string CD,vector &List) string Word1 = string(*I,Space,SSpace-Space); string Prefix = string(*I,0,Space); - for (vector::iterator J = List.begin(); J != I; J++) + for (vector::iterator J = List.begin(); J != I; ++J) { // Find a space.. string::size_type Space2 = (*J).find(' '); @@ -405,7 +405,7 @@ bool pkgCdrom::WriteDatabase(Configuration &Cnf) that were the same. */ bool pkgCdrom::WriteSourceList(string Name,vector &List,bool Source) { - if (List.size() == 0) + if (List.empty() == true) return true; string File = _config->FindFile("Dir::Etc::sourcelist"); @@ -455,7 +455,7 @@ bool pkgCdrom::WriteSourceList(string Name,vector &List,bool Source) if (First == true) { - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { string::size_type Space = (*I).find(' '); if (Space == string::npos) @@ -489,7 +489,7 @@ bool pkgCdrom::WriteSourceList(string Name,vector &List,bool Source) // Just in case the file was empty if (First == true) { - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { string::size_type Space = (*I).find(' '); if (Space == string::npos) @@ -661,13 +661,13 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ if (_config->FindB("Debug::aptcdrom",false) == true) { cout << "I found (binary):" << endl; - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) cout << *I << endl; cout << "I found (source):" << endl; - for (vector::iterator I = SourceList.begin(); I != SourceList.end(); I++) + for (vector::iterator I = SourceList.begin(); I != SourceList.end(); ++I) cout << *I << endl; cout << "I found (Signatures):" << endl; - for (vector::iterator I = SigList.begin(); I != SigList.end(); I++) + for (vector::iterator I = SigList.begin(); I != SigList.end(); ++I) cout << *I << endl; } @@ -688,7 +688,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 +712,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 +757,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 +804,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ if(log != NULL) log->Update(_("Source list entries for this disc are:\n")); - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { string::size_type Space = (*I).find(' '); if (Space == string::npos) @@ -823,7 +823,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ } } - for (vector::iterator I = SourceList.begin(); I != SourceList.end(); I++) + for (vector::iterator I = SourceList.begin(); I != SourceList.end(); ++I) { string::size_type Space = (*I).find(' '); if (Space == string::npos) diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 629afd7cf..9850b93b4 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -85,12 +85,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/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 942ea9fbc..ece05e8f6 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -672,9 +672,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 +850,7 @@ bool ReadConfigDir(Configuration &Conf,const string &Dir, vector const List = GetListOfFilesInDir(Dir, "conf", true, true); // Read the files - for (vector::const_iterator I = List.begin(); I != List.end(); I++) + for (vector::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/error.cc b/apt-pkg/contrib/error.cc index 18810d2a4..edb290f34 100644 --- a/apt-pkg/contrib/error.cc +++ b/apt-pkg/contrib/error.cc @@ -193,7 +193,7 @@ bool GlobalError::PopMessage(std::string &Text) { // check if another error message is pending for (std::list::const_iterator m = Messages.begin(); - m != Messages.end(); m++) + m != Messages.end(); ++m) if (m->Type == ERROR || m->Type == FATAL) return Ret; @@ -210,7 +210,7 @@ void GlobalError::DumpErrors(std::ostream &out, MsgType const &threshold, Messages.insert(Messages.begin(), s->Messages.begin(), s->Messages.end()); for (std::list::const_iterator m = Messages.begin(); - m != Messages.end(); m++) + m != Messages.end(); ++m) if (m->Type >= threshold) out << (*m) << std::endl; Discard(); @@ -231,7 +231,7 @@ bool GlobalError::empty(MsgType const &trashhold) const { return true; for (std::list::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/strutl.cc b/apt-pkg/contrib/strutl.cc index ab2da2d9a..867bb313b 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -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 @@ -1224,7 +1224,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 +1248,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 +1264,7 @@ string DeEscapeString(const string &input) // copy output += *it; // advance iterator one step further - it += 1; + ++it; continue; } @@ -1273,7 +1273,7 @@ string DeEscapeString(const string &input) continue; // read it - it++; + ++it; switch (*it) { case '0': @@ -1310,7 +1310,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 +1322,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 +1355,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/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index c9e7f1176..e3d4063dc 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -352,7 +352,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 +540,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 +620,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/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 73628c741..8d3f6f0ba 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -203,7 +203,7 @@ string debListParser::DescriptionLanguage() std::vector const lang = APT::Configuration::getLanguages(true); for (std::vector::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; diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index a91cc34e9..f6c50742e 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -206,7 +206,7 @@ vector * debReleaseIndex::ComputeIndexTargets() const { for (std::set::const_iterator s = sections.begin(); s != sections.end(); ++s) { for (std::vector::const_iterator l = lang.begin(); - l != lang.end(); l++) { + l != lang.end(); ++l) { if (*l == "none") continue; IndexTarget * Target = new OptionalIndexTarget(); Target->ShortDesc = "Translation-" + *l; @@ -236,7 +236,7 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool const &GetAll) const // special case for --print-uris if (GetAll) { vector *targets = ComputeIndexTargets(); - for (vector ::const_iterator Target = targets->begin(); Target != targets->end(); Target++) { + for (vector ::const_iterator Target = targets->begin(); Target != targets->end(); ++Target) { new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description, (*Target)->ShortDesc, HashString()); } @@ -279,7 +279,7 @@ vector *debReleaseIndex::GetIndexFiles() { if (src != ArchEntries.end()) { vector const SectionEntries = src->second; for (vector::const_iterator I = SectionEntries.begin(); - I != SectionEntries.end(); I++) + I != SectionEntries.end(); ++I) Indexes->push_back(new debSourcesIndex (URI, Dist, (*I)->Section, IsTrusted())); } @@ -294,7 +294,7 @@ vector *debReleaseIndex::GetIndexFiles() { if (a->first == "source") continue; for (vector::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()); } @@ -303,7 +303,7 @@ vector *debReleaseIndex::GetIndexFiles() { for (map >::const_iterator s = sections.begin(); s != sections.end(); ++s) for (set::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())); } @@ -351,7 +351,7 @@ class debSLTypeDebian : public pkgSourceList::Type APT::Configuration::getArchitectures(); for (vector::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/debrecords.cc b/apt-pkg/deb/debrecords.cc index ec9e395ef..7f596ab0d 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -118,7 +118,7 @@ string debRecordParser::LongDesc() { vector const lang = APT::Configuration::getLanguages(); for (vector::const_iterator l = lang.begin(); - orig.empty() && l != lang.end(); l++) + orig.empty() && l != lang.end(); ++l) orig = Section.FindS(string("Description-").append(*l).c_str()); } diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 5fbd1801a..46f48777c 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -213,7 +213,7 @@ bool pkgDPkgPM::SendV2Pkgs(FILE *F) fprintf(F,"\n"); // Write out the package actions in order. - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { if(I->Pkg.end() == true) continue; @@ -335,7 +335,7 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) // Feed it the filenames. if (Version <= 1) { - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { // Only deal with packages to be installed from .deb if (I->Op != Item::Install) @@ -690,7 +690,7 @@ bool pkgDPkgPM::OpenLog() chmod(history_name.c_str(), 0644); fprintf(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; @@ -868,14 +868,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::const_iterator I = List.begin(); I != List.end();I++) + for (vector::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++; @@ -893,7 +893,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Do all actions with the same Op in one run vector::const_iterator J = I; if (TriggersPending == true) - for (; J != List.end(); J++) + for (; J != List.end(); ++J) { if (J->Op == I->Op) continue; @@ -905,7 +905,7 @@ 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 @@ -1011,7 +1011,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // 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()); @@ -1023,7 +1023,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) { 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; @@ -1461,7 +1461,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::iterator I = List.begin(); I != List.end(); I++) + for (vector::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/depcache.cc b/apt-pkg/depcache.cc index eb3f4e598..580056687 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -129,7 +129,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); @@ -292,7 +292,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 +365,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. */ @@ -585,7 +585,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]; @@ -625,7 +625,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; @@ -715,15 +715,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]; @@ -760,7 +760,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); @@ -793,13 +793,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()); } /*}}}*/ @@ -1059,7 +1059,7 @@ void 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; @@ -1522,12 +1522,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/indexcopy.cc b/apt-pkg/indexcopy.cc index 31c577705..b262e21c4 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -43,7 +43,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List, pkgCdromStatus *log) { OpProgress *Progress = NULL; - if (List.size() == 0) + if (List.empty() == true) return true; if(log) @@ -54,7 +54,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List, // Prepare the progress indicator unsigned long TotalSize = 0; - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { struct stat Buf; if (stat(string(*I + GetFileName()).c_str(),&Buf) != 0 && @@ -68,7 +68,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List, unsigned int NotFound = 0; unsigned int WrongSize = 0; unsigned int Packages = 0; - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { string OrigPath = string(*I,CDROM.length()); unsigned long FileSize = 0; @@ -583,13 +583,13 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, /*{{{*/ vector PkgList,vector SrcList) { - if (SigList.size() == 0) + if (SigList.empty() == true) return true; bool Debug = _config->FindB("Debug::aptcdrom",false); // Read all Release files - for (vector::iterator I = SigList.begin(); I != SigList.end(); I++) + for (vector::iterator I = SigList.begin(); I != SigList.end(); ++I) { if(Debug) cout << "Signature verify for: " << *I << endl; @@ -633,7 +633,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, // go over the Indexfiles and see if they verify // if so, remove them from our copy of the lists vector keys = MetaIndex->MetaKeys(); - for (vector::iterator I = keys.begin(); I != keys.end(); I++) + for (vector::iterator I = keys.begin(); I != keys.end(); ++I) { if(!Verify(prefix,*I, MetaIndex)) { // something went wrong, don't copy the Release.gpg @@ -776,7 +776,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ vector &List, pkgCdromStatus *log) { OpProgress *Progress = NULL; - if (List.size() == 0) + if (List.empty() == true) return true; if(log) @@ -786,7 +786,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ // Prepare the progress indicator unsigned long TotalSize = 0; - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { struct stat Buf; if (stat(string(*I).c_str(),&Buf) != 0 && @@ -800,7 +800,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ unsigned int NotFound = 0; unsigned int WrongSize = 0; unsigned int Packages = 0; - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { string OrigPath = string(*I,CDROM.length()); unsigned long FileSize = 0; diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index 19661fc2d..6034138cf 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -323,7 +323,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,7 +488,7 @@ 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; } @@ -615,7 +615,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) { @@ -693,7 +693,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 +736,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 +791,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) @@ -846,7 +846,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 +868,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 diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index fe9f6eb68..999a7b0a0 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -99,7 +99,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 +140,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)) @@ -169,7 +169,7 @@ bool pkgPackageManager::CreateOrderList() static bool const NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true); // 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) @@ -229,7 +229,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) @@ -364,13 +364,13 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth) { if (D->Type != pkgCache::Dep::Depends && D->Type != pkgCache::Dep::PreDepends) { - D++; + ++D; continue; } // Grok or groups Bad = true; - for (bool LastOR = true; D.end() == false && LastOR == true; D++) + for (bool LastOR = true; D.end() == false && LastOR == true; ++D) { LastOR = (D->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or; @@ -378,7 +378,7 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth) continue; SPtrArray VList = D.AllTargets(); - for (Version **I = VList; *I != 0 && Bad == true; I++) + for (Version **I = VList; *I != 0 && Bad == true; ++I) { VerIterator Ver(Cache,*I); PkgIterator Pkg = Ver.ParentPkg(); @@ -444,7 +444,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; @@ -564,7 +564,7 @@ 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 break; @@ -597,7 +597,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate) return false; for (PrvIterator P = instVer.ProvidesList(); - P.end() == false; P++) + P.end() == false; ++P) CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion()); List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 38e4e904e..ed24d9ea8 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -175,7 +175,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); } @@ -183,7 +183,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); } @@ -569,7 +569,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) @@ -577,7 +577,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()) @@ -611,7 +611,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; @@ -626,7 +626,7 @@ 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; @@ -717,7 +717,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; @@ -729,7 +729,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; @@ -742,7 +742,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; @@ -760,7 +760,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; @@ -777,7 +777,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(); @@ -786,7 +786,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) @@ -887,7 +887,7 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const { std::vector const lang = APT::Configuration::getLanguages(); for (std::vector::const_iterator l = lang.begin(); - l != lang.end(); l++) + l != lang.end(); ++l) { pkgCache::DescIterator Desc = DescriptionList(); for (; Desc.end() == false; ++Desc) diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 2bfb77609..8a7c1e979 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -220,7 +220,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, // don't add a new description if we have one for the given // md5 && language - for ( ; Desc.end() == false; Desc++) + for ( ; Desc.end() == false; ++Desc) if (MD5SumValue(Desc.md5()) == CurMd5 && Desc.LanguageCode() == List.DescriptionLanguage()) duplicate=true; @@ -229,7 +229,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, for (Desc = Ver.DescriptionList(); Desc.end() == false; - LastDesc = &Desc->NextDesc, Desc++) + LastDesc = &Desc->NextDesc, ++Desc) { if (MD5SumValue(Desc.md5()) == CurMd5) { @@ -395,7 +395,7 @@ bool pkgCacheGenerator::MergeFileProvides(ListParser &List) unsigned long Hash = List.VersionHash(); pkgCache::VerIterator Ver = Pkg.VersionList(); Dynamic DynVer(Ver); - for (; Ver.end() == false; Ver++) + for (; Ver.end() == false; ++Ver) { if (Ver->Hash == Hash && Version.c_str() == Ver.VerStr()) { @@ -511,7 +511,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(); @@ -568,7 +568,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; @@ -623,7 +623,7 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress) // Create Conflicts in between the group pkgCache::GrpIterator G = GetCache().GrpBegin(); Dynamic DynG(G); - for (; G.end() != true; G++) + for (; G.end() != true; ++G) { string const PkgName = G.Name(); pkgCache::PkgIterator P = G.PackageList(); @@ -634,7 +634,7 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress) Dynamic DynallPkg(allPkg); pkgCache::VerIterator V = P.VersionList(); Dynamic DynV(V); - for (; V.end() != true; 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 @@ -728,7 +728,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; @@ -958,7 +958,7 @@ static bool CheckValidity(const string &CacheFile, verify the IMS data and check that it is on the disk too.. */ SPtrArray 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() << ": "; @@ -1025,7 +1025,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; @@ -1043,7 +1043,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; @@ -1073,7 +1073,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) @@ -1120,12 +1120,12 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress vector Files; for (vector::const_iterator i = List.begin(); i != List.end(); - i++) + ++i) { vector *Indexes = (*i)->GetIndexFiles(); for (vector::const_iterator j = Indexes->begin(); j != Indexes->end(); - j++) + ++j) Files.push_back (*j); } diff --git a/apt-pkg/pkgrecords.cc b/apt-pkg/pkgrecords.cc index e506de73a..1a7585d8f 100644 --- a/apt-pkg/pkgrecords.cc +++ b/apt-pkg/pkgrecords.cc @@ -24,7 +24,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) diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index c5028d822..6a5130d48 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -81,7 +81,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 +98,10 @@ bool pkgPolicy::InitDefaults() signed Cur = 989; StatusOverride = false; for (vector::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 +122,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 +162,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) @@ -356,7 +356,7 @@ bool ReadPinDir(pkgPolicy &Plcy,string Dir) vector const List = GetListOfFilesInDir(Dir, "pref", true, true); // Read the files - for (vector::const_iterator I = List.begin(); I != List.end(); I++) + for (vector::const_iterator I = List.begin(); I != List.end(); ++I) if (ReadPinFile(Plcy, *I) == false) return false; return true; diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index c96ccfd77..a25358bf2 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -173,7 +173,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 +218,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()); } @@ -296,11 +296,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 *Indexes = (*I)->GetIndexFiles(); for (vector::const_iterator J = Indexes->begin(); - J != Indexes->end(); J++) + J != Indexes->end(); ++J) { if ((*J)->FindInCache(*File.Cache()) == File) { @@ -318,7 +318,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 +334,7 @@ bool pkgSourceList::ReadSourceDir(string Dir) vector const List = GetListOfFilesInDir(Dir, "list", true); // Read the files - for (vector::const_iterator I = List.begin(); I != List.end(); I++) + for (vector::const_iterator I = List.begin(); I != List.end(); ++I) if (ReadAppend(*I) == false) return false; return true; @@ -353,7 +353,7 @@ time_t pkgSourceList::GetLastModifiedTime() // calculate the time time_t mtime_sources = GetModificationTime(Main); - for (vector::const_iterator I = List.begin(); I != List.end(); I++) + for (vector::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/srcrecords.cc b/apt-pkg/srcrecords.cc index 46a02b55c..946ac1a1a 100644 --- a/apt-pkg/srcrecords.cc +++ b/apt-pkg/srcrecords.cc @@ -24,11 +24,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 *Indexes = (*I)->GetIndexFiles(); for (vector::const_iterator J = Indexes->begin(); - J != Indexes->end(); J++) + J != Indexes->end(); ++J) { Parser* P = (*J)->CreateSrcParser(); if (_error->PendingError() == true) @@ -66,7 +66,7 @@ bool pkgSrcRecords::Restart() { Current = Files.begin(); for (vector::iterator I = Files.begin(); - I != Files.end(); I++) + I != Files.end(); ++I) (*I)->Restart(); return true; @@ -89,7 +89,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 +107,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/vendorlist.cc b/apt-pkg/vendorlist.cc index 48ac12cee..4cc500727 100644 --- a/apt-pkg/vendorlist.cc +++ b/apt-pkg/vendorlist.cc @@ -11,7 +11,7 @@ pkgVendorList::~pkgVendorList() { for (vector::const_iterator I = VendorList.begin(); - I != VendorList.end(); I++) + I != VendorList.end(); ++I) delete *I; } @@ -49,7 +49,7 @@ bool pkgVendorList::Read(string File) /*{{{*/ bool pkgVendorList::CreateList(Configuration& Cnf) /*{{{*/ { for (vector::const_iterator I = VendorList.begin(); - I != VendorList.end(); I++) + I != VendorList.end(); ++I) delete *I; VendorList.erase(VendorList.begin(),VendorList.end()); @@ -129,7 +129,7 @@ const Vendor* pkgVendorList::LookupFingerprint(string Fingerprint) /*{{{*/ /*}}}*/ const Vendor* pkgVendorList::FindVendor(const std::vector GPGVOutput) /*{{{*/ { - for (std::vector::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); I++) + for (std::vector::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/versionmatch.cc b/apt-pkg/versionmatch.cc index c40b1fdbc..6d667acad 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -60,7 +60,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 +152,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 +163,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/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 232bb93ec..db5475227 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -141,7 +141,7 @@ bool ShowUnMet(pkgCache::VerIterator const &V, bool const &Important) if (Start == End) break; - Start++; + ++Start; } while (1); @@ -169,7 +169,7 @@ bool ShowUnMet(pkgCache::VerIterator const &V, bool const &Important) if (Start == End) break; cout << " | "; - Start++; + ++Start; } while (1); @@ -187,7 +187,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 +217,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 +235,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 +245,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 +290,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 +353,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 +394,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 +413,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 +449,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 +466,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 +480,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 +615,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 +741,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 +788,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 +814,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 +829,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 +889,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 +953,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 +1000,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 +1024,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 +1039,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 +1094,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 +1127,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 +1272,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 +1341,13 @@ bool ShowAuto(CommandLine &CmdL) std::vector 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::iterator I = packages.begin(); I != packages.end(); I++) + for (vector::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 +1391,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 +1405,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 +1476,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 +1498,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 +1560,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 +1607,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 +1619,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 *Indexes = (*S)->GetIndexFiles(); for (vector::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-get.cc b/cmdline/apt-get.cc index b0450e803..1849f1335 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -363,7 +363,7 @@ void ShowBroken(ostream &out,CacheFile &Cache,bool Now) if (Start == End) break; - Start++; + ++Start; } } } @@ -537,7 +537,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 && @@ -574,7 +574,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++; @@ -666,7 +666,7 @@ public: } // if we found no candidate which provide this package, show non-candidates if (provider == 0) - for (I = Pkg.ProvidesList(); I.end() == false; I++) + for (I = Pkg.ProvidesList(); I.end() == false; ++I) out << " " << I.OwnerPkg().FullName(true) << " " << I.OwnerVer().VerStr() << _(" [Not candidate version]") << endl; else @@ -682,7 +682,7 @@ public: SPtrArray 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) @@ -921,7 +921,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; @@ -953,7 +953,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); } @@ -1044,7 +1044,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); @@ -1238,7 +1238,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; @@ -1262,7 +1262,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, { if ((*I)->Local == true) { - I++; + ++I; continue; } @@ -1282,7 +1282,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) @@ -1442,7 +1442,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) @@ -1463,7 +1463,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) @@ -1615,7 +1615,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; @@ -1998,7 +1998,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() && @@ -2021,7 +2021,7 @@ bool DoInstall(CommandLine &CmdL) if (Start >= End) break; - Start++; + ++Start; } if(foundInstalledInOrGroup == false) @@ -2135,7 +2135,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 */ @@ -2145,7 +2145,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 */ @@ -2154,7 +2154,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 || @@ -2171,7 +2171,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) { @@ -2317,7 +2317,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; @@ -2435,7 +2435,7 @@ bool DoSource(CommandLine &CmdL) // Load them into the fetcher for (vector::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") @@ -2537,7 +2537,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; @@ -2553,7 +2553,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) @@ -2582,7 +2582,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()); @@ -2731,7 +2731,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; @@ -2741,7 +2741,7 @@ bool DoBuildDep(CommandLine &CmdL) vector ::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); @@ -2920,7 +2920,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/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index 0762a2b28..fabaaec1d 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -384,7 +384,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::iterator I = Begin; I != End; I++) + for (vector::iterator I = Begin; I != End; ++I) { if (I->Contents != this->Contents) continue; @@ -770,10 +770,10 @@ bool Generate(CommandLine &CmdL) // Generate packages if (CmdL.FileSize() <= 2) { - for (vector::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector::iterator I = PkgList.begin(); I != PkgList.end(); ++I) if (I->GenPackages(Setup,Stats) == false) _error->DumpErrors(); - for (vector::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector::iterator I = PkgList.begin(); I != PkgList.end(); ++I) if (I->GenSources(Setup,SrcStats) == false) _error->DumpErrors(); } @@ -782,7 +782,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::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector::iterator I = PkgList.begin(); I != PkgList.end(); ++I) { End->UserData = &(*I); End->Str = I->BaseDir.c_str(); @@ -832,7 +832,7 @@ bool Generate(CommandLine &CmdL) } // close the Translation master files - for (vector::reverse_iterator I = PkgList.rbegin(); I != PkgList.rend(); I++) + for (vector::reverse_iterator I = PkgList.rbegin(); I != PkgList.rend(); ++I) if (I->TransWriter != NULL && I->TransWriter->DecreaseRefCounter() == 0) delete I->TransWriter; @@ -843,7 +843,7 @@ bool Generate(CommandLine &CmdL) // Sort the contents file list by date string ArchiveDir = Setup.FindDir("Dir::ArchiveDir"); - for (vector::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector::iterator I = PkgList.begin(); I != PkgList.end(); ++I) { struct stat A; if (MultiCompress::GetStat(flCombine(ArchiveDir,I->Contents), @@ -860,7 +860,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::iterator I = PkgList.begin(); I != PkgList.end(); I++) + for (vector::iterator I = PkgList.begin(); I != PkgList.end(); ++I) { // This record is not relevent if (I->ContentsDone == true || @@ -936,7 +936,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/multicompress.cc b/ftparchive/multicompress.cc index f82879015..08853b0aa 100644 --- a/ftparchive/multicompress.cc +++ b/ftparchive/multicompress.cc @@ -48,11 +48,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 Compressors = APT::Configuration::getCompressors(); @@ -129,11 +129,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 Compressors = APT::Configuration::getCompressors(); diff --git a/ftparchive/override.cc b/ftparchive/override.cc index 3cf10b89b..bd583a66f 100644 --- a/ftparchive/override.cc +++ b/ftparchive/override.cc @@ -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::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 9f12cbf3d..7837ce6ce 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -491,7 +491,7 @@ bool PackagesWriter::DoPackage(string FileName) } for (map::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); @@ -816,7 +816,7 @@ bool SourcesWriter::DoPackage(string FileName) SetTFRewriteData(Changes[End++], "Maintainer", NewMaint.c_str()); for (map::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); diff --git a/methods/ftp.cc b/methods/ftp.cc index 97248f900..c2c485769 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -559,7 +559,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; diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 960c06180..3ad3e8d84 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -213,21 +213,21 @@ bool GPGVMethod::Fetch(FetchItem *Itm) { errmsg += _("The following signatures were invalid:\n"); for (vector::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::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::iterator I = NoPubKeySigners.begin(); - I != NoPubKeySigners.end(); I++) + I != NoPubKeySigners.end(); ++I) errmsg += (*I + "\n"); } } diff --git a/methods/http.cc b/methods/http.cc index 13f9cbe06..65a0cbbb7 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -402,10 +402,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; @@ -1325,7 +1325,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/mirror.cc b/methods/mirror.cc index 713dc211a..565df5327 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -107,7 +107,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) @@ -330,7 +330,7 @@ string MirrorMethod::GetMirrorFileName(string mirror_uri_str) vector::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/test/libapt/assert.h b/test/libapt/assert.h index 92b662dfa..fae9b6c64 100644 --- a/test/libapt/assert.h +++ b/test/libapt/assert.h @@ -53,3 +53,11 @@ void assertEqualsOr2(int const &expect1, int const &expect2, unsigned int const assertEqualsOr2(expect1, expect2, 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/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 -// simple helper to quickly output a vector of strings -void dumpVector(std::vector vec) { - for (std::vector::const_iterator v = vec.begin(); - v != vec.end(); v++) - std::cout << *v << std::endl; -} - int main(int argc,char *argv[]) { std::vector vec; diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc index 3d63e0e74..f6aa7a697 100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@ -7,13 +7,6 @@ #include -// simple helper to quickly output a vector of strings -void dumpVector(std::vector vec) { - for (std::vector::const_iterator v = vec.begin(); - v != vec.end(); v++) - std::cout << *v << std::endl; -} - int main(int argc,char *argv[]) { if (argc != 2) { diff --git a/test/libapt/getlistoffilesindir_test.cc b/test/libapt/getlistoffilesindir_test.cc index ed8d2dad6..5ee014cca 100644 --- a/test/libapt/getlistoffilesindir_test.cc +++ b/test/libapt/getlistoffilesindir_test.cc @@ -7,13 +7,6 @@ #include #include -// simple helper to quickly output a vector of strings -void dumpVector(std::vector vec) { - for (std::vector::const_iterator v = vec.begin(); - v != vec.end(); v++) - std::cout << *v << std::endl; -} - #define P(x) string(argv[1]).append("/").append(x) int main(int argc,char *argv[]) diff --git a/test/test_udevcdrom.cc b/test/test_udevcdrom.cc index e65c7a297..577e2d013 100644 --- a/test/test_udevcdrom.cc +++ b/test/test_udevcdrom.cc @@ -10,7 +10,7 @@ int main() vector l; l = c.Scan(); - assert(l.size() > 0); + assert(l.empty() == false); for (i=0;i Date: Fri, 12 Aug 2011 09:58:55 +0200 Subject: cherry pick test/integration/Packages-hashsum-verification addition from lp:~mvo/apt/mvo --- test/integration/Packages-hashsum-verification | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/integration/Packages-hashsum-verification (limited to 'test') diff --git a/test/integration/Packages-hashsum-verification b/test/integration/Packages-hashsum-verification new file mode 100644 index 000000000..29a385f4f --- /dev/null +++ b/test/integration/Packages-hashsum-verification @@ -0,0 +1,18 @@ +Package: apt +Version: 0.7.25.3 +Architecture: i386 +Maintainer: APT Development Team +Installed-Size: 5244 +Replaces: libapt-pkg-dev (<< 0.3.7), libapt-pkg-doc (<< 0.3.7) +Provides: libapt-pkg-libc6.9-6-4.8 +Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt +Filename: apt.deb +Size: 0 +MD5sum: d41d8cd98f00b204e9800998ecf8427e +Description: 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. + . + APT features complete installation ordering, multiple source capability + and several other unique features, see the Users Guide in apt-doc. -- cgit v1.2.3-70-g09d2 From bf5438c1904c57d5f03c58a2f7d6e972020f91f9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 15 Aug 2011 18:22:44 +0200 Subject: write a proper testcase replacing the print-only uri.cc test --- test/libapt/globalerror_test.cc | 2 +- test/libapt/makefile | 6 +++ test/libapt/uri_test.cc | 112 ++++++++++++++++++++++++++++++++++++++++ test/makefile | 6 --- test/uri.cc | 34 ------------ 5 files changed, 119 insertions(+), 41 deletions(-) create mode 100644 test/libapt/uri_test.cc delete mode 100644 test/uri.cc (limited to 'test') 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/makefile b/test/libapt/makefile index fec928ad2..87a1213c0 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -52,3 +52,9 @@ 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) 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 + +#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/makefile b/test/makefile index 52adb96a2..5a674c42e 100644 --- a/test/makefile +++ b/test/makefile @@ -11,12 +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 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 -#include - -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"); -} -- cgit v1.2.3-70-g09d2 From 6e7d39d0f52c02c1da991554bc8f44301369fced Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 15 Aug 2011 18:23:54 +0200 Subject: support yet another webserver in the integration tests: gatling --- test/integration/framework | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index fa451cf4f..ccab010e6 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -612,6 +612,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 -- cgit v1.2.3-70-g09d2 From 213b88053da331adf07b89ce35c8eb9cff914be4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 09:59:19 +0200 Subject: merge the tests for configuration into another libapt-test --- test/conf.cc | 37 ------------------- test/conf_clear.cc | 23 ------------ test/libapt/configuration_test.cc | 78 +++++++++++++++++++++++++++++++++++++++ test/libapt/makefile | 6 +++ test/makefile | 12 ------ 5 files changed, 84 insertions(+), 72 deletions(-) delete mode 100644 test/conf.cc delete mode 100644 test/conf_clear.cc create mode 100644 test/libapt/configuration_test.cc (limited to 'test') 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 -#include - -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 -#include - -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/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 + +#include +#include + +#include "assert.h" + +int main(int argc,const char *argv[]) { + Configuration Cnf; + std::vector 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/makefile b/test/libapt/makefile index 87a1213c0..366907d89 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -58,3 +58,9 @@ 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/makefile b/test/makefile index 5a674c42e..9fcd6a826 100644 --- a/test/makefile +++ b/test/makefile @@ -25,18 +25,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 -- cgit v1.2.3-70-g09d2 From 32d9baeab02d2399eb8bd2dfa53bb4f679eebd88 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 11:13:50 +0200 Subject: * 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 locked at in the ordering of installations too (Closes: #802901) --- apt-pkg/packagemanager.cc | 3 ++- apt-pkg/pkgcache.cc | 2 +- debian/changelog | 10 +++++++++ .../test-ubuntu-bug-802901-multiarch-early-remove | 24 ++++++++++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100755 test/integration/test-ubuntu-bug-802901-multiarch-early-remove (limited to 'test') diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 060cd3248..6601d9f6b 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -598,7 +598,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate) for (PrvIterator P = instVer.ProvidesList(); P.end() == false; ++P) - CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion()); + if (Pkg->Group != P.OwnerPkg()->Group) + CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion()); List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index ed24d9ea8..6db025bd0 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -632,7 +632,7 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() const continue; if (IsNegative() == true && - ParentPkg() == I.OwnerPkg()) + ParentPkg()->Group == I.OwnerPkg()->Group) continue; Size++; diff --git a/debian/changelog b/debian/changelog index d44d0aaa2..de8f64de4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +apt (0.8.15.5.6+nmu1) UNRELEASED; 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 locked at + in the ordering of installations too (Closes: #802901) + + -- David Kalnischkies Wed, 17 Aug 2011 11:08:02 +0200 + apt (0.8.15.5.6) UNRELEASED; urgency=low [ Michael Vogt ] 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 -- cgit v1.2.3-70-g09d2 From 8d6a43be01127f68681646e6410d6aec146505ac Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 11:34:10 +0200 Subject: replaced by the integration/test-compressed-indexes test --- test/test-indexes.sh | 235 --------------------------------------------------- 1 file changed, 235 deletions(-) delete mode 100755 test/test-indexes.sh (limited to 'test') 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 -# (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 < 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 =====" -- cgit v1.2.3-70-g09d2 From 15bf40454412bea91b3d265f75dfc654a64605a2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 11:38:10 +0200 Subject: remove the interactive scratch test, it doesn't test much and what it tests is covered by your non-interactive testcases, so this one wasn't used for a looooong time --- test/scratch.cc | 105 -------------------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 test/scratch.cc (limited to 'test') 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 -#include -#include -#include -#include -#include -#include -#include - -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(); -} -- cgit v1.2.3-70-g09d2 From 04b73012bd80884d26da7157ee0c37f70f2c0b9c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 11:42:02 +0200 Subject: move the list of versions to test with to the libapt subdirectory --- test/libapt/compareversion_test.cc | 2 +- test/libapt/versions.lst | 106 +++++++++++++++++++++++++++++++++++++ test/versions.lst | 106 ------------------------------------- 3 files changed, 107 insertions(+), 107 deletions(-) create mode 100644 test/libapt/versions.lst delete mode 100644 test/versions.lst (limited to 'test') diff --git a/test/libapt/compareversion_test.cc b/test/libapt/compareversion_test.cc index b6213e84c..7f192b19b 100644 --- a/test/libapt/compareversion_test.cc +++ b/test/libapt/compareversion_test.cc @@ -113,7 +113,7 @@ bool RunTest(const char *File) int main(int argc, char *argv[]) { if (argc <= 1) - RunTest("../versions.lst"); + RunTest("versions.lst"); else RunTest(argv[1]); diff --git a/test/libapt/versions.lst b/test/libapt/versions.lst new file mode 100644 index 000000000..8dd8ebdc9 --- /dev/null +++ b/test/libapt/versions.lst @@ -0,0 +1,106 @@ +# List of +# ver1 ver2 ret +# Of versions worth testing +# 1 means that ver1 > ver2 +# -1 means that ver1 < ver2 +# 0 means that ver1 = ver2 +7.6p2-4 7.6-0 1 +1.0.3-3 1.0-1 1 +1.3 1.2.2-2 1 +1.3 1.2.2 1 + +# Important attributes +# disabled as dpkg --compare-versions doesn't like them… (versions have to start with a number) +#- . -1 +#p - -1 +#a - -1 +#z - -1 +#a . -1 +#z . -1 + +# disabled as dpkg --compare-versions doesn't like them… (versions have to start with a number) +#III-alpha9.8 III-alpha9.8-1.5 -1 + +# Epochs +1:0.4 10.3 1 +1:1.25-4 1:1.25-8 -1 +0:1.18.36 1.18.36 0 + +# native version +1.18.36 1.18.35 1 +0:1.18.36 1.18.35 1 + +# Funky, but allowed, characters in upstream version +9:1.18.36:5.4-20 10:0.5.1-22 -1 +9:1.18.36:5.4-20 9:1.18.36:5.5-1 -1 +9:1.18.36:5.4-20 9:1.18.37:4.3-22 -1 +1.18.36-0.17.35-18 1.18.36-19 1 + +# Junk +1:1.2.13-3 1:1.2.13-3.1 -1 +2.0.7pre1-4 2.0.7r-1 -1 + +# Test some properties of text strings +0-pre 0-pre 0 +0-pre 0-pree -1 + +1.1.6r2-2 1.1.6r-1 1 +2.6b2-1 2.6b-2 1 + +98.1p5-1 98.1-pre2-b6-2 -1 +0.4a6-2 0.4-1 1 + +1:3.0.5-2 1:3.0.5.1 -1 + +# #205960 +3.0~rc1-1 3.0-1 -1 + +# #573592 - debian policy 5.6.12 +1.0 1.0-0 0 +0.2 1.0-0 -1 +1.0 1.0-0+b1 -1 +1.0 1.0-0~ 1 + +# if a version includes a dash +# it should be the debrev dash - policy says so… +0:0-0-0 0-0 1 + +# do we like strange versions? Yes we like strange versions… +0 0 0 +0 00 0 + +# "steal" the testcases from cupt +1.2.3 1.2.3 0 # identical +4.4.3-2 4.4.3-2 0 # identical +1:2ab:5 1:2ab:5 0 # this is correct... +7:1-a:b-5 7:1-a:b-5 0 # and this +57:1.2.3abYZ+~-4-5 57:1.2.3abYZ+~-4-5 0 # and those too +1.2.3 0:1.2.3 0 # zero epoch +1.2.3 1.2.3-0 0 # zero revision +009 9 0 # zeroes... +009ab5 9ab5 0 # there as well +1.2.3 1.2.3-1 -1 # added non-zero revision +1.2.3 1.2.4 -1 # just bigger +1.2.4 1.2.3 1 # order doesn't matter +1.2.24 1.2.3 1 # bigger, eh? +0.10.0 0.8.7 1 # bigger, eh? +3.2 2.3 1 # major number rocks +1.3.2a 1.3.2 1 # letters rock +0.5.0~git 0.5.0~git2 -1 # numbers rock +2a 21 -1 # but not in all places +1.3.2a 1.3.2b -1 # but there is another letter +1:1.2.3 1.2.4 1 # epoch rocks +1:1.2.3 1:1.2.4 -1 # bigger anyway +1.2a+~bCd3 1.2a++ -1 # tilde doesn't rock +1.2a+~bCd3 1.2a+~ 1 # but first is longer! +5:2 304-2 1 # epoch rocks +5:2 304:2 -1 # so big epoch? +25:2 3:2 1 # 25 > 3, obviously +1:2:123 1:12:3 -1 # 12 > 2 +1.2-5 1.2-3-5 -1 # 1.2 < 1.2-3 +5.10.0 5.005 1 # preceding zeroes don't matters +3a9.8 3.10.2 -1 # letters are before all letter symbols +3a9.8 3~10 1 # but after the tilde +1.4+OOo3.0.0~ 1.4+OOo3.0.0-4 -1 # another tilde check +2.4.7-1 2.4.7-z -1 # revision comparing +1.002-1+b2 1.00 1 # whatever... diff --git a/test/versions.lst b/test/versions.lst deleted file mode 100644 index 8dd8ebdc9..000000000 --- a/test/versions.lst +++ /dev/null @@ -1,106 +0,0 @@ -# List of -# ver1 ver2 ret -# Of versions worth testing -# 1 means that ver1 > ver2 -# -1 means that ver1 < ver2 -# 0 means that ver1 = ver2 -7.6p2-4 7.6-0 1 -1.0.3-3 1.0-1 1 -1.3 1.2.2-2 1 -1.3 1.2.2 1 - -# Important attributes -# disabled as dpkg --compare-versions doesn't like them… (versions have to start with a number) -#- . -1 -#p - -1 -#a - -1 -#z - -1 -#a . -1 -#z . -1 - -# disabled as dpkg --compare-versions doesn't like them… (versions have to start with a number) -#III-alpha9.8 III-alpha9.8-1.5 -1 - -# Epochs -1:0.4 10.3 1 -1:1.25-4 1:1.25-8 -1 -0:1.18.36 1.18.36 0 - -# native version -1.18.36 1.18.35 1 -0:1.18.36 1.18.35 1 - -# Funky, but allowed, characters in upstream version -9:1.18.36:5.4-20 10:0.5.1-22 -1 -9:1.18.36:5.4-20 9:1.18.36:5.5-1 -1 -9:1.18.36:5.4-20 9:1.18.37:4.3-22 -1 -1.18.36-0.17.35-18 1.18.36-19 1 - -# Junk -1:1.2.13-3 1:1.2.13-3.1 -1 -2.0.7pre1-4 2.0.7r-1 -1 - -# Test some properties of text strings -0-pre 0-pre 0 -0-pre 0-pree -1 - -1.1.6r2-2 1.1.6r-1 1 -2.6b2-1 2.6b-2 1 - -98.1p5-1 98.1-pre2-b6-2 -1 -0.4a6-2 0.4-1 1 - -1:3.0.5-2 1:3.0.5.1 -1 - -# #205960 -3.0~rc1-1 3.0-1 -1 - -# #573592 - debian policy 5.6.12 -1.0 1.0-0 0 -0.2 1.0-0 -1 -1.0 1.0-0+b1 -1 -1.0 1.0-0~ 1 - -# if a version includes a dash -# it should be the debrev dash - policy says so… -0:0-0-0 0-0 1 - -# do we like strange versions? Yes we like strange versions… -0 0 0 -0 00 0 - -# "steal" the testcases from cupt -1.2.3 1.2.3 0 # identical -4.4.3-2 4.4.3-2 0 # identical -1:2ab:5 1:2ab:5 0 # this is correct... -7:1-a:b-5 7:1-a:b-5 0 # and this -57:1.2.3abYZ+~-4-5 57:1.2.3abYZ+~-4-5 0 # and those too -1.2.3 0:1.2.3 0 # zero epoch -1.2.3 1.2.3-0 0 # zero revision -009 9 0 # zeroes... -009ab5 9ab5 0 # there as well -1.2.3 1.2.3-1 -1 # added non-zero revision -1.2.3 1.2.4 -1 # just bigger -1.2.4 1.2.3 1 # order doesn't matter -1.2.24 1.2.3 1 # bigger, eh? -0.10.0 0.8.7 1 # bigger, eh? -3.2 2.3 1 # major number rocks -1.3.2a 1.3.2 1 # letters rock -0.5.0~git 0.5.0~git2 -1 # numbers rock -2a 21 -1 # but not in all places -1.3.2a 1.3.2b -1 # but there is another letter -1:1.2.3 1.2.4 1 # epoch rocks -1:1.2.3 1:1.2.4 -1 # bigger anyway -1.2a+~bCd3 1.2a++ -1 # tilde doesn't rock -1.2a+~bCd3 1.2a+~ 1 # but first is longer! -5:2 304-2 1 # epoch rocks -5:2 304:2 -1 # so big epoch? -25:2 3:2 1 # 25 > 3, obviously -1:2:123 1:12:3 -1 # 12 > 2 -1.2-5 1.2-3-5 -1 # 1.2 < 1.2-3 -5.10.0 5.005 1 # preceding zeroes don't matters -3a9.8 3.10.2 -1 # letters are before all letter symbols -3a9.8 3~10 1 # but after the tilde -1.4+OOo3.0.0~ 1.4+OOo3.0.0-4 -1 # another tilde check -2.4.7-1 2.4.7-z -1 # revision comparing -1.002-1+b2 1.00 1 # whatever... -- cgit v1.2.3-70-g09d2 From 7c69574c5bec814cc3cb58701d2beccfe6093add Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 12:05:22 +0200 Subject: add 'dirs' target to the 'all' target to ensure that for e.g. the tests all (sub)directories are build which are needed (e.g. obj/ and co) --- buildlib/defaults.mak | 2 +- test/libapt/run-tests | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'test') diff --git a/buildlib/defaults.mak b/buildlib/defaults.mak index bf93bd2ee..d4269e05f 100644 --- a/buildlib/defaults.mak +++ b/buildlib/defaults.mak @@ -118,7 +118,7 @@ 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: diff --git a/test/libapt/run-tests b/test/libapt/run-tests index 4b71c2097..c81520bef 100755 --- a/test/libapt/run-tests +++ b/test/libapt/run-tests @@ -3,7 +3,6 @@ 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" -- cgit v1.2.3-70-g09d2 From 369c919f2be8d2c93b990a97436b41ba4ae1ff29 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 12:06:37 +0200 Subject: move the interactive helper to a subdirectory of test --- test/extract-control.cc | 42 ----------- test/interactive-helper/extract-control.cc | 42 +++++++++++ test/interactive-helper/makefile | 43 +++++++++++ test/interactive-helper/mthdcat.cc | 20 +++++ test/interactive-helper/rpmver.cc | 117 +++++++++++++++++++++++++++++ test/interactive-helper/test_udevcdrom.cc | 19 +++++ test/interactive-helper/testdeb.cc | 39 ++++++++++ test/interactive-helper/testextract.cc | 101 +++++++++++++++++++++++++ test/makefile | 56 -------------- test/mthdcat.cc | 20 ----- test/rpmver.cc | 117 ----------------------------- test/test_udevcdrom.cc | 19 ----- test/testdeb.cc | 39 ---------- test/testextract.cc | 101 ------------------------- 14 files changed, 381 insertions(+), 394 deletions(-) delete mode 100644 test/extract-control.cc create mode 100644 test/interactive-helper/extract-control.cc create mode 100644 test/interactive-helper/makefile create mode 100644 test/interactive-helper/mthdcat.cc create mode 100644 test/interactive-helper/rpmver.cc create mode 100644 test/interactive-helper/test_udevcdrom.cc create mode 100644 test/interactive-helper/testdeb.cc create mode 100644 test/interactive-helper/testextract.cc delete mode 100644 test/makefile delete mode 100644 test/mthdcat.cc delete mode 100644 test/rpmver.cc delete mode 100644 test/test_udevcdrom.cc delete mode 100644 test/testdeb.cc delete mode 100644 test/testextract.cc (limited to 'test') diff --git a/test/extract-control.cc b/test/extract-control.cc deleted file mode 100644 index 29dcbf371..000000000 --- a/test/extract-control.cc +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include - -#include -#include - -using namespace std; - -bool ExtractMember(const char *File,const char *Member) -{ - FileFd Fd(File,FileFd::ReadOnly); - debDebFile Deb(Fd); - if(_error->PendingError() == true) - return false; - - debDebFile::MemControlExtract Extract(Member); - if (Extract.Read(Deb) == false) - return false; - - if (Extract.Control == 0) - return true; - - write(STDOUT_FILENO,Extract.Control,Extract.Length); - return true; -} - -int main(int argc, const char *argv[]) -{ - if (argc < 2) - { - cerr << "Need two arguments, a .deb and the control member" << endl; - return 100; - } - - if (ExtractMember(argv[1],argv[2]) == false) - { - _error->DumpErrors(); - return 100; - } - - return 0; -} diff --git a/test/interactive-helper/extract-control.cc b/test/interactive-helper/extract-control.cc new file mode 100644 index 000000000..29dcbf371 --- /dev/null +++ b/test/interactive-helper/extract-control.cc @@ -0,0 +1,42 @@ +#include +#include + +#include +#include + +using namespace std; + +bool ExtractMember(const char *File,const char *Member) +{ + FileFd Fd(File,FileFd::ReadOnly); + debDebFile Deb(Fd); + if(_error->PendingError() == true) + return false; + + debDebFile::MemControlExtract Extract(Member); + if (Extract.Read(Deb) == false) + return false; + + if (Extract.Control == 0) + return true; + + write(STDOUT_FILENO,Extract.Control,Extract.Length); + return true; +} + +int main(int argc, const char *argv[]) +{ + if (argc < 2) + { + cerr << "Need two arguments, a .deb and the control member" << endl; + return 100; + } + + if (ExtractMember(argv[1],argv[2]) == false) + { + _error->DumpErrors(); + return 100; + } + + return 0; +} diff --git a/test/interactive-helper/makefile b/test/interactive-helper/makefile new file mode 100644 index 000000000..b96139fda --- /dev/null +++ b/test/interactive-helper/makefile @@ -0,0 +1,43 @@ +# -*- make -*- +BASE=../.. +SUBDIR=test/interactive-helper + +# Bring in the default rules +include ../../buildlib/defaults.mak + +# Program for testing methods +PROGRAM=mthdcat +SLIBS = +SOURCE = mthdcat.cc +include $(PROGRAM_H) + +# Version compare tester +PROGRAM=testextract +SLIBS = -lapt-pkg -lapt-inst +LIB_MAKES = apt-pkg/makefile apt-inst/makefile +SOURCE = testextract.cc +include $(PROGRAM_H) + +# Program for testing the tar/deb extractor +PROGRAM=testdeb +SLIBS = -lapt-pkg -lapt-inst +SOURCE = testdeb.cc +include $(PROGRAM_H) + +# Program for testing tar extraction +PROGRAM=extract-control +SLIBS = -lapt-pkg -lapt-inst +SOURCE = extract-control.cc +include $(PROGRAM_H) + +# Program for testing udevcdrom +PROGRAM=test_udevcdrom +SLIBS = -lapt-pkg +SOURCE = test_udevcdrom.cc +include $(PROGRAM_H) + +# Program for checking rpm versions +#PROGRAM=rpmver +#SLIBS = -lapt-pkg -lrpm +#SOURCE = rpmver.cc +#include $(PROGRAM_H) diff --git a/test/interactive-helper/mthdcat.cc b/test/interactive-helper/mthdcat.cc new file mode 100644 index 000000000..25d09a3f5 --- /dev/null +++ b/test/interactive-helper/mthdcat.cc @@ -0,0 +1,20 @@ +/* Usage, mthdcat < cmds | methods/mthd + All this does is cat a file into the method without closing the FD when + the file ends */ + +#include + +int main() +{ + char Buffer[4096]; + + while (1) + { + int Res = read(STDIN_FILENO,Buffer,sizeof(Buffer)); + if (Res <= 0) + while (1) sleep(100); + if (write(STDOUT_FILENO,Buffer,Res) != Res) + break; + } + return 0; +} diff --git a/test/interactive-helper/rpmver.cc b/test/interactive-helper/rpmver.cc new file mode 100644 index 000000000..9fc807de8 --- /dev/null +++ b/test/interactive-helper/rpmver.cc @@ -0,0 +1,117 @@ +#include +#include +#include +#include +#include + +#define xisdigit(x) isdigit(x) +#define xisalpha(x) isalpha(x) +#define xisalnum(x) (isdigit(x) || isalpha(x)) + +using namespace std; + +int rpmvercmp(const char * a, const char * b) +{ + char oldch1, oldch2; + char * str1, * str2; + char * one, * two; + int rc; + int isnum; + + /* easy comparison to see if versions are identical */ + if (!strcmp(a, b)) return 0; + + str1 = (char *)alloca(strlen(a) + 1); + str2 = (char *)alloca(strlen(b) + 1); + + strcpy(str1, a); + strcpy(str2, b); + + one = str1; + two = str2; + + /* loop through each version segment of str1 and str2 and compare them */ + while (*one && *two) { + while (*one && !xisalnum(*one)) one++; + while (*two && !xisalnum(*two)) two++; + + str1 = one; + str2 = two; + + /* grab first completely alpha or completely numeric segment */ + /* leave one and two pointing to the start of the alpha or numeric */ + /* segment and walk str1 and str2 to end of segment */ + if (xisdigit(*str1)) { + while (*str1 && xisdigit(*str1)) str1++; + while (*str2 && xisdigit(*str2)) str2++; + isnum = 1; + } else { + while (*str1 && xisalpha(*str1)) str1++; + while (*str2 && xisalpha(*str2)) str2++; + isnum = 0; + } + + /* save character at the end of the alpha or numeric segment */ + /* so that they can be restored after the comparison */ + oldch1 = *str1; + *str1 = '\0'; + oldch2 = *str2; + *str2 = '\0'; + + /* take care of the case where the two version segments are */ + /* different types: one numeric, the other alpha (i.e. empty) */ + if (one == str1) return -1; /* arbitrary */ + if (two == str2) return 1; + + if (isnum) { + /* this used to be done by converting the digit segments */ + /* to ints using atoi() - it's changed because long */ + /* digit segments can overflow an int - this should fix that. */ + + /* throw away any leading zeros - it's a number, right? */ + while (*one == '0') one++; + while (*two == '0') two++; + + /* whichever number has more digits wins */ + if (strlen(one) > strlen(two)) return 1; + if (strlen(two) > strlen(one)) return -1; + } + + /* strcmp will return which one is greater - even if the two */ + /* segments are alpha or if they are numeric. don't return */ + /* if they are equal because there might be more segments to */ + /* compare */ + rc = strcmp(one, two); + if (rc) return rc; + + /* restore character that was replaced by null above */ + *str1 = oldch1; + one = str1; + *str2 = oldch2; + two = str2; + } + + /* this catches the case where all numeric and alpha segments have */ + /* compared identically but the segment sepparating characters were */ + /* different */ + if ((!*one) && (!*two)) return 0; + + /* whichever version still has characters left over wins */ + if (!*one) return -1; else return 1; +} + +int main(int argc,const char *argv[]) +{ + printf("%i\n",strcmp(argv[1],argv[2])); + + printf("'%s' <> '%s': ",argv[1],argv[2]); + printf("rpm: %i deb: %i\n",rpmvercmp(argv[1],argv[2]), + debVS.CmpFragment(argv[1],argv[1]+strlen(argv[1]), + argv[2],argv[2]+strlen(argv[2]))); + + printf("'%s' <> '%s': ",argv[2],argv[1]); + printf("rpm: %i deb: %i\n",rpmvercmp(argv[2],argv[1]), + debVS.CmpFragment(argv[2],argv[2]+strlen(argv[2]), + argv[1],argv[1]+strlen(argv[1]))); + return 0; +} diff --git a/test/interactive-helper/test_udevcdrom.cc b/test/interactive-helper/test_udevcdrom.cc new file mode 100644 index 000000000..577e2d013 --- /dev/null +++ b/test/interactive-helper/test_udevcdrom.cc @@ -0,0 +1,19 @@ +#include +#include +#include + +int main() +{ + int i; + pkgUdevCdromDevices c; + assert(c.Dlopen()); + + vector l; + l = c.Scan(); + assert(l.empty() == false); + for (i=0;i +#include +#include +#include + +class NullStream : public pkgDirStream +{ + public: + virtual bool DoItem(Item &Itm,int &Fd) {return true;}; +}; + +bool Test(const char *File) +{ + FileFd Fd(File,FileFd::ReadOnly); + debDebFile Deb(Fd); + + if (_error->PendingError() == true) + return false; + + // Get the archive member and positition the file + const ARArchive::Member *Member = Deb.GotoMember("data.tar.gz"); + if (Member == 0) + return false; + + // Extract it. + ExtractTar Tar(Deb.GetFile(),Member->Size, "gzip"); + NullStream Dir; + if (Tar.Go(Dir) == false) + return false; + + return true; +} + +int main(int argc, const char *argv[]) +{ + Test(argv[1]); + _error->DumpErrors(); + return 0; +} diff --git a/test/interactive-helper/testextract.cc b/test/interactive-helper/testextract.cc new file mode 100644 index 000000000..b790df618 --- /dev/null +++ b/test/interactive-helper/testextract.cc @@ -0,0 +1,101 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +using namespace std; + +bool Go(int argc,char *argv[]) +{ + // Init the database + debDpkgDB Db; + { + OpTextProgress Prog; + + if (Db.ReadyPkgCache(Prog) == false) + return false; + Prog.Done(); + + if (Db.ReadyFileList(Prog) == false) + return false; + } + + for (int I = 1; I < argc; I++) + { + const char *Fake = 0; + for (unsigned J = 0; argv[I][J] != 0; J++) + { + if (argv[I][J] != ',') + continue; + Fake = argv[I] + J + 1; + argv[I][J] = 0; + } + + FileFd F(argv[I],FileFd::ReadOnly); + debDebFile Deb(F); + + if (_error->PendingError() == true) + return false; + + if (Deb.ExtractControl(Db) == false) + return false; + cout << argv[I] << endl; + + pkgCache::VerIterator Ver = Deb.MergeControl(Db); + if (Ver.end() == true) + return false; + + cout << Ver.ParentPkg().Name() << ' ' << Ver.VerStr() << endl; + + pkgExtract Extract(Db.GetFLCache(),Ver); + + if (Fake != 0) + { + pkgExtract::Item Itm; + memset(&Itm,0,sizeof(Itm)); + FILE *F = fopen(Fake,"r"); + while (feof(F) == 0) + { + char Line[300]; + fgets(Line,sizeof(Line),F); + Itm.Name = _strstrip(Line); + Itm.Type = pkgDirStream::Item::File; + if (Line[strlen(Line)-1] == '/') + Itm.Type = pkgDirStream::Item::Directory; + + int Fd; + if (Extract.DoItem(Itm,Fd) == false) { + fclose(F); + return false; + } + } + fclose(F); + } + else + if (Deb.ExtractArchive(Extract) == false) + return false; + } + return true; +} + +int main(int argc,char *argv[]) +{ + pkgInitConfig(*_config); + pkgInitSystem(*_config,_system); + _config->Set("Dir::State::status","/tmp/testing/status"); + + Go(argc,argv); + + if (_error->PendingError() == true) + { + _error->DumpErrors(); + return 0; + } +} diff --git a/test/makefile b/test/makefile deleted file mode 100644 index 9fcd6a826..000000000 --- a/test/makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -*- make -*- -BASE=.. -SUBDIR=test - -# Bring in the default rules -include ../buildlib/defaults.mak - -# Program for testing methods -PROGRAM=mthdcat -SLIBS = -SOURCE = mthdcat.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 -LIB_MAKES = apt-pkg/makefile apt-inst/makefile -SOURCE = testextract.cc -include $(PROGRAM_H) - -# Program for testing the tar/deb extractor -PROGRAM=testdeb -SLIBS = -lapt-pkg -lapt-inst -SOURCE = testdeb.cc -include $(PROGRAM_H) - -# Program for testing tar extraction -PROGRAM=extract-control -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 -SOURCE = test_udevcdrom.cc -include $(PROGRAM_H) - -# Program for checking rpm versions -#PROGRAM=rpmver -#SLIBS = -lapt-pkg -lrpm -#SOURCE = rpmver.cc -#include $(PROGRAM_H) diff --git a/test/mthdcat.cc b/test/mthdcat.cc deleted file mode 100644 index 25d09a3f5..000000000 --- a/test/mthdcat.cc +++ /dev/null @@ -1,20 +0,0 @@ -/* Usage, mthdcat < cmds | methods/mthd - All this does is cat a file into the method without closing the FD when - the file ends */ - -#include - -int main() -{ - char Buffer[4096]; - - while (1) - { - int Res = read(STDIN_FILENO,Buffer,sizeof(Buffer)); - if (Res <= 0) - while (1) sleep(100); - if (write(STDOUT_FILENO,Buffer,Res) != Res) - break; - } - return 0; -} diff --git a/test/rpmver.cc b/test/rpmver.cc deleted file mode 100644 index 9fc807de8..000000000 --- a/test/rpmver.cc +++ /dev/null @@ -1,117 +0,0 @@ -#include -#include -#include -#include -#include - -#define xisdigit(x) isdigit(x) -#define xisalpha(x) isalpha(x) -#define xisalnum(x) (isdigit(x) || isalpha(x)) - -using namespace std; - -int rpmvercmp(const char * a, const char * b) -{ - char oldch1, oldch2; - char * str1, * str2; - char * one, * two; - int rc; - int isnum; - - /* easy comparison to see if versions are identical */ - if (!strcmp(a, b)) return 0; - - str1 = (char *)alloca(strlen(a) + 1); - str2 = (char *)alloca(strlen(b) + 1); - - strcpy(str1, a); - strcpy(str2, b); - - one = str1; - two = str2; - - /* loop through each version segment of str1 and str2 and compare them */ - while (*one && *two) { - while (*one && !xisalnum(*one)) one++; - while (*two && !xisalnum(*two)) two++; - - str1 = one; - str2 = two; - - /* grab first completely alpha or completely numeric segment */ - /* leave one and two pointing to the start of the alpha or numeric */ - /* segment and walk str1 and str2 to end of segment */ - if (xisdigit(*str1)) { - while (*str1 && xisdigit(*str1)) str1++; - while (*str2 && xisdigit(*str2)) str2++; - isnum = 1; - } else { - while (*str1 && xisalpha(*str1)) str1++; - while (*str2 && xisalpha(*str2)) str2++; - isnum = 0; - } - - /* save character at the end of the alpha or numeric segment */ - /* so that they can be restored after the comparison */ - oldch1 = *str1; - *str1 = '\0'; - oldch2 = *str2; - *str2 = '\0'; - - /* take care of the case where the two version segments are */ - /* different types: one numeric, the other alpha (i.e. empty) */ - if (one == str1) return -1; /* arbitrary */ - if (two == str2) return 1; - - if (isnum) { - /* this used to be done by converting the digit segments */ - /* to ints using atoi() - it's changed because long */ - /* digit segments can overflow an int - this should fix that. */ - - /* throw away any leading zeros - it's a number, right? */ - while (*one == '0') one++; - while (*two == '0') two++; - - /* whichever number has more digits wins */ - if (strlen(one) > strlen(two)) return 1; - if (strlen(two) > strlen(one)) return -1; - } - - /* strcmp will return which one is greater - even if the two */ - /* segments are alpha or if they are numeric. don't return */ - /* if they are equal because there might be more segments to */ - /* compare */ - rc = strcmp(one, two); - if (rc) return rc; - - /* restore character that was replaced by null above */ - *str1 = oldch1; - one = str1; - *str2 = oldch2; - two = str2; - } - - /* this catches the case where all numeric and alpha segments have */ - /* compared identically but the segment sepparating characters were */ - /* different */ - if ((!*one) && (!*two)) return 0; - - /* whichever version still has characters left over wins */ - if (!*one) return -1; else return 1; -} - -int main(int argc,const char *argv[]) -{ - printf("%i\n",strcmp(argv[1],argv[2])); - - printf("'%s' <> '%s': ",argv[1],argv[2]); - printf("rpm: %i deb: %i\n",rpmvercmp(argv[1],argv[2]), - debVS.CmpFragment(argv[1],argv[1]+strlen(argv[1]), - argv[2],argv[2]+strlen(argv[2]))); - - printf("'%s' <> '%s': ",argv[2],argv[1]); - printf("rpm: %i deb: %i\n",rpmvercmp(argv[2],argv[1]), - debVS.CmpFragment(argv[2],argv[2]+strlen(argv[2]), - argv[1],argv[1]+strlen(argv[1]))); - return 0; -} diff --git a/test/test_udevcdrom.cc b/test/test_udevcdrom.cc deleted file mode 100644 index 577e2d013..000000000 --- a/test/test_udevcdrom.cc +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include -#include - -int main() -{ - int i; - pkgUdevCdromDevices c; - assert(c.Dlopen()); - - vector l; - l = c.Scan(); - assert(l.empty() == false); - for (i=0;i -#include -#include -#include - -class NullStream : public pkgDirStream -{ - public: - virtual bool DoItem(Item &Itm,int &Fd) {return true;}; -}; - -bool Test(const char *File) -{ - FileFd Fd(File,FileFd::ReadOnly); - debDebFile Deb(Fd); - - if (_error->PendingError() == true) - return false; - - // Get the archive member and positition the file - const ARArchive::Member *Member = Deb.GotoMember("data.tar.gz"); - if (Member == 0) - return false; - - // Extract it. - ExtractTar Tar(Deb.GetFile(),Member->Size, "gzip"); - NullStream Dir; - if (Tar.Go(Dir) == false) - return false; - - return true; -} - -int main(int argc, const char *argv[]) -{ - Test(argv[1]); - _error->DumpErrors(); - return 0; -} diff --git a/test/testextract.cc b/test/testextract.cc deleted file mode 100644 index b790df618..000000000 --- a/test/testextract.cc +++ /dev/null @@ -1,101 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace std; - -bool Go(int argc,char *argv[]) -{ - // Init the database - debDpkgDB Db; - { - OpTextProgress Prog; - - if (Db.ReadyPkgCache(Prog) == false) - return false; - Prog.Done(); - - if (Db.ReadyFileList(Prog) == false) - return false; - } - - for (int I = 1; I < argc; I++) - { - const char *Fake = 0; - for (unsigned J = 0; argv[I][J] != 0; J++) - { - if (argv[I][J] != ',') - continue; - Fake = argv[I] + J + 1; - argv[I][J] = 0; - } - - FileFd F(argv[I],FileFd::ReadOnly); - debDebFile Deb(F); - - if (_error->PendingError() == true) - return false; - - if (Deb.ExtractControl(Db) == false) - return false; - cout << argv[I] << endl; - - pkgCache::VerIterator Ver = Deb.MergeControl(Db); - if (Ver.end() == true) - return false; - - cout << Ver.ParentPkg().Name() << ' ' << Ver.VerStr() << endl; - - pkgExtract Extract(Db.GetFLCache(),Ver); - - if (Fake != 0) - { - pkgExtract::Item Itm; - memset(&Itm,0,sizeof(Itm)); - FILE *F = fopen(Fake,"r"); - while (feof(F) == 0) - { - char Line[300]; - fgets(Line,sizeof(Line),F); - Itm.Name = _strstrip(Line); - Itm.Type = pkgDirStream::Item::File; - if (Line[strlen(Line)-1] == '/') - Itm.Type = pkgDirStream::Item::Directory; - - int Fd; - if (Extract.DoItem(Itm,Fd) == false) { - fclose(F); - return false; - } - } - fclose(F); - } - else - if (Deb.ExtractArchive(Extract) == false) - return false; - } - return true; -} - -int main(int argc,char *argv[]) -{ - pkgInitConfig(*_config); - pkgInitSystem(*_config,_system); - _config->Set("Dir::State::status","/tmp/testing/status"); - - Go(argc,argv); - - if (_error->PendingError() == true) - { - _error->DumpErrors(); - return 0; - } -} -- cgit v1.2.3-70-g09d2 From 15f4ffc0e423f8cf1f3c7ffb46f59dbbc5e92518 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 12:09:12 +0200 Subject: remove the python testcases as this is covered by integration/ --- ..._apt_auth-test-suit_gpg-package-broken_Packages | 25 - ...o_apt_auth-test-suit_gpg-package-broken_Release | 13 - ...t_auth-test-suit_gpg-package-broken_Release.gpg | 7 - ...emvo_apt_auth-test-suit_gpg-package-ok_Packages | 25 - ...7emvo_apt_auth-test-suit_gpg-package-ok_Release | 13 - ...o_apt_auth-test-suit_gpg-package-ok_Release.gpg | 7 - test/authReliability/sources.list.failure | 2 - test/authReliability/sources.list.good | 2 - test/local-repo/Packages | 11 - test/local-repo/Packages.gz | Bin 269 -> 0 bytes test/local-repo/Packages.gz.save | Bin 603 -> 0 bytes test/local-repo/Release | 13 - test/local-repo/Release.gpg | 7 - test/local-repo/gdebi-test4.deb | Bin 2306 -> 0 bytes test/pre-upload-check.py | 266 ----- test/testkeys/mvo.key | 1182 -------------------- test/testsources.list/sources.list.all-gpg-broken | 2 - test/testsources.list/sources.list.all-gpg-ok | 2 - .../sources.list.all-release-broken | 1 - test/testsources.list/sources.list.all-release-ok | 1 - .../sources.list.all-validuntil-broken | 1 - .../sources.list.md5-package-broken | 2 - test/testsources.list/sources.list.md5-package-ok | 2 - .../sources.list.md5-release-broken | 1 - test/testsources.list/sources.list.md5-release-ok | 1 - .../sources.list.sha1-release-broken | 1 - test/testsources.list/sources.list.sha1-release-ok | 1 - .../sources.list.sha256-package-broken | 2 - .../sources.list.sha256-package-ok | 2 - .../sources.list.sha256-release-broken | 1 - .../sources.list.sha256-release-ok | 1 - 31 files changed, 1594 deletions(-) delete mode 100644 test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Packages delete mode 100644 test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release delete mode 100644 test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release.gpg delete mode 100644 test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages delete mode 100644 test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release delete mode 100644 test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg delete mode 100644 test/authReliability/sources.list.failure delete mode 100644 test/authReliability/sources.list.good delete mode 100644 test/local-repo/Packages delete mode 100644 test/local-repo/Packages.gz delete mode 100644 test/local-repo/Packages.gz.save delete mode 100644 test/local-repo/Release delete mode 100644 test/local-repo/Release.gpg delete mode 100644 test/local-repo/gdebi-test4.deb delete mode 100755 test/pre-upload-check.py delete mode 100644 test/testkeys/mvo.key delete mode 100644 test/testsources.list/sources.list.all-gpg-broken delete mode 100644 test/testsources.list/sources.list.all-gpg-ok delete mode 100644 test/testsources.list/sources.list.all-release-broken delete mode 100644 test/testsources.list/sources.list.all-release-ok delete mode 100644 test/testsources.list/sources.list.all-validuntil-broken delete mode 100644 test/testsources.list/sources.list.md5-package-broken delete mode 100644 test/testsources.list/sources.list.md5-package-ok delete mode 100644 test/testsources.list/sources.list.md5-release-broken delete mode 100644 test/testsources.list/sources.list.md5-release-ok delete mode 100644 test/testsources.list/sources.list.sha1-release-broken delete mode 100644 test/testsources.list/sources.list.sha1-release-ok delete mode 100644 test/testsources.list/sources.list.sha256-package-broken delete mode 100644 test/testsources.list/sources.list.sha256-package-ok delete mode 100644 test/testsources.list/sources.list.sha256-release-broken delete mode 100644 test/testsources.list/sources.list.sha256-release-ok (limited to 'test') 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 -Original-Maintainer: Loic Minier -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 -Original-Maintainer: Loic Minier -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/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 deleted file mode 100644 index b5d528435..000000000 Binary files a/test/local-repo/Packages.gz and /dev/null differ diff --git a/test/local-repo/Packages.gz.save b/test/local-repo/Packages.gz.save deleted file mode 100644 index c73f56395..000000000 Binary files a/test/local-repo/Packages.gz.save and /dev/null differ 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 deleted file mode 100644 index 9eb92d1b4..000000000 Binary files a/test/local-repo/gdebi-test4.deb and /dev/null differ 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/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/ehIYc9gvbdMOnoGDrw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D715uRFqDWOH/vQCfa7q9DAG/s0zdXQ+rPNQE63pqmb+I -RgQQEQIABgUCQU1UxwAKCRBLIOcA56zBhyyCAKDEcrORvNKFS6a8+jDCGXbWmd8m -VgCdF6IW+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+M7rLOidrXahHwMP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I5o= -=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/ / -- cgit v1.2.3-70-g09d2 From 92aacd885093389b5e9f7685ffe08219674ed6ff Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 12:13:38 +0200 Subject: move the networkless test to the interactive helpers as it needs root rights for operation (ifup/down, iptables) so it is better run under supervision --- .../networkless-install-fixes/README | 5 +++++ .../networkless-install-fixes/sources.test.list | 25 ++++++++++++++++++++++ .../networkless-install-fixes/test.sh | 25 ++++++++++++++++++++++ test/networkless-install-fixes/README | 5 ----- test/networkless-install-fixes/sources.test.list | 25 ---------------------- test/networkless-install-fixes/test.sh | 25 ---------------------- 6 files changed, 55 insertions(+), 55 deletions(-) create mode 100644 test/interactive-helper/networkless-install-fixes/README create mode 100644 test/interactive-helper/networkless-install-fixes/sources.test.list create mode 100755 test/interactive-helper/networkless-install-fixes/test.sh delete mode 100644 test/networkless-install-fixes/README delete mode 100644 test/networkless-install-fixes/sources.test.list delete mode 100755 test/networkless-install-fixes/test.sh (limited to 'test') diff --git a/test/interactive-helper/networkless-install-fixes/README b/test/interactive-helper/networkless-install-fixes/README new file mode 100644 index 000000000..e7ee2b03d --- /dev/null +++ b/test/interactive-helper/networkless-install-fixes/README @@ -0,0 +1,5 @@ + +Those tests aim at making the networkless install timeout +quicker, see +https://wiki.ubuntu.com/NetworklessInstallationFixes +for details diff --git a/test/interactive-helper/networkless-install-fixes/sources.test.list b/test/interactive-helper/networkless-install-fixes/sources.test.list new file mode 100644 index 000000000..380e1804d --- /dev/null +++ b/test/interactive-helper/networkless-install-fixes/sources.test.list @@ -0,0 +1,25 @@ + +# archive.ubuntu.com +deb http://archive.ubuntu.com/ubuntu/ hardy main restricted +deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted + +deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted +deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted + +deb http://archive.ubuntu.com/ubuntu/ hardy universe +deb-src http://archive.ubuntu.com/ubuntu/ hardy universe + +deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe +deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates universe + +# security.ubuntu.com +deb http://security.ubuntu.com/ubuntu/ hardy-security main restricted +deb-src http://security.ubuntu.com/ubuntu/ hardy-security main restricted + +deb http://security.ubuntu.com/ubuntu/ hardy-security universe +deb-src http://security.ubuntu.com/ubuntu/ hardy-security universe + + +# archive.canonical.com +deb http://archive.canonical.com/ubuntu/ hardy-partner universe +deb-src http://archive.canonical.com/ubuntu/ hardy-partner universe diff --git a/test/interactive-helper/networkless-install-fixes/test.sh b/test/interactive-helper/networkless-install-fixes/test.sh new file mode 100755 index 000000000..809d467ba --- /dev/null +++ b/test/interactive-helper/networkless-install-fixes/test.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +OPTS="-o Dir::Etc::sourcelist=./sources.test.list -o Acquire::http::timeout=20" + +# setup +unset http_proxy +iptables --flush + +echo "No network at all" +ifdown eth0 +time apt-get update $OPTS 2>&1 |grep system +ifup eth0 +echo "" + +echo "no working DNS (port 53 DROP)" +iptables -A OUTPUT -p udp --dport 53 -j DROP +time apt-get update $OPTS 2>&1 |grep system +iptables --flush +echo "" + +echo "DNS but no access to archive.ubuntu.com (port 80 DROP)" +iptables -A OUTPUT -p tcp --dport 80 -j DROP +time apt-get update $OPTS 2>&1 |grep system +iptables --flush +echo "" diff --git a/test/networkless-install-fixes/README b/test/networkless-install-fixes/README deleted file mode 100644 index e7ee2b03d..000000000 --- a/test/networkless-install-fixes/README +++ /dev/null @@ -1,5 +0,0 @@ - -Those tests aim at making the networkless install timeout -quicker, see -https://wiki.ubuntu.com/NetworklessInstallationFixes -for details diff --git a/test/networkless-install-fixes/sources.test.list b/test/networkless-install-fixes/sources.test.list deleted file mode 100644 index 380e1804d..000000000 --- a/test/networkless-install-fixes/sources.test.list +++ /dev/null @@ -1,25 +0,0 @@ - -# archive.ubuntu.com -deb http://archive.ubuntu.com/ubuntu/ hardy main restricted -deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted - -deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted -deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted - -deb http://archive.ubuntu.com/ubuntu/ hardy universe -deb-src http://archive.ubuntu.com/ubuntu/ hardy universe - -deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe -deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates universe - -# security.ubuntu.com -deb http://security.ubuntu.com/ubuntu/ hardy-security main restricted -deb-src http://security.ubuntu.com/ubuntu/ hardy-security main restricted - -deb http://security.ubuntu.com/ubuntu/ hardy-security universe -deb-src http://security.ubuntu.com/ubuntu/ hardy-security universe - - -# archive.canonical.com -deb http://archive.canonical.com/ubuntu/ hardy-partner universe -deb-src http://archive.canonical.com/ubuntu/ hardy-partner universe diff --git a/test/networkless-install-fixes/test.sh b/test/networkless-install-fixes/test.sh deleted file mode 100755 index 809d467ba..000000000 --- a/test/networkless-install-fixes/test.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -OPTS="-o Dir::Etc::sourcelist=./sources.test.list -o Acquire::http::timeout=20" - -# setup -unset http_proxy -iptables --flush - -echo "No network at all" -ifdown eth0 -time apt-get update $OPTS 2>&1 |grep system -ifup eth0 -echo "" - -echo "no working DNS (port 53 DROP)" -iptables -A OUTPUT -p udp --dport 53 -j DROP -time apt-get update $OPTS 2>&1 |grep system -iptables --flush -echo "" - -echo "DNS but no access to archive.ubuntu.com (port 80 DROP)" -iptables -A OUTPUT -p tcp --dport 80 -j DROP -time apt-get update $OPTS 2>&1 |grep system -iptables --flush -echo "" -- cgit v1.2.3-70-g09d2 From 7d996eb001072ccdeae9ec37e37313a37946c5c1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 12:15:21 +0200 Subject: remove fake-status leftover from the python-test --- test/fake-status | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 test/fake-status (limited to 'test') 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 -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 -- cgit v1.2.3-70-g09d2 From cd118006d2d1feebd92287f6379fc7f13a4d5962 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 12:15:39 +0200 Subject: the experimental branch has a better version of this test in libapt, so remove it now - we will get it back at merge-time with experimental --- test/hash.cc | 70 ------------------------------------------------------------ 1 file changed, 70 deletions(-) delete mode 100644 test/hash.cc (limited to 'test') diff --git a/test/hash.cc b/test/hash.cc deleted file mode 100644 index cfdb4ea9d..000000000 --- a/test/hash.cc +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include - -using namespace std; - -template void Test(const char *In,const char *Out) -{ - T Sum; - Sum.Add(In); - cout << Sum.Result().Value() << endl; - if (stringcasecmp(Sum.Result().Value(),Out) != 0) - abort(); -} - -template void TestMill(const char *Out) -{ - T Sum; - - const unsigned char As[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; - unsigned Count = 1000000; - for (; Count != 0;) - { - if (Count >= 64) - { - Sum.Add(As,64); - Count -= 64; - } - else - { - Sum.Add(As,Count); - Count = 0; - } - } - - cout << Sum.Result().Value() << endl; - if (stringcasecmp(Sum.Result().Value(),Out) != 0) - abort(); -} - -int main() -{ - // From FIPS PUB 180-1 - Test("abc","A9993E364706816ABA3E25717850C26C9CD0D89D"); - Test("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "84983E441C3BD26EBAAE4AA1F95129E5E54670F1"); - TestMill("34AA973CD4C4DAA4F61EEB2BDBAD27316534016F"); - - // MD5 tests from RFC 1321 - Test("","d41d8cd98f00b204e9800998ecf8427e"); - Test("a","0cc175b9c0f1b6a831c399e269772661"); - Test("abc","900150983cd24fb0d6963f7d28e17f72"); - Test("message digest","f96b697d7cb7938d525a2f31aaf161d0"); - Test("abcdefghijklmnopqrstuvwxyz","c3fcd3d76192e4007dfb496cca67e13b"); - Test("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", - "d174ab98d277d9f5a5611c2c9f419d9f"); - Test("12345678901234567890123456789012345678901234567890123456789012345678901234567890", - "57edf4a22be3c955ac49da2e2107b67a"); - - // SHA-256, From FIPS 180-2 - Test("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1"); - - - return 0; -} - - -- cgit v1.2.3-70-g09d2 From 1e08114a73d9b79904eff1f286c765f7065bcdc0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 12:39:59 +0200 Subject: fix the compareversion test to work then called from outside of libapt --- test/libapt/compareversion_test.cc | 7 +++++-- test/libapt/run-tests | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/libapt/compareversion_test.cc b/test/libapt/compareversion_test.cc index 7f192b19b..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/run-tests b/test/libapt/run-tests index c81520bef..c2aeccca7 100755 --- a/test/libapt/run-tests +++ b/test/libapt/run-tests @@ -52,6 +52,8 @@ do "${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" + elif [ $name = "CompareVersion${EXT}" ]; then + tmppath="${DIR}/versions.lst" fi echo -n "Testing with \033[1;35m${name}\033[0m ... " -- cgit v1.2.3-70-g09d2 From 9edcd9adcecc4f0c2a8e1744c2fbc7c38e3397e6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 14:35:58 +0200 Subject: build test-binaries by default and add a test target to toplevel --- Makefile | 5 +++-- buildlib/defaults.mak | 2 +- test/Makefile | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 test/Makefile (limited to 'test') diff --git a/Makefile b/Makefile index 664caca41..9a47014c3 100644 --- a/Makefile +++ b/Makefile @@ -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/buildlib/defaults.mak b/buildlib/defaults.mak index d4269e05f..edb089160 100644 --- a/buildlib/defaults.mak +++ b/buildlib/defaults.mak @@ -121,7 +121,7 @@ MKDIRS := $(BIN) 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/test/Makefile b/test/Makefile new file mode 100644 index 000000000..f918f7d2e --- /dev/null +++ b/test/Makefile @@ -0,0 +1,21 @@ +# -*- 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 +all clean veryclean binary program dirs: + $(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 + + +.PHONY: test +test: + ./libapt/run-tests -- cgit v1.2.3-70-g09d2 From 682a3bf727cd79a66eeb335c4c6593472ce11907 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 14:37:25 +0200 Subject: do not output color in the testcases if stdout/stderr are not a /dev/pts --- test/integration/framework | 29 ++++++++++++++++++----------- test/integration/run-tests | 17 +++++++++++++---- test/libapt/run-tests | 22 +++++++++++++++++----- 3 files changed, 48 insertions(+), 20 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index ccab010e6..45c1f156a 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="" # red -CWARNING="" # yellow -CMSG="" # green -CINFO="" # light blue -CDEBUG="" # blue -CNORMAL="" # default system console color -CDONE="" # green -CPASS="" # green -CFAIL="" # red -CCMD="" # 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="" # red + CWARNING="" # yellow + CMSG="" # green + CINFO="" # light blue + CDEBUG="" # blue + CNORMAL="" # default system console color + CDONE="" # green + CPASS="" # green + CFAIL="" # red + CCMD="" # 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; } diff --git a/test/integration/run-tests b/test/integration/run-tests index edac07dbf..292986822 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -8,17 +8,26 @@ 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 + 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/libapt/run-tests b/test/libapt/run-tests index c2aeccca7..275a789b2 100755 --- a/test/libapt/run-tests +++ b/test/libapt/run-tests @@ -7,14 +7,28 @@ echo "Compiling the tests …" 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" \ @@ -46,7 +60,6 @@ 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" \ @@ -56,11 +69,10 @@ do 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 -- cgit v1.2.3-70-g09d2 From 59f9dcbdf23ae430c2f5fa4bc85596347e73526f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 14:41:02 +0200 Subject: fix 'comparison between signed and unsigned integer expressions' warning in the udevcdrom testcase --- test/interactive-helper/test_udevcdrom.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test') diff --git a/test/interactive-helper/test_udevcdrom.cc b/test/interactive-helper/test_udevcdrom.cc index 577e2d013..dc25ab357 100644 --- a/test/interactive-helper/test_udevcdrom.cc +++ b/test/interactive-helper/test_udevcdrom.cc @@ -4,14 +4,13 @@ int main() { - int i; pkgUdevCdromDevices c; assert(c.Dlopen()); vector l; l = c.Scan(); assert(l.empty() == false); - for (i=0;i Date: Wed, 17 Aug 2011 15:47:08 +0200 Subject: for consistency allow the usage of 'make test' instead of './run-tests' --- test/Makefile | 9 ++------- test/integration/makefile | 10 ++++++++++ test/libapt/makefile | 4 ++++ 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 test/integration/makefile (limited to 'test') diff --git a/test/Makefile b/test/Makefile index f918f7d2e..da0a49b0c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -6,16 +6,11 @@ ifndef NOISY .SILENT: endif -.PHONY: headers library clean veryclean all binary program doc -all clean veryclean binary program dirs: +.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 - - -.PHONY: test -test: - ./libapt/run-tests 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/libapt/makefile b/test/libapt/makefile index 366907d89..b3f2f4274 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 -- cgit v1.2.3-70-g09d2 From fe268128119bc73403003a29b66c927b9c36690d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Aug 2011 15:49:59 +0200 Subject: set the msglevel to a high dummy value if none is specified --- test/integration/run-tests | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/integration/run-tests b/test/integration/run-tests index 292986822..75f2ad662 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -17,6 +17,10 @@ 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 [ "$MSGLEVEL" -le 2 ]; then echo -n "${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: " -- cgit v1.2.3-70-g09d2 From 8de79b68a834a6cc7abb8976e96ed19374fc02a2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 22 Aug 2011 23:10:15 +0200 Subject: remove the caches in 'apt-get update', too, as they will be invalid in most cases anyway --- apt-pkg/cachefile.cc | 14 ++++++++++++++ apt-pkg/cachefile.h | 1 + cmdline/apt-get.cc | 8 +++----- debian/changelog | 4 +++- .../test-bug-254770-segfault-if-cache-not-buildable | 1 - .../test-bug-590438-broken-provides-thanks-to-remove-order | 2 -- .../test-bug-595691-empty-and-broken-archive-files | 2 +- test/integration/test-bug-601016-description-translation | 2 +- .../test-bug-633350-do-not-kill-last-char-in-Release | 2 +- test/integration/test-compressed-indexes | 9 ++++----- test/integration/test-hashsum-verification | 2 -- test/integration/test-policy-pinning | 7 ------- test/integration/test-releasefile-verification | 3 +-- 13 files changed, 29 insertions(+), 28 deletions(-) (limited to 'test') diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 964c5bd8b..a76cfc08e 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -163,6 +163,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 09d3ec267..b4f41c6f4 100644 --- a/apt-pkg/cachefile.h +++ b/apt-pkg/cachefile.h @@ -57,6 +57,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/cmdline/apt-get.cc b/cmdline/apt-get.cc index 2dd1c2bce..69b9dcda9 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1625,7 +1625,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; @@ -2227,10 +2228,7 @@ bool DoClean(CommandLine &CmdL) Fetcher.Clean(archivedir); Fetcher.Clean(archivedir + "partial/"); - if (pkgcache.empty() == false && RealFileExists(pkgcache) == true) - unlink(pkgcache.c_str()); - if (srcpkgcache.empty() == false && RealFileExists(srcpkgcache) == true) - unlink(srcpkgcache.c_str()); + pkgCacheFile::RemoveCaches(); return true; } diff --git a/debian/changelog b/debian/changelog index 495249855..e1c9ac350 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,13 +14,15 @@ apt (0.8.15.7) UNRELEASED; urgency=low * 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 - -- David Kalnischkies Mon, 22 Aug 2011 23:07:29 +0200 + -- David Kalnischkies Mon, 22 Aug 2011 23:08:47 +0200 apt (0.8.15.6) unstable; urgency=low 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-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..5c103da6f 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -11,7 +11,7 @@ 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 GIVEN="$1" diff --git a/test/integration/test-bug-601016-description-translation b/test/integration/test-bug-601016-description-translation index 2a323a201..44ab91900 100755 --- a/test/integration/test-bug-601016-description-translation +++ b/test/integration/test-bug-601016-description-translation @@ -57,7 +57,7 @@ Description-${LOCALE}: Mächtige Oberfläche für dpkg 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 "$NOLONGSTANZA" aptcache show apt -o Acquire::Languages="ww" -o Test=File-${LOCALE} 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..26a45812e 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -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 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-policy-pinning b/test/integration/test-policy-pinning index fa356ed54..6b1473564 100755 --- a/test/integration/test-policy-pinning +++ b/test/integration/test-policy-pinning @@ -30,21 +30,18 @@ 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 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 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 testequalpolicy 100 500 -o Test=Automatic @@ -135,7 +132,6 @@ 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 testequalpolicycoolstuff "" "1.0" 1 500 0 "" -o Test=NotAutomatic @@ -164,7 +160,6 @@ 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 testequalpolicycoolstuff "" "1.0" 100 500 0 "" -o Test=ButAutomaticUpgrades @@ -211,7 +206,6 @@ 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 testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo1" 1 500 0 "" "2.0~bpo2" -o Test=NotAutomatic @@ -220,7 +214,6 @@ 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 testequalpolicycoolstuff "2.0~bpo1" "2.0~bpo2" 100 500 0 "" "2.0~bpo2" -o Test=ButAutomaticUpgrades 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 -- cgit v1.2.3-70-g09d2 From 884a4c0a3a6cba654e77478a086f26539bc5bd32 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 5 Sep 2011 14:50:30 +0200 Subject: * apt-pkg/indexrecords.cc: - fix Acquire::Max-ValidTime option by interpreting it really as seconds as specified in the manpage and not as days --- apt-pkg/indexrecords.cc | 4 +- debian/changelog | 5 +- test/integration/framework | 31 +++++++------ test/integration/test-releasefile-valid-until | 66 +++++++++++++++++++++++++++ 4 files changed, 90 insertions(+), 16 deletions(-) create mode 100755 test/integration/test-releasefile-valid-until (limited to 'test') diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index 10e154ad2..7852b99f0 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -113,7 +113,7 @@ 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); if(MaxAge == 0) // No user settings, use the one from the Release file @@ -125,7 +125,7 @@ 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; + date += MaxAge; if (ValidUntil == 0 || ValidUntil > date) ValidUntil = date; diff --git a/debian/changelog b/debian/changelog index 44ad1dfcf..de4a9ef0a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,8 +28,11 @@ apt (0.8.15.7) UNRELEASED; urgency=low - 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 - -- David Kalnischkies Wed, 24 Aug 2011 00:41:18 +0200 + -- David Kalnischkies Mon, 05 Sep 2011 13:24:37 +0200 apt (0.8.15.6) unstable; urgency=low diff --git a/test/integration/framework b/test/integration/framework index 45c1f156a..322cf2875 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -515,8 +515,9 @@ getcodenamefromsuite() { echo -n "$1"; } getreleaseversionfromsuite() { 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 @@ -525,27 +526,31 @@ 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 + if [ -n "$VERSION" ]; then + VERSION="-o APT::FTPArchive::Release::Version='${VERSION}'" fi + aptftparchive -qq release $dir \ + -o APT::FTPArchive::Release::Suite="${SUITE}" \ + -o APT::FTPArchive::Release::Codename="${CODENAME}" \ + -o APT::FTPArchive::Release::Label="Testcases" \ + ${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 diff --git a/test/integration/test-releasefile-valid-until b/test/integration/test-releasefile-valid-until new file mode 100755 index 000000000..35498f6d1 --- /dev/null +++ b/test/integration/test-releasefile-valid-until @@ -0,0 +1,66 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +insertpackage 'wheezy' 'apt' 'all' '0.8.15' + +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 -- cgit v1.2.3-70-g09d2 From 89500a25b30d53ea0f5ae213c4207e13f35d1d61 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 5 Sep 2011 15:58:19 +0200 Subject: - 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 --- apt-pkg/indexrecords.cc | 19 +++++++++++++++---- debian/changelog | 6 +++++- doc/apt.conf.5.xml | 25 +++++++++++++++++-------- test/integration/test-releasefile-valid-until | 24 ++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 13 deletions(-) (limited to 'test') diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index 7852b99f0..ba5b7c846 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -115,8 +115,12 @@ bool indexRecords::Load(const string Filename) /*{{{*/ int MaxAge = _config->FindI("Acquire::Max-ValidTime", 0); 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,10 +129,17 @@ bool indexRecords::Load(const string Filename) /*{{{*/ strprintf(ErrorText, _("Invalid 'Date' entry in Release file %s"), Filename.c_str()); return false; } - date += 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; } diff --git a/debian/changelog b/debian/changelog index de4a9ef0a..39445f443 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,8 +31,12 @@ apt (0.8.15.7) UNRELEASED; urgency=low * 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 - -- David Kalnischkies Mon, 05 Sep 2011 13:24:37 +0200 + -- David Kalnischkies Mon, 05 Sep 2011 15:53:12 +0200 apt (0.8.15.6) unstable; urgency=low diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 2634c47a9..1adc868e0 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";}; Max-ValidTime 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 Valid-Until 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 - (Date 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 Date header). + If the Release file itself includes a Valid-Until header + the earlier date of the two is used as the expiration date. + The default value is 0 which stands for "for ever". + Archive specific settings can be made by appending the label of the archive + to the option name. + + + + Min-ValidTime + Minimum of seconds the Release file should be considered + valid after it was created (indicated by the Date header). + Use this if you need to use a seldomly updated (local) mirror of a more + regular updated archive with a Valid-Until 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. diff --git a/test/integration/test-releasefile-valid-until b/test/integration/test-releasefile-valid-until index 35498f6d1..c35fe97ff 100755 --- a/test/integration/test-releasefile-valid-until +++ b/test/integration/test-releasefile-valid-until @@ -64,3 +64,27 @@ aptgetupdate -o Acquire::Max-ValidTime=86400 -o Acquire::Max-ValidTime::Testcase 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 -- cgit v1.2.3-70-g09d2 From 718f797cef0fb766b6f7cfa1d34b617ad047dbc5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 9 Sep 2011 10:56:42 +0200 Subject: fix bashism (local outside function) and releasefile creation in testcases --- test/integration/framework | 9 +++++++-- test/integration/test-compressed-indexes | 8 ++++---- test/integration/test-disappearing-packages | 8 ++++---- test/integration/test-releasefile-valid-until | 5 +++++ 4 files changed, 20 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 322cf2875..a2e71760e 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -513,6 +513,7 @@ 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 @@ -526,13 +527,17 @@ generatereleasefiles() { local SUITE="$(echo "$dir" | cut -d'/' -f 4)" local CODENAME="$(getcodenamefromsuite $SUITE)" local VERSION="$(getreleaseversionfromsuite $SUITE)" + local LABEL="$(getlabelfromsuite $SUITE)" if [ -n "$VERSION" ]; then - VERSION="-o APT::FTPArchive::Release::Version='${VERSION}'" + 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}" \ - -o APT::FTPArchive::Release::Label="Testcases" \ + ${LABEL} \ ${VERSION} \ | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference if [ "$SUITE" = "experimental" -o "$SUITE" = "experimental2" ]; then diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index 26a45812e..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' @@ -99,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-disappearing-packages b/test/integration/test-disappearing-packages index b5d565c2f..82ba9e592 100755 --- a/test/integration/test-disappearing-packages +++ b/test/integration/test-disappearing-packages @@ -12,13 +12,13 @@ buildsimplenativepackage "unrelated" "all" "0.5" "unstable" setupsimplenativepackage "new-pkg" "i386" "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 diff --git a/test/integration/test-releasefile-valid-until b/test/integration/test-releasefile-valid-until index c35fe97ff..680a370cb 100755 --- a/test/integration/test-releasefile-valid-until +++ b/test/integration/test-releasefile-valid-until @@ -8,6 +8,11 @@ configarchitecture 'i386' insertpackage 'wheezy' 'apt' 'all' '0.8.15' +getlabelfromsuite() { + echo -n 'Testcases' +} + + setupaptarchive setupreleasefile() { -- cgit v1.2.3-70-g09d2 From 30426f4822516bdd26528aa2e6d8d69c1291c8d3 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 9 Sep 2011 12:35:22 +0200 Subject: M-A:same lockstep unpack should operate on installed packages first (LP: #835625) --- apt-pkg/packagemanager.cc | 31 ++++++++++++++++++---- debian/changelog | 4 ++- .../test-bug-618288-multiarch-same-lockstep | 4 +-- .../test-bug-632221-cross-dependency-satisfaction | 16 +++++------ ...u-bug-835625-multiarch-lockstep-installed-first | 31 ++++++++++++++++++++++ 5 files changed, 70 insertions(+), 16 deletions(-) create mode 100755 test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first (limited to 'test') diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 6601d9f6b..8b73b9980 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -603,18 +603,39 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate) List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); - if (instVer->MultiArch == 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) == 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) == false) + return false; + } + } + else if (Install(Pkg,FileNames[Pkg->ID]) == false) return false; // Perform immedate configuration of the package. diff --git a/debian/changelog b/debian/changelog index 39445f443..4c677784f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ apt (0.8.15.7) UNRELEASED; urgency=low - ignore "self"-conflicts for all architectures of a package instead of just for the architecture of the package locked at in the ordering of installations too (Closes: #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 @@ -36,7 +38,7 @@ apt (0.8.15.7) UNRELEASED; urgency=low - reword Acquire::Max-ValidTime documentation to make clear that it doesn't provide the new Min-ValidTime functionality - -- David Kalnischkies Mon, 05 Sep 2011 15:53:12 +0200 + -- David Kalnischkies Fri, 09 Sep 2011 12:34:04 +0200 apt (0.8.15.6) unstable; urgency=low diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep index 7e384e428..a05f03df4 100755 --- a/test/integration/test-bug-618288-multiarch-same-lockstep +++ b/test/integration/test-bug-618288-multiarch-same-lockstep @@ -22,8 +22,8 @@ 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 [1] (2 unstable [amd64]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:i386 apt2:amd64 ] -Inst libsame:i386 [1] (2 unstable [i386]) [apt2:amd64 apt:i386 ] +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 ] 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-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 -- cgit v1.2.3-70-g09d2 From 451ea3d4046d95a82856b78087449519ec7e8487 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 15 Sep 2011 11:02:43 +0200 Subject: update the test to ensure that NotAutomatic and co is used also if the archive is signed, but the signature can't be checked as the key is missing (debbugs #597301 - fix in r2105) --- test/integration/test-policy-pinning | 58 +++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning index 6b1473564..9e1ea4ac5 100755 --- a/test/integration/test-policy-pinning +++ b/test/integration/test-policy-pinning @@ -25,28 +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" -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" -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' -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" @@ -132,7 +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 -aptget update -qq +aptgetupdate testequalpolicycoolstuff "" "1.0" 1 500 0 "" -o Test=NotAutomatic testequalpolicycoolstuff "" "1.0" 1 990 0 "" -o Test=NotAutomatic -t stable @@ -160,7 +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 -aptget update -qq +aptgetupdate testequalpolicycoolstuff "" "1.0" 100 500 0 "" -o Test=ButAutomaticUpgrades testequalpolicycoolstuff "" "1.0" 100 990 0 "" -o Test=ButAutomaticUpgrades -t stable @@ -206,7 +248,7 @@ setupaptarchive sed -i aptarchive/dists/backports/Release -e 1i"NotAutomatic: yes" signreleasefiles -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 @@ -214,7 +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 -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 -- cgit v1.2.3-70-g09d2 From 8f3ba4e8708cb72be19dacc2af4f601ee5fea292 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 13:31:29 +0200 Subject: do not pollute namespace in the headers with using (Closes: #500198) --- apt-inst/contrib/arfile.cc | 2 +- apt-inst/contrib/arfile.h | 2 +- apt-inst/contrib/extracttar.h | 6 +- apt-inst/database.cc | 2 +- apt-inst/database.h | 6 +- apt-inst/deb/debfile.cc | 6 +- apt-inst/deb/debfile.h | 4 +- apt-inst/deb/dpkgdb.h | 8 +-- apt-inst/extract.h | 2 +- apt-inst/filelist.h | 2 +- apt-pkg/acquire-method.h | 38 +++++------ apt-pkg/acquire-worker.h | 12 ++-- apt-pkg/acquire.h | 36 +++++----- apt-pkg/algorithms.h | 6 +- apt-pkg/aptconfiguration.cc | 10 +-- apt-pkg/cacheiterators.h | 6 +- apt-pkg/cdrom.h | 38 +++++------ apt-pkg/clean.cc | 10 +-- apt-pkg/clean.h | 4 +- apt-pkg/contrib/cdromutl.cc | 2 + apt-pkg/contrib/cdromutl.h | 12 ++-- apt-pkg/contrib/configuration.h | 46 ++++++------- apt-pkg/contrib/fileutl.h | 42 ++++++------ apt-pkg/contrib/hashes.cc | 26 +++---- apt-pkg/contrib/hashes.h | 17 ++--- apt-pkg/contrib/hashsum.cc | 2 +- apt-pkg/contrib/hashsum_template.h | 13 ++-- apt-pkg/contrib/md5.h | 3 - apt-pkg/contrib/mmap.h | 4 +- apt-pkg/contrib/netrc.cc | 1 + apt-pkg/contrib/netrc.h | 2 +- apt-pkg/contrib/progress.h | 18 +++-- apt-pkg/contrib/sha1.h | 3 - apt-pkg/contrib/strutl.h | 108 ++++++++++++++---------------- apt-pkg/deb/debindexfile.h | 68 +++++++++---------- apt-pkg/deb/deblistparser.cc | 2 + apt-pkg/deb/deblistparser.h | 24 +++---- apt-pkg/deb/debrecords.cc | 6 +- apt-pkg/deb/debrecords.h | 28 ++++---- apt-pkg/deb/debsrcrecords.cc | 6 +- apt-pkg/deb/debsrcrecords.h | 18 ++--- apt-pkg/deb/debsystem.cc | 4 +- apt-pkg/deb/debversion.cc | 4 +- apt-pkg/deb/debversion.h | 6 +- apt-pkg/deb/dpkgpm.h | 19 +++--- apt-pkg/depcache.cc | 3 + apt-pkg/depcache.h | 6 +- apt-pkg/edsp/edspindexfile.h | 2 +- apt-pkg/edsp/edsplistparser.cc | 8 +-- apt-pkg/edsp/edsplistparser.h | 8 +-- apt-pkg/edsp/edspsystem.cc | 2 +- apt-pkg/indexcopy.h | 41 ++++++------ apt-pkg/indexfile.cc | 10 +-- apt-pkg/indexfile.h | 12 ++-- apt-pkg/indexrecords.cc | 5 +- apt-pkg/indexrecords.h | 30 ++++----- apt-pkg/init.cc | 6 +- apt-pkg/metaindex.h | 20 +++--- apt-pkg/orderlist.h | 6 +- apt-pkg/packagemanager.h | 6 +- apt-pkg/pkgcache.cc | 4 +- apt-pkg/pkgcache.h | 16 ++--- apt-pkg/pkgcachegen.h | 38 +++++------ apt-pkg/pkgrecords.cc | 2 +- apt-pkg/pkgrecords.h | 26 +++---- apt-pkg/policy.h | 20 +++--- apt-pkg/srcrecords.h | 33 +++++---- apt-pkg/tagfile.h | 2 +- apt-pkg/vendor.cc | 6 +- apt-pkg/vendor.h | 22 +++--- apt-pkg/vendorlist.cc | 3 + apt-pkg/vendorlist.h | 14 ++-- apt-pkg/version.h | 4 +- apt-pkg/versionmatch.cc | 2 + apt-pkg/versionmatch.h | 26 ++++--- debian/changelog | 7 ++ ftparchive/cachedb.cc | 12 ++-- ftparchive/cachedb.h | 22 +++--- ftparchive/contents.cc | 2 +- ftparchive/contents.h | 2 +- ftparchive/multicompress.h | 6 +- methods/bzip2.cc | 6 +- methods/connect.cc | 14 ++-- methods/connect.h | 2 +- methods/copy.cc | 2 +- methods/file.cc | 6 +- methods/ftp.h | 10 +-- methods/gpgv.cc | 3 + methods/gzip.cc | 2 +- methods/http.h | 18 ++--- methods/rred.cc | 4 +- methods/rsh.cc | 18 ++--- methods/rsh.h | 10 +-- test/interactive-helper/test_udevcdrom.cc | 4 +- test/libapt/getlistoffilesindir_test.cc | 2 +- test/libapt/hashsums_test.cc | 2 +- test/libapt/parsedepends_test.cc | 4 +- test/libapt/strutil_test.cc | 2 +- 98 files changed, 598 insertions(+), 629 deletions(-) (limited to 'test') diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc index 533c563f9..4e078349e 100644 --- a/apt-inst/contrib/arfile.cc +++ b/apt-inst/contrib/arfile.cc @@ -115,7 +115,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 e2063cd71..bfc128ace 100644 --- a/apt-inst/contrib/arfile.h +++ b/apt-inst/contrib/arfile.h @@ -49,7 +49,7 @@ class ARArchive struct ARArchive::Member { // Fields from the header - string Name; + std::string Name; unsigned long MTime; unsigned long UID; unsigned long GID; diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h index 42f8ef534..27c453d0d 100644 --- a/apt-inst/contrib/extracttar.h +++ b/apt-inst/contrib/extracttar.h @@ -19,8 +19,6 @@ #include -using std::min; - class ExtractTar { protected: @@ -38,7 +36,7 @@ class ExtractTar int GZPid; FileFd InFd; bool Eof; - string DecompressProg; + std::string DecompressProg; // Fork and reap gzip bool StartGzip(); @@ -48,7 +46,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 0647959a9..1a94e1353 100644 --- a/apt-inst/database.cc +++ b/apt-inst/database.cc @@ -17,7 +17,7 @@ // --------------------------------------------------------------------- /* 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) diff --git a/apt-inst/database.h b/apt-inst/database.h index ef45bc2d6..cd0e310bc 100644 --- a/apt-inst/database.h +++ b/apt-inst/database.h @@ -30,8 +30,8 @@ class pkgDataBase pkgCacheGenerator *Cache; pkgFLCache *FList; - string MetaDir; - virtual bool InitMetaTmp(string &Dir) = 0; + std::string MetaDir; + virtual bool InitMetaTmp(std::string &Dir) = 0; public: @@ -40,7 +40,7 @@ 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; diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index e80d8c735..8ade547f5 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -107,8 +107,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) @@ -174,7 +174,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..e404d81db 100644 --- a/apt-inst/deb/debfile.h +++ b/apt-inst/deb/debfile.h @@ -68,7 +68,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 +81,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.h b/apt-inst/deb/dpkgdb.h index 125845f96..3656929aa 100644 --- a/apt-inst/deb/dpkgdb.h +++ b/apt-inst/deb/dpkgdb.h @@ -25,14 +25,14 @@ 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/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.h b/apt-inst/filelist.h index c74a310e4..69c483e71 100644 --- a/apt-inst/filelist.h +++ b/apt-inst/filelist.h @@ -48,7 +48,7 @@ class pkgFLCache class DiverIterator; protected: - string CacheFile; + std::string CacheFile; DynamicMMap ⤅ map_ptrloc LastTreeLookup; unsigned long LastLookupSize; diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index 6551170c4..8acec82ed 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -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 GPGVOutput; + std::string MD5Sum; + std::string SHA1Sum; + std::string SHA256Sum; + std::string SHA512Sum; + std::vector 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 Messages; + std::vector 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.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 MessageQueue; + std::vector 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.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 #include -using std::vector; -using std::string; - - #include #include @@ -107,8 +103,8 @@ class pkgAcquire friend class Item; friend class Queue; - typedef vector::iterator ItemIterator; - typedef vector::const_iterator ItemCIterator; + typedef std::vector::iterator ItemIterator; + typedef std::vector::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 Items; + std::vector 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.h b/apt-pkg/algorithms.h index 86d5fbd53..f299f8189 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -37,8 +37,6 @@ #include -using std::ostream; - class pkgSimulate : public pkgPackageManager /*{{{*/ { protected: @@ -63,13 +61,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 e1bc94f31..a0566e05e 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -59,10 +59,10 @@ const Configuration::getCompressionTypes(bool const &Cached) { 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) @@ -83,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) @@ -95,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"); } @@ -441,7 +441,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/cacheiterators.h b/apt-pkg/cacheiterators.h index b97a1a589..464b2fdd8 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -111,7 +111,7 @@ class pkgCache::GrpIterator: public Iterator { 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 +219,7 @@ class pkgCache::VerIterator : public Iterator { 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 +365,7 @@ class pkgCache::PkgFileIterator : public Iterator 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() {}; diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h index 614062cbb..2241f1eba 100644 --- a/apt-pkg/cdrom.h +++ b/apt-pkg/cdrom.h @@ -6,8 +6,6 @@ #include -using namespace std; - class pkgCdromStatus /*{{{*/ { protected: @@ -20,12 +18,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 +45,22 @@ class pkgCdrom /*{{{*/ }; - bool FindPackages(string CD, - vector &List, - vector &SList, - vector &SigList, - vector &TransList, - string &InfoDir, pkgCdromStatus *log, + bool FindPackages(std::string CD, + std::vector &List, + std::vector &SList, + std::vector &SigList, + std::vector &TransList, + std::string &InfoDir, pkgCdromStatus *log, unsigned int Depth = 0); - bool DropBinaryArch(vector &List); - bool DropRepeats(vector &List,const char *Name); - void ReduceSourcelist(string CD,vector &List); + bool DropBinaryArch(std::vector &List); + bool DropRepeats(std::vector &List,const char *Name); + void ReduceSourcelist(std::string CD,std::vector &List); bool WriteDatabase(Configuration &Cnf); - bool WriteSourceList(string Name,vector &List,bool Source); - int Score(string Path); + bool WriteSourceList(std::string Name,std::vector &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 +69,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 +102,9 @@ class pkgUdevCdromDevices /*{{{*/ // convenience interface, this will just call ScanForRemovable // with "APT::cdrom::CdromOnly" - vector Scan(); + std::vector Scan(); - vector ScanForRemovable(bool CdromOnly); + std::vector ScanForRemovable(bool CdromOnly); }; /*}}}*/ diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 1f96e941b..f5a939968 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -26,7 +26,7 @@ // --------------------------------------------------------------------- /* 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); @@ -34,7 +34,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); @@ -63,21 +63,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; 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 9de795b60..187f6bd59 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -30,6 +30,8 @@ #include /*}}}*/ +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 -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/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 #include -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 FindVector(const char *Name) const; - std::vector 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 FindVector(const char *Name) const; + std::vector 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/fileutl.h b/apt-pkg/contrib/fileutl.h index 973a38cff..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,8 +39,8 @@ 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: @@ -79,7 +77,7 @@ class FileFd return T; } - bool Open(string FileName,OpenMode Mode,unsigned long Perms = 0666); + bool Open(std::string FileName,OpenMode Mode,unsigned long Perms = 0666); bool OpenDescriptor(int Fd, OpenMode Mode, bool AutoClose=false); bool Close(); bool Sync(); @@ -93,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); @@ -107,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 * @@ -120,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 GetListOfFilesInDir(string const &Dir, string const &Ext, +std::vector GetListOfFilesInDir(std::string const &Dir, std::string const &Ext, bool const &SortList, bool const &AllowNoExt=false); -std::vector GetListOfFilesInDir(string const &Dir, std::vector const &Ext, +std::vector GetListOfFilesInDir(std::string const &Dir, std::vector 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); @@ -134,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 fd76bf229..05001f042 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -32,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); @@ -53,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(); @@ -100,9 +100,9 @@ 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 /*{{{*/ @@ -117,7 +117,7 @@ bool Hashes::AddFD(int const Fd,unsigned long long Size, bool const addMD5, while (Size != 0 || ToEOF) { unsigned long long n = sizeof(Buf); - if (!ToEOF) n = min(Size, n); + if (!ToEOF) n = std::min(Size, n); Res = read(Fd,Buf,n); if (Res < 0 || (!ToEOF && Res != (ssize_t) n)) // error, or short read return false; diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 40c2ad064..81851dede 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -22,31 +22,28 @@ #include #include -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 diff --git a/apt-pkg/contrib/hashsum.cc b/apt-pkg/contrib/hashsum.cc index 0edcbb364..ff3b112bb 100644 --- a/apt-pkg/contrib/hashsum.cc +++ b/apt-pkg/contrib/hashsum.cc @@ -14,7 +14,7 @@ bool SummationImplementation::AddFD(int const Fd, unsigned long long Size) { while (Size != 0 || ToEOF) { unsigned long long n = sizeof(Buf); - if (!ToEOF) n = min(Size, n); + if (!ToEOF) n = std::min(Size, n); Res = read(Fd, Buf, n); if (Res < 0 || (!ToEOF && Res != (ssize_t) n)) // error, or short read return false; diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h index 9157754e3..c109a8212 100644 --- a/apt-pkg/contrib/hashsum_template.h +++ b/apt-pkg/contrib/hashsum_template.h @@ -15,9 +15,6 @@ #include #include -using std::string; -using std::min; - template class HashSumValue { @@ -31,7 +28,7 @@ class HashSumValue 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 +45,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 +54,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 +70,7 @@ class HashSumValue Sum[I] = S[I]; }; - HashSumValue(string Str) + HashSumValue(std::string Str) { memset(Sum,0,sizeof(Sum)); Set(Str); diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h index 305cdb20d..a207da4e4 100644 --- a/apt-pkg/contrib/md5.h +++ b/apt-pkg/contrib/md5.h @@ -29,9 +29,6 @@ #include #include -using std::string; -using std::min; - #include "hashsum_template.h" typedef HashSumValue<128> MD5SumValue; diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index e0ff8db95..387e9a170 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -29,8 +29,6 @@ #include #include -using std::string; - /* 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 instead of this internal type */ @@ -102,7 +100,7 @@ class DynamicMMap : public MMap 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 b9d0749e2..9aa1376dc 100644 --- a/apt-pkg/contrib/netrc.cc +++ b/apt-pkg/contrib/netrc.cc @@ -24,6 +24,7 @@ #include "netrc.h" +using std::string; /* Get user and password from .netrc when given a machine name */ diff --git a/apt-pkg/contrib/netrc.h b/apt-pkg/contrib/netrc.h index 02a5eb09f..86afa43d1 100644 --- a/apt-pkg/contrib/netrc.h +++ b/apt-pkg/contrib/netrc.h @@ -25,5 +25,5 @@ // 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.h b/apt-pkg/contrib/progress.h index 5344323f6..7635719bc 100644 --- a/apt-pkg/contrib/progress.h +++ b/apt-pkg/contrib/progress.h @@ -25,8 +25,6 @@ #include #include -using std::string; - class Configuration; class OpProgress { @@ -38,13 +36,13 @@ class OpProgress // 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; @@ -55,9 +53,9 @@ class OpProgress public: void Progress(unsigned long long Current); - void SubProgress(unsigned long long SubTotal, const string &Op = "", float const Percent = -1); + 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 string &Op); + 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.h b/apt-pkg/contrib/sha1.h index 916faec1b..b4b139a22 100644 --- a/apt-pkg/contrib/sha1.h +++ b/apt-pkg/contrib/sha1.h @@ -18,9 +18,6 @@ #include #include -using std::string; -using std::min; - #include "hashsum_template.h" typedef HashSumValue<160> SHA1SumValue; diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index ab4b54722..93f4bef4f 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -27,60 +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 &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 &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 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 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); @@ -89,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); @@ -109,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.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 a4a974897..95a2e6d47 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -25,6 +25,8 @@ #include /*}}}*/ +using std::string; + static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Important}, {"required",pkgCache::State::Required}, {"standard",pkgCache::State::Standard}, diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 41d712fbf..09858d991 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -34,7 +34,7 @@ class debListParser : public pkgCacheGenerator::ListParser pkgTagFile Tags; pkgTagSection Section; unsigned long iOffset; - string Arch; + std::string Arch; std::vector Architectures; bool MultiArchEnabled; @@ -43,21 +43,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 +68,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/debrecords.cc b/apt-pkg/deb/debrecords.cc index 4dfc8b56a..ef6a7ca9d 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -17,6 +17,8 @@ #include /*}}}*/ +using std::string; + // RecordParser::debRecordParser - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -135,8 +137,8 @@ string debRecordParser::LongDesc() orig = Section.FindS("Description").c_str(); else { - vector const lang = APT::Configuration::getLanguages(); - for (vector::const_iterator l = lang.begin(); + std::vector const lang = APT::Configuration::getLanguages(); + for (std::vector::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..b75726859 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -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 c9c20267b..38389e624 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -21,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 @@ -57,7 +59,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 &BuildDeps, +bool debSrcRecordParser::BuildDepends(std::vector &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch) { unsigned int I; @@ -102,7 +104,7 @@ bool debSrcRecordParser::BuildDepends(vector // --------------------------------------------------------------------- /* This parses the list of files and returns it, each file is required to have a complete source package */ -bool debSrcRecordParser::Files(vector &List) +bool debSrcRecordParser::Files(std::vector &List) { List.erase(List.begin(),List.end()); diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index aa859b0e6..bb588e3d9 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -35,22 +35,22 @@ 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 &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true); + virtual bool BuildDepends(std::vector &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 &F); + virtual bool Files(std::vector &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) {} virtual ~debSrcRecordParser(); diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 080af5659..7ed6936c3 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -27,6 +27,8 @@ #include /*}}}*/ +using std::string; + debSystem debSys; class debSystemPrivate { @@ -219,7 +221,7 @@ signed debSystem::Score(Configuration const &Cnf) // System::AddStatusFiles - Register the status files /*{{{*/ // --------------------------------------------------------------------- /* */ -bool debSystem::AddStatusFiles(vector &List) +bool debSystem::AddStatusFiles(std::vector &List) { if (d->StatusFile == 0) d->StatusFile = new debStatusIndex(_config->FindFile("Dir::State::status")); diff --git a/apt-pkg/deb/debversion.cc b/apt-pkg/deb/debversion.cc index ba32b2dd4..859ff6b6d 100644 --- a/apt-pkg/deb/debversion.cc +++ b/apt-pkg/deb/debversion.cc @@ -263,7 +263,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; @@ -278,6 +278,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..24ad73149 100644 --- a/apt-pkg/deb/debversion.h +++ b/apt-pkg/deb/debversion.h @@ -32,7 +32,7 @@ class debVersioningSystem : public pkgVersioningSystem { return DoCmpVersion(A,Aend,B,Bend); } - virtual string UpstreamVersion(const char *A); + virtual std::string UpstreamVersion(const char *A); debVersioningSystem(); }; @@ -53,7 +53,7 @@ inline int pkgVersionCompare(const char *A, const char *AEnd, { return debVS.DoCmpVersion(A,AEnd,B,BEnd); } -inline int pkgVersionCompare(string A,string B) +inline int pkgVersionCompare(std::string A,std::string B) { return debVS.CmpVersion(A,B); } @@ -61,7 +61,7 @@ inline bool pkgCheckDep(const char *DepVer,const char *PkgVer,int Op) { return debVS.CheckDep(PkgVer,Op,DepVer); } -inline string pkgBaseVersion(const char *Ver) +inline std::string pkgBaseVersion(const char *Ver) { return debVS.UpstreamVersion(Ver); } diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index 3f95c51dc..6b62360b7 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -15,9 +15,6 @@ #include #include -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 > PackageOps; + std::map > 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 PackageOpsDone; + std::map 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 List; + std::vector 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); diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index f816630ae..529085b4a 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -32,6 +32,9 @@ #include /*}}}*/ + +using std::string; + // helper for Install-Recommends-Sections and Never-MarkAuto-Sections /*{{{*/ static bool ConfigValueInSubTree(const char* SubTree, const char *needle) diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 66cb7dbab..5798f0362 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -338,9 +338,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;}; diff --git a/apt-pkg/edsp/edspindexfile.h b/apt-pkg/edsp/edspindexfile.h index 0053388eb..58a7f62a9 100644 --- a/apt-pkg/edsp/edspindexfile.h +++ b/apt-pkg/edsp/edspindexfile.h @@ -22,7 +22,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 e00abdbcc..bcfdb1017 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -20,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 /*{{{*/ @@ -33,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 ""; } @@ -85,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..3e196cb9a 100644 --- a/apt-pkg/edsp/edsplistparser.h +++ b/apt-pkg/edsp/edsplistparser.h @@ -20,15 +20,15 @@ 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 10d75771a..6b9207451 100644 --- a/apt-pkg/edsp/edspsystem.cc +++ b/apt-pkg/edsp/edspsystem.cc @@ -97,7 +97,7 @@ signed edspSystem::Score(Configuration const &Cnf) } /*}}}*/ // System::AddStatusFiles - Register the status files /*{{{*/ -bool edspSystem::AddStatusFiles(vector &List) +bool edspSystem::AddStatusFiles(std::vector &List) { if (StatusFile == 0) { diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index 60c90dd4a..21294ae7e 100644 --- a/apt-pkg/indexcopy.h +++ b/apt-pkg/indexcopy.h @@ -14,9 +14,6 @@ #include #include -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 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 &List, + bool CopyPackages(std::string CDROM,std::string Name,std::vector &List, pkgCdromStatus *log); virtual ~IndexCopy() {}; }; @@ -53,8 +50,8 @@ class PackageCopy : public IndexCopy /*{{{*/ { protected: - virtual bool GetFile(string &Filename,unsigned long 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 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 &List, + bool CopyTranslations(std::string CDROM,std::string Name,std::vector &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 &SigList, - vector PkgList,vector SrcList); + bool CopyAndVerify(std::string CDROM,std::string Name,std::vector &SigList, + std::vector PkgList,std::vector 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 68e9df4c8..642a750d4 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -47,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 /*{{{*/ @@ -63,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 /*{{{*/ @@ -98,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..68d53ad7e 100644 --- a/apt-pkg/indexfile.h +++ b/apt-pkg/indexfile.h @@ -27,8 +27,6 @@ #include #include #include - -using std::string; class pkgAcquire; class pkgCacheGenerator; @@ -59,13 +57,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 +82,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 448a76c27..7b48d659e 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -15,6 +15,9 @@ #include /*}}}*/ + +using std::string; + string indexRecords::GetDist() const { return this->Dist; @@ -146,7 +149,7 @@ bool indexRecords::Load(const string Filename) /*{{{*/ return true; } /*}}}*/ -vector indexRecords::MetaKeys() /*{{{*/ +std::vector indexRecords::MetaKeys() /*{{{*/ { std::vector keys; std::map::iterator I = Entries.begin(); diff --git a/apt-pkg/indexrecords.h b/apt-pkg/indexrecords.h index 0f933b93c..66b84f8bb 100644 --- a/apt-pkg/indexrecords.h +++ b/apt-pkg/indexrecords.h @@ -16,42 +16,42 @@ class indexRecords { - bool parseSumData(const char *&Start, const char *End, string &Name, - string &Hash, unsigned long long &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 Entries; + std::map 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 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; unsigned long long Size; }; diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 97a39e96e..a1cb05e38 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -108,14 +108,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); @@ -142,7 +142,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/metaindex.h b/apt-pkg/metaindex.h index f60235a5d..66c287c30 100644 --- a/apt-pkg/metaindex.h +++ b/apt-pkg/metaindex.h @@ -8,8 +8,6 @@ #include #include #include - -using std::string; class pkgAcquire; class pkgCacheGenerator; @@ -18,35 +16,35 @@ class OpProgress; class metaIndex { protected: - vector *Indexes; + std::vector *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 *GetIndexFiles() = 0; + virtual std::vector *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::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I) + for (std::vector::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I) delete *I; delete Indexes; } diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h index 9588d30a5..a2d7b321b 100644 --- a/apt-pkg/orderlist.h +++ b/apt-pkg/orderlist.h @@ -38,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; @@ -102,7 +102,7 @@ class pkgOrderList : protected pkgCache::Namespace 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;}; @@ -115,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.h b/apt-pkg/packagemanager.h index 96dc5f236..7ee17942c 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -30,8 +30,6 @@ #include #include -using std::string; - class pkgAcquire; class pkgDepCache; class pkgSourceList; @@ -45,7 +43,7 @@ class pkgPackageManager : protected pkgCache::Namespace static bool SigINTStop; protected: - string *FileNames; + std::string *FileNames; pkgDepCache &Cache; pkgOrderList *List; bool Debug; @@ -78,7 +76,7 @@ class pkgPackageManager : protected pkgCache::Namespace 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 089648271..40b99891a 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -490,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"; @@ -685,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"; 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 #include -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.h b/apt-pkg/pkgcachegen.h index c26051182..af9c2bcb0 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -63,29 +63,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;}; @@ -122,26 +122,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, diff --git a/apt-pkg/pkgrecords.cc b/apt-pkg/pkgrecords.cc index 7709f133a..c5b3bebd7 100644 --- a/apt-pkg/pkgrecords.cc +++ b/apt-pkg/pkgrecords.cc @@ -46,7 +46,7 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), /* */ pkgRecords::~pkgRecords() { - for ( vector::iterator it = Files.begin(); + for ( std::vector::iterator it = Files.begin(); it != Files.end(); ++it) { diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index 8741533b9..3658435e8 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -54,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/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 #include -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 Defaults; - vector Unmatched; + std::vector Defaults; + std::vector 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/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 -#include - -using std::string; -using std::vector; +#include 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 &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) = 0; + virtual bool BuildDepends(std::vector &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) = 0; static const char *BuildDepType(unsigned char const &Type); - virtual bool Files(vector &F) = 0; + virtual bool Files(std::vector &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 Files; - vector::iterator Current; + std::vector Files; + std::vector::iterator Current; public: diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 28f7fcc24..e3034b628 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -54,7 +54,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, diff --git a/apt-pkg/vendor.cc b/apt-pkg/vendor.cc index eab6d448f..36fc25957 100644 --- a/apt-pkg/vendor.cc +++ b/apt-pkg/vendor.cc @@ -22,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::const_iterator Elt = Fingerprints.find(Print); + std::map::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 -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 Fingerprints; + std::string VendorID; + std::string Origin; + std::map Fingerprints; public: - Vendor(string VendorID, string Origin, + Vendor(std::string VendorID, std::string Origin, std::vector *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 731f11acf..2ccb556ab 100644 --- a/apt-pkg/vendorlist.cc +++ b/apt-pkg/vendorlist.cc @@ -10,6 +10,9 @@ #include +using std::string; +using std::vector; + pkgVendorList::~pkgVendorList() { for (vector::const_iterator I = VendorList.begin(); diff --git a/apt-pkg/vendorlist.h b/apt-pkg/vendorlist.h index eaeecb173..62ab78a33 100644 --- a/apt-pkg/vendorlist.h +++ b/apt-pkg/vendorlist.h @@ -19,22 +19,18 @@ #include #include -using std::string; -using std::vector; - - class __deprecated pkgVendorList { protected: - vector VendorList; + std::vector VendorList; bool CreateList(Configuration& Cnf); - const Vendor* LookupFingerprint(string Fingerprint); + const Vendor* LookupFingerprint(std::string Fingerprint); public: - typedef vector::const_iterator const_iterator; + typedef std::vector::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 +38,7 @@ class __deprecated pkgVendorList inline unsigned int size() const {return VendorList.size();}; inline bool empty() const {return VendorList.empty();}; - const Vendor* FindVendor(const vector GPGVOutput); + const Vendor* FindVendor(const std::vector GPGVOutput); ~pkgVendorList(); }; diff --git a/apt-pkg/version.h b/apt-pkg/version.h index 49c53a93a..c9257d116 100644 --- a/apt-pkg/version.h +++ b/apt-pkg/version.h @@ -24,8 +24,6 @@ #include #include -using std::string; - class pkgVersioningSystem { public: @@ -43,7 +41,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) diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index f336b3c35..e4fa0ea65 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -24,6 +24,8 @@ #include /*}}}*/ +using std::string; + // VersionMatch::pkgVersionMatch - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Break up the data string according to the selected type */ 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 #include -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/debian/changelog b/debian/changelog index 7e1ce4f4e..8a4994a32 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.8.16~exp7) experimental; urgency=low + + [ David Kalnischkies ] + * do not pollute namespace in the headers with using (Closes: #500198) + + -- David Kalnischkies Mon, 19 Sep 2011 13:25:58 +0200 + apt (0.8.16~exp6) experimental; urgency=low [ Christopher Baines ] diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc index a1d70f912..7d8718c56 100644 --- a/ftparchive/cachedb.cc +++ b/ftparchive/cachedb.cc @@ -28,7 +28,7 @@ // 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; @@ -48,7 +48,7 @@ bool CacheDB::ReadyDB(string const &DB) DBLoaded = false; Dbp = 0; - DBFile = string(); + DBFile = std::string(); if (DB.empty()) return true; @@ -162,7 +162,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) @@ -298,12 +298,12 @@ 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 space[65]; if (length * 2 > sizeof(space) - 1) length = (sizeof(space) - 1) / 2; for (size_t i = 0; i < length; i++) snprintf(&space[i*2], 3, "%02x", bytes[i]); - return string(space); + return std::string(space); } static inline unsigned char xdig2num(char const &dig) { @@ -496,7 +496,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 6bd5aa36c..f2e1e19e4 100644 --- a/ftparchive/cachedb.h +++ b/ftparchive/cachedb.h @@ -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) @@ -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 @@ -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 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 65d8dd1ce..bbc5a1e2b 100644 --- a/ftparchive/contents.cc +++ b/ftparchive/contents.cc @@ -380,7 +380,7 @@ bool ContentsExtract::TakeContents(const void *NewData,unsigned long 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 f549ce17f..cdd8abd5c 100644 --- a/ftparchive/contents.h +++ b/ftparchive/contents.h @@ -80,7 +80,7 @@ class ContentsExtract : public pkgDirStream virtual bool DoItem(Item &Itm,int &Fd); void Reset() {CurSize = 0;}; bool TakeContents(const void *Data,unsigned long long Length); - void Add(GenContents &Contents,string const &Package); + void Add(GenContents &Contents,std::string const &Package); ContentsExtract() : Data(0), MaxSize(0), CurSize(0) {}; virtual ~ContentsExtract() {delete [] Data;}; diff --git a/ftparchive/multicompress.h b/ftparchive/multicompress.h index 4839af47d..19e5065fa 100644 --- a/ftparchive/multicompress.h +++ b/ftparchive/multicompress.h @@ -29,7 +29,7 @@ class MultiCompress // An output file struct Files { - string Output; + std::string Output; APT::Configuration::Compressor CompressProg; Files *Next; FileFd TmpFile; @@ -57,9 +57,9 @@ class MultiCompress 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/methods/bzip2.cc b/methods/bzip2.cc index eff83bda7..ad5db6cfb 100644 --- a/methods/bzip2.cc +++ b/methods/bzip2.cc @@ -47,9 +47,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; @@ -78,7 +78,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/connect.cc b/methods/connect.cc index 16fb6e793..ba2264faa 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -35,13 +35,13 @@ #include /*}}}*/ -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 bad_addr; +static std::set bad_addr; // RotateDNS - Select a new server from a DNS rotation /*{{{*/ // --------------------------------------------------------------------- @@ -58,7 +58,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 @@ -73,7 +73,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 @@ -100,7 +100,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); @@ -119,7 +119,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); } @@ -130,7 +130,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..0afa00919 100644 --- a/methods/connect.h +++ b/methods/connect.h @@ -13,7 +13,7 @@ #include #include -bool Connect(string To,int Port,const char *Service,int DefPort, +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 94467e054..fe2918469 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -37,7 +37,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 9fc4cd76c..d58652e6e 100644 --- a/methods/file.cc +++ b/methods/file.cc @@ -40,7 +40,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 //")); @@ -58,10 +58,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.h b/methods/ftp.h index b4913ca57..7088e0954 100644 --- a/methods/ftp.h +++ b/methods/ftp.h @@ -33,7 +33,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 +43,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); @@ -65,11 +65,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 251bcbc90..67cbd36a2 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -17,6 +17,9 @@ #include +using std::string; +using std::vector; + #define GNUPGPREFIX "[GNUPG:]" #define GNUPGBADSIG "[GNUPG:] BADSIG" #define GNUPGNOPUBKEY "[GNUPG:] NO_PUBKEY" diff --git a/methods/gzip.cc b/methods/gzip.cc index f4bb052e2..a51497948 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -41,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; diff --git a/methods/http.h b/methods/http.h index c47d7184a..08823d1b1 100644 --- a/methods/http.h +++ b/methods/http.h @@ -26,7 +26,7 @@ class CircleBuf unsigned long long Size; unsigned long long InP; unsigned long long OutP; - string OutQueue; + std::string OutQueue; unsigned long long StrPos; unsigned long long MaxGet; struct timeval Start; @@ -60,11 +60,11 @@ 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 long Max) {if (Max == -1) MaxGet = 0-1; else MaxGet = OutP + Max;} @@ -99,7 +99,7 @@ struct ServerState 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,7 +112,7 @@ struct ServerState int ServerFd; URI ServerName; - bool HeaderLine(string Line); + 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; @@ -167,10 +167,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 +178,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/rred.cc b/methods/rred.cc index bc941ed04..2a05acce1 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -472,7 +472,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; @@ -525,7 +525,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 c95a4d3eb..add128c49 100644 --- a/methods/rsh.cc +++ b/methods/rsh.cc @@ -32,7 +32,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 /*{{{*/ @@ -85,7 +85,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}; @@ -154,7 +154,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; @@ -174,7 +174,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; @@ -205,7 +205,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); @@ -254,7 +254,7 @@ bool RSHConn::WriteMsg(string &Text,bool Sync,const char *Fmt,...) 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) @@ -276,7 +276,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; @@ -309,7 +309,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long 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; @@ -366,7 +366,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]; diff --git a/methods/rsh.h b/methods/rsh.h index c81396b5f..7bebe29a0 100644 --- a/methods/rsh.h +++ b/methods/rsh.h @@ -25,15 +25,15 @@ 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 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 @@ -53,11 +53,11 @@ class RSHConn 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/test/interactive-helper/test_udevcdrom.cc b/test/interactive-helper/test_udevcdrom.cc index dc25ab357..bbedc0ab5 100644 --- a/test/interactive-helper/test_udevcdrom.cc +++ b/test/interactive-helper/test_udevcdrom.cc @@ -2,12 +2,14 @@ #include #include +#include + int main() { pkgUdevCdromDevices c; assert(c.Dlopen()); - vector l; + std::vector l; l = c.Scan(); assert(l.empty() == false); for (size_t i = 0; i < l.size(); ++i) diff --git a/test/libapt/getlistoffilesindir_test.cc b/test/libapt/getlistoffilesindir_test.cc index 5ee014cca..b2c95e840 100644 --- a/test/libapt/getlistoffilesindir_test.cc +++ b/test/libapt/getlistoffilesindir_test.cc @@ -7,7 +7,7 @@ #include #include -#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/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/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/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"; -- cgit v1.2.3-70-g09d2 From 472ff00ef2e48383805d281c6364ec27839e3f4d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 19:14:19 +0200 Subject: use forward declaration in headers if possible instead of includes --- apt-inst/contrib/arfile.cc | 1 + apt-inst/contrib/arfile.h | 3 +- apt-inst/contrib/extracttar.cc | 1 + apt-inst/contrib/extracttar.h | 5 +- apt-inst/database.cc | 7 + apt-inst/database.h | 8 +- apt-inst/deb/debfile.cc | 1 + apt-inst/deb/debfile.h | 5 +- apt-inst/deb/dpkgdb.cc | 2 + apt-inst/deb/dpkgdb.h | 5 + apt-inst/extract.cc | 1 + apt-inst/filelist.h | 3 +- apt-pkg/acquire-item.cc | 2 + apt-pkg/acquire-item.h | 238 ++++++++++++++--------------- apt-pkg/acquire-method.h | 6 +- apt-pkg/algorithms.cc | 3 + apt-pkg/algorithms.h | 3 +- apt-pkg/cachefile.cc | 1 + apt-pkg/cachefile.h | 9 +- apt-pkg/cacheiterators.h | 1 + apt-pkg/cacheset.cc | 7 +- apt-pkg/cacheset.h | 13 +- apt-pkg/cdrom.cc | 2 + apt-pkg/cdrom.h | 3 +- apt-pkg/clean.cc | 1 + apt-pkg/contrib/cmndline.cc | 1 + apt-pkg/contrib/cmndline.h | 4 +- apt-pkg/contrib/mmap.cc | 1 + apt-pkg/contrib/mmap.h | 3 +- apt-pkg/contrib/netrc.cc | 2 + apt-pkg/contrib/netrc.h | 4 +- apt-pkg/deb/deblistparser.cc | 1 + apt-pkg/deb/deblistparser.h | 1 - apt-pkg/deb/debmetaindex.cc | 3 + apt-pkg/deb/debmetaindex.h | 43 +++--- apt-pkg/deb/debrecords.cc | 2 + apt-pkg/deb/debrecords.h | 2 +- apt-pkg/deb/debsystem.h | 4 +- apt-pkg/depcache.cc | 2 +- apt-pkg/depcache.h | 5 +- apt-pkg/edsp.cc | 7 + apt-pkg/edsp.h | 11 +- apt-pkg/edsp/edspindexfile.cc | 1 + apt-pkg/edsp/edspindexfile.h | 1 - apt-pkg/edsp/edsplistparser.h | 5 +- apt-pkg/indexfile.h | 2 + apt-pkg/indexrecords.cc | 3 + apt-pkg/indexrecords.h | 1 - apt-pkg/init.cc | 2 + apt-pkg/init.h | 4 +- apt-pkg/metaindex.h | 3 - apt-pkg/packagemanager.h | 3 +- apt-pkg/pkgcachegen.cc | 2 + apt-pkg/pkgsystem.h | 6 +- apt-pkg/sourcelist.cc | 2 + apt-pkg/sourcelist.h | 6 +- apt-pkg/srcrecords.cc | 1 + apt-pkg/tagfile.cc | 1 + apt-pkg/tagfile.h | 6 +- apt-pkg/vendorlist.cc | 2 + apt-pkg/vendorlist.h | 5 +- apt-pkg/version.h | 3 +- cmdline/acqprogress.h | 4 +- cmdline/apt-cache.cc | 6 +- cmdline/apt-cdrom.cc | 2 + cmdline/apt-config.cc | 1 + cmdline/apt-dump-solver.cc | 1 + cmdline/apt-extracttemplates.cc | 1 + cmdline/apt-get.cc | 5 + cmdline/apt-internal-solver.cc | 2 + cmdline/apt-mark.cc | 1 + cmdline/apt-sortpkgs.cc | 2 + debian/changelog | 3 +- ftparchive/cachedb.cc | 1 + ftparchive/cachedb.h | 8 +- ftparchive/contents.h | 3 +- ftparchive/multicompress.h | 5 +- ftparchive/writer.h | 5 +- methods/bzip2.cc | 1 + methods/cdrom.cc | 1 + methods/connect.cc | 2 + methods/connect.h | 3 +- methods/copy.cc | 1 + methods/file.cc | 1 + methods/ftp.cc | 1 + methods/ftp.h | 4 + methods/gpgv.cc | 1 + methods/http.cc | 6 + methods/http.h | 7 +- methods/https.cc | 1 + methods/https.h | 3 +- methods/mirror.cc | 3 +- methods/mirror.h | 25 +-- methods/rred.cc | 1 + methods/rsh.cc | 3 + methods/rsh.h | 8 +- test/interactive-helper/extract-control.cc | 1 + test/interactive-helper/test_udevcdrom.cc | 1 + test/interactive-helper/testextract.cc | 2 + 99 files changed, 380 insertions(+), 232 deletions(-) (limited to 'test') diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc index 4e078349e..2dee1a40d 100644 --- a/apt-inst/contrib/arfile.cc +++ b/apt-inst/contrib/arfile.cc @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/apt-inst/contrib/arfile.h b/apt-inst/contrib/arfile.h index bfc128ace..2be1323d1 100644 --- a/apt-inst/contrib/arfile.h +++ b/apt-inst/contrib/arfile.h @@ -17,7 +17,8 @@ #include -#include + +class FileFd; class ARArchive { diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 487027c3d..12919a7cd 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -18,6 +18,7 @@ // Include Files /*{{{*/ #include +#include #include #include #include diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h index 27c453d0d..8754e8dcc 100644 --- a/apt-inst/contrib/extracttar.h +++ b/apt-inst/contrib/extracttar.h @@ -15,9 +15,10 @@ #define PKGLIB_EXTRACTTAR_H #include -#include -#include +#include + +class pkgDirStream; class ExtractTar { diff --git a/apt-inst/database.cc b/apt-inst/database.cc index 1a94e1353..da7613491 100644 --- a/apt-inst/database.cc +++ b/apt-inst/database.cc @@ -11,6 +11,8 @@ #include #include +#include +#include /*}}}*/ // DataBase::GetMetaTmp - Get the temp dir /*{{{*/ @@ -26,3 +28,8 @@ bool pkgDataBase::GetMetaTmp(std::string &Dir) return true; } /*}}}*/ +pkgDataBase::~pkgDataBase() +{ + delete Cache; + delete FList; +} diff --git a/apt-inst/database.h b/apt-inst/database.h index cd0e310bc..ccfee3797 100644 --- a/apt-inst/database.h +++ b/apt-inst/database.h @@ -21,9 +21,13 @@ #ifndef PKGLIB_DATABASE_H #define PKGLIB_DATABASE_H -#include #include +#include + +class pkgFLCache; +class OpProgress; + class pkgDataBase { protected: @@ -46,7 +50,7 @@ class pkgDataBase 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 8ade547f5..4bd065cf8 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -18,6 +18,7 @@ // Include Files /*{{{*/ #include +#include #include #include #include diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h index e404d81db..2c4734f9e 100644 --- a/apt-inst/deb/debfile.h +++ b/apt-inst/deb/debfile.h @@ -25,9 +25,12 @@ #include -#include #include #include +#include + +class FileFd; +class pkgDataBase; class debDebFile { diff --git a/apt-inst/deb/dpkgdb.cc b/apt-inst/deb/dpkgdb.cc index 3112acdbd..819c123f6 100644 --- a/apt-inst/deb/dpkgdb.cc +++ b/apt-inst/deb/dpkgdb.cc @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include diff --git a/apt-inst/deb/dpkgdb.h b/apt-inst/deb/dpkgdb.h index 3656929aa..f28563a93 100644 --- a/apt-inst/deb/dpkgdb.h +++ b/apt-inst/deb/dpkgdb.h @@ -22,6 +22,11 @@ #include +#include + +class DynamicMMap; +class OpProgress; + class debDpkgDB : public pkgDataBase { protected: diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc index d48ff63ac..29e163028 100644 --- a/apt-inst/extract.cc +++ b/apt-inst/extract.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include #include diff --git a/apt-inst/filelist.h b/apt-inst/filelist.h index 69c483e71..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 #include -#include +#include class pkgFLCache { diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index b46489f87..453fce109 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 13be17a01..24f848f27 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -21,13 +21,9 @@ #define PKGLIB_ACQUIRE_ITEM_H #include -#include -#include -#include -#include -#include #include #include +#include /** \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 available_patches; + std::vector 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 diffs=vector()); + pkgAcqIndexDiffs(pkgAcquire *Owner,std::string URI,std::string URIDesc, + std::string ShortDesc, HashString ExpectedHash, + std::string ServerSha1, + std::vector diffs=std::vector()); }; /*}}}*/ /** \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; @@ -710,7 +710,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; @@ -719,20 +719,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; @@ -742,21 +742,21 @@ class pkgAcqMetaSig : public pkgAcquire::Item * * \todo Why a list of pointers instead of a list of structs? */ - const vector* IndexTargets; + const std::vector* 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* 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* IndexTargets, indexRecords* MetaIndexParser); }; /*}}}*/ @@ -779,17 +779,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* IndexTargets; + const std::vector* IndexTargets; /** \brief The parser for the meta-index file. */ indexRecords* MetaIndexParser; @@ -805,7 +805,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. * @@ -816,7 +816,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. * @@ -827,7 +827,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. * @@ -842,17 +842,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* IndexTargets, + std::string URI,std::string URIDesc, std::string ShortDesc, + std::string SigFile, + const std::vector* IndexTargets, indexRecords* MetaIndexParser); }; /*}}}*/ @@ -860,33 +860,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* 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* IndexTargets, indexRecords* MetaIndexParser); }; /*}}}*/ @@ -920,7 +920,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; @@ -942,13 +942,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. @@ -971,7 +971,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. {{{ @@ -999,12 +999,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. * @@ -1037,9 +1037,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.h b/apt-pkg/acquire-method.h index 8acec82ed..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 -#include - #include +#include +#include + class Hashes; class pkgAcqMethod { diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 40368c91f..919daefef 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -23,6 +23,9 @@ #include #include #include +#include +#include +#include #include #include diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index f299f8189..948fe1103 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -33,10 +33,11 @@ #include #include -#include #include +class pkgAcquireStatus; + class pkgSimulate : public pkgPackageManager /*{{{*/ { protected: diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index f38dfc581..1b8d91a44 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -23,6 +23,7 @@ #include #include #include +#include #include /*}}}*/ diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h index 243061f0f..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 -#include -#include -#include +#include + +class pkgPolicy; +class pkgSourceList; +class OpProgress; class pkgCacheFile { diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 464b2fdd8..5382f3838 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -32,6 +32,7 @@ #include #include + // abstract Iterator template /*{{{*/ /* This template provides the very basic iterator methods we need to have for doing some walk-over-the-cache magic */ diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index 386ecfb5f..6b95eab70 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -12,11 +12,14 @@ #include #include +#include #include #include #include #include #include +#include +#include #include @@ -298,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); @@ -316,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 #include -#include +#include #include /*}}}*/ + +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 392cd890e..a9c63fd21 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include #include diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h index 2241f1eba..319254fd0 100644 --- a/apt-pkg/cdrom.h +++ b/apt-pkg/cdrom.h @@ -1,10 +1,11 @@ #ifndef PKGLIB_CDROM_H #define PKGLIB_CDROM_H -#include #include #include +class Configuration; +class OpProgress; class pkgCdromStatus /*{{{*/ { diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index f5a939968..ed8fa1aa9 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc index 34e90da20..997f26bc7 100644 --- a/apt-pkg/contrib/cmndline.cc +++ b/apt-pkg/contrib/cmndline.cc @@ -13,6 +13,7 @@ // Include files /*{{{*/ #include +#include #include #include #include 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 +class Configuration; class CommandLine { diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index a110a7019..f76169a92 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index 387e9a170..2ed4a95f8 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -27,7 +27,8 @@ #include -#include + +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 diff --git a/apt-pkg/contrib/netrc.cc b/apt-pkg/contrib/netrc.cc index 9aa1376dc..cb7d36088 100644 --- a/apt-pkg/contrib/netrc.cc +++ b/apt-pkg/contrib/netrc.cc @@ -14,7 +14,9 @@ #include #include +#include #include + #include #include #include diff --git a/apt-pkg/contrib/netrc.h b/apt-pkg/contrib/netrc.h index 86afa43d1..7b94eba88 100644 --- a/apt-pkg/contrib/netrc.h +++ b/apt-pkg/contrib/netrc.h @@ -14,11 +14,13 @@ #ifndef NETRC_H #define NETRC_H -#include +#include #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. diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 95a2e6d47..3652f9e8b 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 09858d991..9519d9711 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -12,7 +12,6 @@ #define PKGLIB_DEBLISTPARSER_H #include -#include #include class debListParser : public pkgCacheGenerator::ListParser diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 1d3754b00..0d07725eb 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -4,9 +4,12 @@ #include #include #include +#include #include #include #include +#include +#include #include #include 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 -#include #include +#include +#include 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 > ArchEntries; + std::map > 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 * 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 *GetIndexFiles(); + std::vector * 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 *GetIndexFiles(); void SetTrusted(bool const Trusted); virtual bool IsTrusted() const; - void PushSectionEntry(vector const &Archs, const debSectionEntry *Entry); - void PushSectionEntry(string const &Arch, const debSectionEntry *Entry); + void PushSectionEntry(std::vector 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 ef6a7ca9d..1afa7b74d 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -14,6 +14,8 @@ #include #include #include +#include + #include /*}}}*/ diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index b75726859..9c7ea6b48 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -15,8 +15,8 @@ #define PKGLIB_DEBRECORDS_H #include -#include #include +#include class debRecordParser : public pkgRecords::Parser { 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 +#include class debSystemPrivate; - class debStatusIndex; +class pkgDepCache; + class debSystem : public pkgSystem { // private d-pointer diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 529085b4a..529e9240d 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -16,13 +16,13 @@ #include #include #include - #include #include #include #include #include #include +#include #include #include diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 5798f0362..f6e6c0afc 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -40,12 +40,13 @@ #include #include -#include -#include #include #include #include +#include + +class OpProgress; class pkgDepCache : protected pkgCache::Namespace { diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index 44f7dbfd6..137398100 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -9,17 +9,24 @@ #include #include +#include #include #include #include #include +#include +#include #include #include +#include + #include /*}}}*/ +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"}; 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 -#include -#include +#include +#include #include +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 b417a7562..058cef636 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/apt-pkg/edsp/edspindexfile.h b/apt-pkg/edsp/edspindexfile.h index 58a7f62a9..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 #include class edspIndex : public debStatusIndex diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h index 3e196cb9a..5d82716c7 100644 --- a/apt-pkg/edsp/edsplistparser.h +++ b/apt-pkg/edsp/edsplistparser.h @@ -12,9 +12,8 @@ #define PKGLIB_EDSPLISTPARSER_H #include -#include -#include -#include + +class FileFd; class edspListParser : public debListParser { diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h index 68d53ad7e..5e162a846 100644 --- a/apt-pkg/indexfile.h +++ b/apt-pkg/indexfile.h @@ -27,10 +27,12 @@ #include #include #include +#include class pkgAcquire; class pkgCacheGenerator; class OpProgress; + class pkgIndexFile { protected: diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index 7b48d659e..cdb9250e8 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -10,6 +10,9 @@ #include #include #include +#include +#include + #include #include diff --git a/apt-pkg/indexrecords.h b/apt-pkg/indexrecords.h index 66b84f8bb..fa60a0847 100644 --- a/apt-pkg/indexrecords.h +++ b/apt-pkg/indexrecords.h @@ -7,7 +7,6 @@ #include -#include #include #include diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index a1cb05e38..2a709dd36 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include #include diff --git a/apt-pkg/init.h b/apt-pkg/init.h index 4cee1001a..85ad0df7e 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -13,8 +13,8 @@ #ifndef PKGLIB_INIT_H #define PKGLIB_INIT_H -#include -#include +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 diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h index 66c287c30..9cc79a7a6 100644 --- a/apt-pkg/metaindex.h +++ b/apt-pkg/metaindex.h @@ -4,10 +4,7 @@ #include #include -#include -#include #include -#include class pkgAcquire; class pkgCacheGenerator; diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 7ee17942c..d4989a6e0 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -23,11 +23,10 @@ #ifndef PKGLIB_PACKAGEMANAGER_H #define PKGLIB_PACKAGEMANAGER_H +#include #include #include -#include -#include #include class pkgAcquire; diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index a39aa9f59..1356054b5 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include 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 -#include #include - + +class pkgDepCache; class pkgPackageManager; class pkgVersioningSystem; class Configuration; class pkgIndexFile; +class PkgFileIterator; class pkgSystem { diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index e20ec4704..46025fc74 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include 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 #include #include -#include 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 8c1de2ea5..f6d2d5158 100644 --- a/apt-pkg/srcrecords.cc +++ b/apt-pkg/srcrecords.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include /*}}}*/ diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 418e6bed8..ec86173df 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index e3034b628..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 #include +#include + +class FileFd; + class pkgTagSection { const char *Section; diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc index 2ccb556ab..ecfc7db87 100644 --- a/apt-pkg/vendorlist.cc +++ b/apt-pkg/vendorlist.cc @@ -2,12 +2,14 @@ #include #include +#include #include #if __GNUC__ >= 4 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif +#include #include using std::string; diff --git a/apt-pkg/vendorlist.h b/apt-pkg/vendorlist.h index 62ab78a33..733d23a32 100644 --- a/apt-pkg/vendorlist.h +++ b/apt-pkg/vendorlist.h @@ -15,10 +15,11 @@ #include #include -#include -#include #include +class Vendor; +class Configuration; + class __deprecated pkgVendorList { protected: diff --git a/apt-pkg/version.h b/apt-pkg/version.h index c9257d116..47e1919bb 100644 --- a/apt-pkg/version.h +++ b/apt-pkg/version.h @@ -20,8 +20,7 @@ #ifndef PKGLIB_VERSION_H #define PKGLIB_VERSION_H - -#include +#include #include class pkgVersioningSystem 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 +#include + 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 a4cdf784e..82a31c9b1 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -24,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +31,9 @@ #include #include #include +#include +#include +#include #include #include @@ -40,6 +43,7 @@ #include #include #include +#include #include /*}}}*/ diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 8608b1215..fa48debcd 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include #include diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index df2958975..94f6ee9b0 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -24,6 +24,7 @@ #include #include #include +#include #include #include 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 #include +#include /*}}}*/ // ShowHelp - Show a help screen /*{{{*/ diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index 5d7b76c23..d5c1a3208 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -30,6 +30,7 @@ #include #include #include +#include #include #include diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index d8f207f0a..5e950332f 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -44,6 +45,10 @@ #include #include #include +#include +#include +#include +#include #include "acqprogress.h" 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 #include #include +#include #include #include #include #include +#include #include #include diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc index 8c9a47913..339cbdf44 100644 --- a/cmdline/apt-mark.cc +++ b/cmdline/apt-mark.cc @@ -13,6 +13,7 @@ #include #include #include +#include #include diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 44b74cf6c..20ae14f2a 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include diff --git a/debian/changelog b/debian/changelog index 8a4994a32..aa98cfbd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ 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 - -- David Kalnischkies Mon, 19 Sep 2011 13:25:58 +0200 + -- David Kalnischkies Mon, 19 Sep 2011 19:13:48 +0200 apt (0.8.16~exp6) experimental; urgency=low diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc index 7d8718c56..c4db88811 100644 --- a/ftparchive/cachedb.cc +++ b/ftparchive/cachedb.cc @@ -18,6 +18,7 @@ #include #include #include +#include #include // htonl, etc diff --git a/ftparchive/cachedb.h b/ftparchive/cachedb.h index f2e1e19e4..377c41607 100644 --- a/ftparchive/cachedb.h +++ b/ftparchive/cachedb.h @@ -13,16 +13,16 @@ #define CACHEDB_H +#include #include -#include -#include #include #include #include - +#include + #include "contents.h" - + class CacheDB { protected: diff --git a/ftparchive/contents.h b/ftparchive/contents.h index cdd8abd5c..4af9db574 100644 --- a/ftparchive/contents.h +++ b/ftparchive/contents.h @@ -12,9 +12,10 @@ #include #include -#include #include +class debDebFile; + class GenContents { struct Node diff --git a/ftparchive/multicompress.h b/ftparchive/multicompress.h index 19e5065fa..5496b06d0 100644 --- a/ftparchive/multicompress.h +++ b/ftparchive/multicompress.h @@ -16,11 +16,10 @@ #ifndef MULTICOMPRESS_H #define MULTICOMPRESS_H - - -#include #include #include + +#include #include #include diff --git a/ftparchive/writer.h b/ftparchive/writer.h index a43b83876..76a3dfd1e 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -22,7 +22,6 @@ #include #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: @@ -81,6 +80,8 @@ class FTWScanner virtual ~FTWScanner() {}; }; +class MultiCompress; + class TranslationWriter { MultiCompress *Comp; diff --git a/methods/bzip2.cc b/methods/bzip2.cc index ad5db6cfb..8e7e46557 100644 --- a/methods/bzip2.cc +++ b/methods/bzip2.cc @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/methods/cdrom.cc b/methods/cdrom.cc index bc115d259..e7114b168 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/methods/connect.cc b/methods/connect.cc index ba2264faa..9a092a43c 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -15,6 +15,8 @@ #include #include +#include +#include #include #include diff --git a/methods/connect.h b/methods/connect.h index 0afa00919..bbe1bb35d 100644 --- a/methods/connect.h +++ b/methods/connect.h @@ -11,7 +11,8 @@ #define CONNECT_H #include -#include + +class pkgAcqMethod; bool Connect(std::string To,int Port,const char *Service,int DefPort, int &Fd,unsigned long TimeOut,pkgAcqMethod *Owner); diff --git a/methods/copy.cc b/methods/copy.cc index fe2918469..f8d58e479 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/methods/file.cc b/methods/file.cc index d58652e6e..5025c996d 100644 --- a/methods/file.cc +++ b/methods/file.cc @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/methods/ftp.cc b/methods/ftp.cc index 861647aea..2ca0ac6f7 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/methods/ftp.h b/methods/ftp.h index 7088e0954..2634f0732 100644 --- a/methods/ftp.h +++ b/methods/ftp.h @@ -10,6 +10,10 @@ #ifndef APT_FTP_H #define APT_FTP_H +#include + +#include + class FTPConn { char Buffer[1024*10]; diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 67cbd36a2..2b2aba017 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/methods/http.cc b/methods/http.cc index b60cfeb9e..0d81c73ed 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -288,6 +289,11 @@ void CircleBuf::Stats() clog << "Got " << InP << " in " << Diff << " at " << InP/Diff << endl;*/ } /*}}}*/ +CircleBuf::~CircleBuf() +{ + delete [] Buf; + delete Hash; +} // ServerState::ServerState - Constructor /*{{{*/ // --------------------------------------------------------------------- diff --git a/methods/http.h b/methods/http.h index 08823d1b1..c73d4df5c 100644 --- a/methods/http.h +++ b/methods/http.h @@ -13,12 +13,15 @@ #define MAXLEN 360 -#include +#include + +#include using std::cout; using std::endl; class HttpMethod; +class Hashes; class CircleBuf { @@ -80,7 +83,7 @@ class CircleBuf void Stats(); CircleBuf(unsigned long long Size); - ~CircleBuf() {delete [] Buf; delete Hash;}; + ~CircleBuf(); }; struct ServerState diff --git a/methods/https.cc b/methods/https.cc index 06a0e285a..e70206dfb 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include #include 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 URI Proxy; #endif diff --git a/methods/mirror.cc b/methods/mirror.cc index 61a7f12fd..3d5983efa 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -18,7 +18,8 @@ #include #include #include - +#include +#include #include #include 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 +#include +#include 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 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 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/rred.cc b/methods/rred.cc index 2a05acce1..ef00fcaa3 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/methods/rsh.cc b/methods/rsh.cc index add128c49..da9777fc4 100644 --- a/methods/rsh.cc +++ b/methods/rsh.cc @@ -14,6 +14,9 @@ #include #include +#include +#include +#include #include #include diff --git a/methods/rsh.h b/methods/rsh.h index 7bebe29a0..d7efa3f06 100644 --- a/methods/rsh.h +++ b/methods/rsh.h @@ -12,9 +12,9 @@ #include #include -#include -#include -#include + +class Hashes; +class FileFd; class RSHConn { @@ -50,6 +50,8 @@ class RSHConn ~RSHConn(); }; +#include + class RSHMethod : public pkgAcqMethod { virtual bool Fetch(FetchItem *Itm); diff --git a/test/interactive-helper/extract-control.cc b/test/interactive-helper/extract-control.cc index 29dcbf371..a1b3600aa 100644 --- a/test/interactive-helper/extract-control.cc +++ b/test/interactive-helper/extract-control.cc @@ -1,5 +1,6 @@ #include #include +#include #include #include diff --git a/test/interactive-helper/test_udevcdrom.cc b/test/interactive-helper/test_udevcdrom.cc index bbedc0ab5..88f5f0153 100644 --- a/test/interactive-helper/test_udevcdrom.cc +++ b/test/interactive-helper/test_udevcdrom.cc @@ -3,6 +3,7 @@ #include #include +#include int main() { diff --git a/test/interactive-helper/testextract.cc b/test/interactive-helper/testextract.cc index b790df618..f7ddb72f0 100644 --- a/test/interactive-helper/testextract.cc +++ b/test/interactive-helper/testextract.cc @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include #include -- cgit v1.2.3-70-g09d2 From 061c58b61ab5aae4689386bd2ab1e36e71470dfc Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 4 Oct 2011 00:14:38 +0200 Subject: * apt-pkg/policy.cc: - accept generic release pin expressions again in -t (Closes: #644166) --- apt-pkg/policy.cc | 3 ++- debian/changelog | 4 +++- .../test-bug-407511-fail-invalid-default-release | 23 ++++++++++++++++++++-- 3 files changed, 26 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 6a5130d48..a369bea83 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -64,7 +64,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) diff --git a/debian/changelog b/debian/changelog index 3c895813f..6a27ff49a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,8 +15,10 @@ apt (0.8.15.9) UNRELEASED; urgency=low - 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) - -- David Kalnischkies Wed, 21 Sep 2011 19:36:45 +0200 + -- David Kalnischkies Mon, 03 Oct 2011 23:35:40 +0200 apt (0.8.15.8) unstable; urgency=low 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 -- cgit v1.2.3-70-g09d2 From 7cb28948317e0d326c8663ec3c9ce995d5bf65e8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Oct 2011 22:45:22 +0200 Subject: * 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/aptconfiguration.cc | 6 +- apt-pkg/deb/debmetaindex.cc | 8 +- debian/changelog | 7 +- .../test-bug-624218-Translation-file-handling | 87 ++++++++++++++++++++++ test/libapt/assert.h | 15 ++++ test/libapt/getlanguages_test.cc | 12 ++- test/libapt/run-tests | 3 +- 7 files changed, 128 insertions(+), 10 deletions(-) create mode 100755 test/integration/test-bug-624218-Translation-file-handling (limited to 'test') diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index a0566e05e..7441b452c 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -142,7 +142,7 @@ std::vector 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") @@ -153,7 +153,7 @@ std::vector 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()) @@ -234,6 +234,8 @@ std::vector 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::const_iterator b = builtin.begin(); b != builtin.end(); ++b) diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index c509c29c7..5d3a80aa5 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -13,6 +13,7 @@ #include #include +#include using namespace std; @@ -201,7 +202,11 @@ vector * debReleaseIndex::ComputeIndexTargets() const { } } - std::vector const lang = APT::Configuration::getLanguages(true); + std::vector lang = APT::Configuration::getLanguages(true); + std::vector::iterator lend = std::remove(lang.begin(), lang.end(), "none"); + if (lend != lang.end()) + lang.erase(lend); + if (lang.empty() == true) return IndexTargets; @@ -213,7 +218,6 @@ vector * debReleaseIndex::ComputeIndexTargets() const { s != sections.end(); ++s) { for (std::vector::const_iterator l = lang.begin(); l != lang.end(); ++l) { - if (*l == "none") continue; IndexTarget * Target = new OptionalIndexTarget(); Target->ShortDesc = "Translation-" + *l; Target->MetaKey = TranslationIndexURISuffix(l->c_str(), *s); diff --git a/debian/changelog b/debian/changelog index f32f7a282..055268619 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,10 @@ apt (0.8.16~exp7) UNRELEASEDexperimental; urgency=low * 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) [ Michael Vogt ] * apt-pkg/contrib/configuration.cc: @@ -32,8 +36,7 @@ apt (0.8.16~exp7) UNRELEASEDexperimental; urgency=low * ftparchive/cachedb.cc: - fix buffersize in bytes2hex - - -- David Kalnischkies Wed, 05 Oct 2011 18:40:57 +0200 + -- David Kalnischkies Wed, 05 Oct 2011 22:40:25 +0200 apt (0.8.16~exp6) experimental; urgency=low 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/libapt/assert.h b/test/libapt/assert.h index fae9b6c64..ce5accc1c 100644 --- a/test/libapt/assert.h +++ b/test/libapt/assert.h @@ -54,6 +54,21 @@ void assertEqualsOr2(int const &expect1, int const &expect2, unsigned int const } +#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) { diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc index f6aa7a697..a1c801ea2 100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@ -126,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/run-tests b/test/libapt/run-tests index 8cb2e049c..ada2dc38b 100755 --- a/test/libapt/run-tests +++ b/test/libapt/run-tests @@ -64,7 +64,8 @@ do 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 -- cgit v1.2.3-70-g09d2 From d073d7db69eddd2d9c22e8ded7c6b871bca1716a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Oct 2011 23:00:47 +0200 Subject: cherrypick from my apt/experimental branch * 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/aptconfiguration.cc | 6 +- apt-pkg/deb/debmetaindex.cc | 8 +- debian/changelog | 4 + .../test-bug-624218-Translation-file-handling | 87 ++++++++++++++++++++++ test/libapt/assert.h | 15 ++++ test/libapt/getlanguages_test.cc | 12 ++- test/libapt/run-tests | 3 +- 7 files changed, 127 insertions(+), 8 deletions(-) create mode 100755 test/integration/test-bug-624218-Translation-file-handling (limited to 'test') diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 6ec5fa03a..bc385b2dc 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -140,7 +140,7 @@ std::vector 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 +151,7 @@ std::vector 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 +232,8 @@ std::vector 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::const_iterator b = builtin.begin(); b != builtin.end(); ++b) diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index f6c50742e..22effdc8f 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -9,6 +9,7 @@ #include #include +#include using namespace std; @@ -195,7 +196,11 @@ vector * debReleaseIndex::ComputeIndexTargets() const { } } - std::vector const lang = APT::Configuration::getLanguages(true); + std::vector lang = APT::Configuration::getLanguages(true); + std::vector::iterator lend = std::remove(lang.begin(), lang.end(), "none"); + if (lend != lang.end()) + lang.erase(lend); + if (lang.empty() == true) return IndexTargets; @@ -207,7 +212,6 @@ vector * debReleaseIndex::ComputeIndexTargets() const { s != sections.end(); ++s) { for (std::vector::const_iterator l = lang.begin(); l != lang.end(); ++l) { - if (*l == "none") continue; IndexTarget * Target = new OptionalIndexTarget(); Target->ShortDesc = "Translation-" + *l; Target->MetaKey = TranslationIndexURISuffix(l->c_str(), *s); diff --git a/debian/changelog b/debian/changelog index 6a27ff49a..7cd353718 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,10 @@ apt (0.8.15.9) UNRELEASED; urgency=low - 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) -- David Kalnischkies Mon, 03 Oct 2011 23:35:40 +0200 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/libapt/assert.h b/test/libapt/assert.h index fae9b6c64..ce5accc1c 100644 --- a/test/libapt/assert.h +++ b/test/libapt/assert.h @@ -54,6 +54,21 @@ void assertEqualsOr2(int const &expect1, int const &expect2, unsigned int const } +#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) { diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc index f6aa7a697..a1c801ea2 100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@ -126,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/run-tests b/test/libapt/run-tests index 275a789b2..9dad36f5b 100755 --- a/test/libapt/run-tests +++ b/test/libapt/run-tests @@ -64,7 +64,8 @@ do 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 = "CompareVersion${EXT}" ]; then tmppath="${DIR}/versions.lst" fi -- cgit v1.2.3-70-g09d2 From fa4d3cdc8a60e71fd3fef1c2a2cda6f80377445b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 11 Oct 2011 13:05:40 +0200 Subject: fix compiler warning about signed comparision on amd64, too --- test/libapt/assert.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/libapt/assert.h b/test/libapt/assert.h index ce5accc1c..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(expect, get, line); } +void assertEquals(unsigned long const &expect, int const &get, unsigned long const &line) { + if (get < 0) + OutputAssertEqual(expect, "==", get, line); + assertEquals(expect, get, line); +} + +void assertEquals(int const &expect, unsigned long const &get, unsigned long const &line) { + if (expect < 0) + OutputAssertEqual(expect, "==", get, line); + assertEquals(expect, get, line); +} + #define equalsOr2(x,y,z) assertEqualsOr2(y, z, x, __LINE__) -- cgit v1.2.3-70-g09d2 From ea65d079e19231eee2b9a167384fac33c1534290 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 11 Oct 2011 14:37:03 +0200 Subject: run integration tests on my new amd64 box without failures --- test/integration/framework | 28 ++++++++++++++++------ .../test-bug-590041-prefer-non-virtual-packages | 2 +- .../test-bug-595691-empty-and-broken-archive-files | 8 +------ .../test-bug-612099-multiarch-conflicts | 7 +----- test/integration/test-disappearing-packages | 14 +++++------ .../test-ubuntu-bug-761175-remove-purge | 8 +++---- 6 files changed, 35 insertions(+), 32 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index a2e71760e..b55f793a4 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -149,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 @@ -156,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 } @@ -275,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} @@ -298,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 @@ -408,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 @@ -465,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 @@ -715,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/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-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files index 5c103da6f..bb1ac0e54 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -13,7 +13,7 @@ setupflataptarchive testaptgetupdate() { 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-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-disappearing-packages b/test/integration/test-disappearing-packages index 82ba9e592..0e0e9618d 100755 --- a/test/integration/test-disappearing-packages +++ b/test/integration/test-disappearing-packages @@ -4,12 +4,12 @@ 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)" BUILDDIR="incoming/new-pkg-2.0" @@ -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-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... -- cgit v1.2.3-70-g09d2 From 2aa7df1d88017a7f0352e210b129889ad8b6f7f3 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 11 Oct 2011 14:44:05 +0200 Subject: run apt-get download in quiet mode as it messes with output otherwise --- test/integration/test-apt-get-download | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'test') 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 -- cgit v1.2.3-70-g09d2 From 5f4db009e50a254f1dd3edaac7b77fe31e1c5f6b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 11 Oct 2011 21:10:31 +0200 Subject: share description list between "same" versions (LP: #868977) --- apt-pkg/pkgcachegen.cc | 60 ++++++++++++++++------ debian/changelog | 3 +- .../test-bug-601016-description-translation | 34 +++++++++++- 3 files changed, 80 insertions(+), 17 deletions(-) (limited to 'test') diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 5147d7547..3545517fe 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -38,6 +38,9 @@ typedef vector::iterator FileIterator; template std::vector pkgCacheGenerator::Dynamic::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 */ @@ -242,8 +245,11 @@ bool pkgCacheGenerator::MergeList(ListParser &List, 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 _error->Error("Information merge for non-existent group %s requested", GrpName.c_str()); + return true; Dynamic DynGrp(Grp); pkgCache::PkgIterator Pkg; @@ -268,6 +274,7 @@ bool pkgCacheGenerator::MergeListPackage(ListParser &List, pkgCache::PkgIterator // 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) { @@ -275,15 +282,9 @@ bool pkgCacheGenerator::MergeListPackage(ListParser &List, pkgCache::PkgIterator Dynamic DynDesc(Desc); map_ptrloc *LastDesc = &Ver->DescriptionList; - // don't add a new description if we have one for the given // md5 && language - bool duplicate = false; - for ( ; Desc.end() == false; ++Desc) - if (MD5SumValue(Desc.md5()) == CurMd5 && - Desc.LanguageCode() == List.DescriptionLanguage()) - duplicate=true; - if (duplicate == true) + if (IsDuplicateDescription(Desc, CurMd5, CurLang) == true) continue; for (Desc = Ver.DescriptionList(); @@ -295,7 +296,7 @@ bool pkgCacheGenerator::MergeListPackage(ListParser &List, pkgCache::PkgIterator // Add new description void const * const oldMap = Map.Data(); - map_ptrloc const descindex = NewDescription(Desc, List.DescriptionLanguage(), CurMd5, *LastDesc); + map_ptrloc const descindex = NewDescription(Desc, CurLang, CurMd5, *LastDesc); if (oldMap != Map.Data()) LastDesc += (map_ptrloc*) Map.Data() - (map_ptrloc*) oldMap; *LastDesc = descindex; @@ -391,16 +392,34 @@ bool pkgCacheGenerator::MergeListVersion(ListParser &List, pkgCache::PkgIterator return true; } - /* Record the Description data. Description data always exist in - Packages and Translation-* files. */ + /* 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 */ + pkgCache::GrpIterator Grp = Pkg.Group(); + 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; + } + } + + // We haven't found reusable descriptions, so add the first description pkgCache::DescIterator Desc = Ver.DescriptionList(); Dynamic DynDesc(Desc); map_ptrloc *LastDesc = &Ver->DescriptionList; - // Skip to the end of description set - for (; Desc.end() == false; LastDesc = &Desc->NextDesc, ++Desc); - - // Add new description oldMap = Map.Data(); map_ptrloc const descindex = NewDescription(Desc, List.DescriptionLanguage(), List.Description_md5(), *LastDesc); if (oldMap != Map.Data()) @@ -1403,3 +1422,14 @@ bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **O return true; } /*}}}*/ +// IsDuplicateDescription /*{{{*/ +bool IsDuplicateDescription(pkgCache::DescIterator Desc, + MD5SumValue const &CurMd5, std::string const &CurLang) +{ + for ( ; Desc.end() == false; ++Desc) + if (MD5SumValue(Desc.md5()) == CurMd5 && Desc.LanguageCode() == CurLang) + return true; + return false; +} + /*}}}*/ + diff --git a/debian/changelog b/debian/changelog index 1e5babe41..b7f199609 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,7 @@ apt (0.8.16~exp7) UNRELEASEDexperimental; urgency=low - 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) [ Michael Vogt ] * apt-pkg/contrib/configuration.cc: @@ -38,7 +39,7 @@ apt (0.8.16~exp7) UNRELEASEDexperimental; urgency=low * ftparchive/cachedb.cc: - fix buffersize in bytes2hex - -- David Kalnischkies Tue, 11 Oct 2011 18:32:13 +0200 + -- David Kalnischkies Tue, 11 Oct 2011 21:07:38 +0200 apt (0.8.16~exp6) experimental; urgency=low diff --git a/test/integration/test-bug-601016-description-translation b/test/integration/test-bug-601016-description-translation index 44ab91900..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 +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,6 +67,13 @@ 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 @@ -60,6 +81,8 @@ testrun() { 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 -- cgit v1.2.3-70-g09d2 From 28f7a8f269d704779d1eb192da0e052444064693 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 17 Oct 2011 11:21:12 +0200 Subject: create "real" testcases out of the tests for chris --- test/integration/test-conflicts-loop | 19 ++++++++++++++++++- test/integration/test-package-reinstallation | 8 +++++++- test/integration/test-provides-gone-with-upgrade | 22 +--------------------- 3 files changed, 26 insertions(+), 23 deletions(-) (limited to 'test') diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop index f76c016fb..7b5724d74 100755 --- a/test/integration/test-conflicts-loop +++ b/test/integration/test-conflicts-loop @@ -15,4 +15,21 @@ insertpackage 'unstable' 'openjdk-6-jre-headless' 'i386' '6b20-1.9.8-0ubuntu1~10 setupaptarchive -aptget dist-upgrade -s -o Debug::pkgPackageManager=true -o Debug::pkgDpkgPM=true -o APT::Immediate-Configure-All=true +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-package-reinstallation b/test/integration/test-package-reinstallation index 359f69284..b4f2061ec 100755 --- a/test/integration/test-package-reinstallation +++ b/test/integration/test-package-reinstallation @@ -14,4 +14,10 @@ insertinstalledpackage 'apt' 'i386' '0.8.15' 'Depends: libc6' setupaptarchive -aptget install --reinstall libc6 libc-bin -s -o Debug::pkgPackageManager=1 +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-provides-gone-with-upgrade b/test/integration/test-provides-gone-with-upgrade index ece2eaa41..70384ce29 100755 --- a/test/integration/test-provides-gone-with-upgrade +++ b/test/integration/test-provides-gone-with-upgrade @@ -13,26 +13,6 @@ 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 libapt-pkg4.10 (0.8.15 unstable [i386]) [libapt-pkg4.10:i386 on apt:i386] [] -#Conf libapt-pkg4.10:i386 broken -# Breaks:apt:i386 -# [] -#Inst apt [0.8.14] (0.8.15 unstable [i386]) -#Conf apt (0.8.15 unstable [i386]) -#E: Conf Broken libapt-pkg4.10:i386' -aptget dist-upgrade -s -o Debug::pkgPackageManager=1 -# the solution by dpkg will be to deconfigure apt with the configuration of libapt-pkg4.10 - -exit 0 - -#FIXME: a good result would be this instead, but it requires that APT can delay his immediate configuration… testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: @@ -40,7 +20,7 @@ The following NEW packages will be installed: 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]) -Inst apt [0.8.14] (0.8.15 unstable [i386]) Conf apt (0.8.15 unstable [i386])' aptget dist-upgrade -s -- cgit v1.2.3-70-g09d2