summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Zini <enrico@enricozini.org>2010-07-15 09:39:22 +0100
committerEnrico Zini <enrico@enricozini.org>2010-07-15 09:39:22 +0100
commitd69d5c6d6ff3b10ea9f3910024dcfaba85df91a0 (patch)
tree473c935697d912a2d1f237ef5e6cf0916a380ea4
parent95b7bfe5eaa069bf48e19d50067a99faa00b8034 (diff)
downloadlibept-d69d5c6d6ff3b10ea9f3910024dcfaba85df91a0.tar.gz
More debugging prints, and removed a useless constructor
-rw-r--r--CMakeLists.txt2
-rw-r--r--debian/changelog6
-rw-r--r--ept/apt/apt.cc22
3 files changed, 21 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5418d95..c24dcde 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ include( FindDoxygen )
add_custom_target( unit )
-set( EPT_VERSION "1.0.2+test1" )
+set( EPT_VERSION "1.0.2+test2" )
set( APT_INCLUDES "/usr/include/" CACHE STRING "apt include path" )
set( APT_LINKDIRS "/usr/lib/" CACHE STRING "apt library path" )
set( OPT_FLAGS "-O0 -g" CACHE STRING "optimization level" )
diff --git a/debian/changelog b/debian/changelog
index 993cfd6..4161bde 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libept (1.0.2+test2) experimental; urgency=low
+
+ * More debugging prints, and removed a useless constructor
+
+ -- Enrico Zini <enrico@debian.org> Thu, 15 Jul 2010 09:39:01 +0100
+
libept (1.0.2+test1) experimental; urgency=low
* Improved one assertion, added more prints, try a workaround
diff --git a/ept/apt/apt.cc b/ept/apt/apt.cc
index a7ef749..64a3bab 100644
--- a/ept/apt/apt.cc
+++ b/ept/apt/apt.cc
@@ -182,17 +182,20 @@ struct RecordIteratorImpl
FileFd file;
size_t lastOffset;
- RecordIteratorImpl(AptImplementation& apt) : _ref(0), apt(apt), vflist(0)
+ 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" << endl;
if (pi->VersionList == 0)
continue;
+cerr << "RIImpl HASVER" << endl;
/* Get the candidate version or fallback on the installed version,
* as usual */
pkgCache::VerIterator vi = apt.policy().GetCandidateVer(pi);
@@ -203,16 +206,19 @@ struct RecordIteratorImpl
vi = pi.CurrentVer();
}
+cerr << "RIImpl CHOSENVER" << endl;
// Choose a valid file that contains the record for this version
pkgCache::VerFileIterator vfi = vi.FileList();
for ( ; !vfi.end(); ++vfi)
if ((vfi.File()->Flags & pkgCache::Flag::NotSource) == 0)
break;
+cerr << "RIImpl ASKEDFILE" << endl;
// Handle packages whose candidate version is currently installed
// 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,16 +238,16 @@ struct RecordIteratorImpl
vflist.push_back(vfi);
}
- //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()