summaryrefslogtreecommitdiff
path: root/ept/apt
diff options
context:
space:
mode:
authorEnrico Zini <enrico@enricozini.org>2010-07-15 13:15:40 +0100
committerEnrico Zini <enrico@enricozini.org>2010-07-15 13:15:40 +0100
commite06b943f52df45fba361ec1e22f3e8da923df4cc (patch)
treede995a7b834a212833c2f2fcaa8c350f7dab7664 /ept/apt
parent4fc16e3394e349feb99ac9fe12f6d8d2875735f9 (diff)
downloadlibept-e06b943f52df45fba361ec1e22f3e8da923df4cc.tar.gz
Removed debugging output and upload to unstable.
Diffstat (limited to 'ept/apt')
-rw-r--r--ept/apt/apt.cc25
-rw-r--r--ept/apt/apt.test.h13
2 files changed, 12 insertions, 26 deletions
diff --git a/ept/apt/apt.cc b/ept/apt/apt.cc
index 342190e..76c34f0 100644
--- a/ept/apt/apt.cc
+++ b/ept/apt/apt.cc
@@ -184,14 +184,12 @@ struct RecordIteratorImpl
RecordIteratorImpl(AptImplementation& apt) : _ref(0), apt(apt)
{
-cerr << "RIImpl PC " << apt.cache().HeaderP->PackageCount + 1 << endl;
// We already have an estimate of how many versions we're about to find
vflist.reserve(apt.cache().HeaderP->PackageCount + 1);
// Populate the vector of versions to print
for (pkgCache::PkgIterator pi = apt.cache().PkgBegin(); !pi.end(); ++pi)
{
-cerr << "RIImpl HASPKG " << pi.Name() << endl;
if (pi->VersionList == 0)
continue;
@@ -205,7 +203,6 @@ cerr << "RIImpl HASPKG " << pi.Name() << endl;
vi = pi.CurrentVer();
}
-cerr << "RIImpl CHOSENVER " << (vi.VerStr() ? vi.VerStr() : "(null)") << " FOR " << (vi.Arch() ? vi.Arch() : "(null)") << endl;
// Choose a valid file that contains the record for this version
pkgCache::VerFileIterator vfi = vi.FileList();
for ( ; !vfi.end(); ++vfi)
@@ -216,7 +213,6 @@ cerr << "RIImpl CHOSENVER " << (vi.VerStr() ? vi.VerStr() : "(null)") << " FOR
// from outside the archives (like from a locally built .deb
if (vfi.end() == true)
{
-cerr << "RIImpl LOCALPKG" << endl;
for (pkgCache::VerIterator cur = pi.VersionList(); cur.end() != true; cur++)
{
for (vfi = cur.FileList(); vfi.end() == false; vfi++)
@@ -232,27 +228,20 @@ cerr << "RIImpl LOCALPKG" << endl;
break;
}
}
- else
-/**/ cerr << "RIImpl HASFILE" << endl;
if (!vfi.end())
- {
vflist.push_back(vfi);
-/**/ cerr << "RIImpl TAKEN" << endl;
- }
- else
-/**/ cerr << "RIImpl SKIPPED" << endl;
}
- cerr << vflist.size() << " versions found" << endl;
+ //cerr << vflist.size() << " versions found" << endl;
sort(vflist.begin(), vflist.end(), localityCompare);
- for (size_t i = 0; i < vflist.size(); ++i)
- {
- pkgCache::PkgFileIterator fi(apt.cache(), vflist[i]->File + apt.cache().PkgFileP);
- cerr << i << ": " << fi.FileName() << ":" << vflist[i]->Offset << "-" << vflist[i]->Size << endl;
- }
- cerr << "Done indexing." << endl;
+ //for (size_t i = 0; i < vflist.size(); ++i)
+ //{
+ // pkgCache::PkgFileIterator fi(apt.cache(), vflist[i]->File + apt.cache().PkgFileP);
+ // cerr << i << ": " << fi.FileName() << ":" << vflist[i]->Offset << "-" << vflist[i]->Size << endl;
+ //}
+ //cerr << "Done indexing." << endl;
}
~RecordIteratorImpl()
diff --git a/ept/apt/apt.test.h b/ept/apt/apt.test.h
index 0e88eb9..ff4f315 100644
--- a/ept/apt/apt.test.h
+++ b/ept/apt/apt.test.h
@@ -109,18 +109,16 @@ struct TestApt : AptTestEnvironment {
// Check the raw record accessor
Test rawRecord()
{
- string pkg("autobook");
+ string pkg("sp");
Version ver = apt.candidateVersion(pkg);
- cerr << "CAND VER " << ver.name() << " v " << ver.version() << endl;
- assert(ver.isValid());
+ assert(ver.isValid());
assert(apt.validate(ver) == ver);
string record = apt.rawRecord(ver);
- cerr << "GOT RECORD:" << endl << record << "---------" << endl;
- assert(record.find("Package: autobook") != string::npos);
- assert(record.find("Section: doc") != string::npos);
+ assert(record.find("Package: sp") != string::npos);
+ assert(record.find("Section: text") != string::npos);
- record = apt.rawRecord(Version("autobook", "0.31415"));
+ record = apt.rawRecord(Version("sp", "0.31415"));
assert_eq(record, string());
assert_eq(apt.rawRecord(pkg), apt.rawRecord(apt.anyVersion(pkg)));
@@ -144,7 +142,6 @@ struct TestApt : AptTestEnvironment {
for (Apt::record_iterator i = apt.recordBegin();
i != apt.recordEnd(); ++i)
{
- cerr << "DEBUG Iterate record " << count << endl;
assert((*i).size() > 8);
assert_eq((*i).substr(0, 8), "Package:");
++count;