summaryrefslogtreecommitdiff
path: root/ept
diff options
context:
space:
mode:
authorEnrico Zini <enrico@enricozini.org>2010-07-15 11:57:46 +0100
committerEnrico Zini <enrico@enricozini.org>2010-07-15 11:57:46 +0100
commitc2ac9b1b238686e521142b7898b6e3073d0e60c2 (patch)
treedb77b8ebba66e000871bae57697695807d616b3c /ept
parentd69d5c6d6ff3b10ea9f3910024dcfaba85df91a0 (diff)
downloadlibept-c2ac9b1b238686e521142b7898b6e3073d0e60c2.tar.gz
More debug info
Diffstat (limited to 'ept')
-rw-r--r--ept/CMakeLists.txt6
-rw-r--r--ept/apt/apt.cc15
2 files changed, 16 insertions, 5 deletions
diff --git a/ept/CMakeLists.txt b/ept/CMakeLists.txt
index ed9b6c7..8965407 100644
--- a/ept/CMakeLists.txt
+++ b/ept/CMakeLists.txt
@@ -57,6 +57,12 @@ string( REPLACE "\n" "" ARCH "${ARCH}" )
add_custom_command(
OUTPUT ${datastamp}
+ COMMAND echo "Apt config"
+ COMMAND apt-config dump
+ COMMAND echo -n "Dumpavail count: "
+ COMMAND apt-cache dumpavail |grep -c ^Package
+ COMMAND echo -n "Installed count: "
+ COMMAND dpkg -l |grep -c ^ii
COMMAND mkdir -p test-env/etc test-env/state/lists/partial
test-env/cache test-env/debtags
test-env/cache/archives/partial test-env/desktop
diff --git a/ept/apt/apt.cc b/ept/apt/apt.cc
index 64a3bab..342190e 100644
--- a/ept/apt/apt.cc
+++ b/ept/apt/apt.cc
@@ -191,11 +191,10 @@ cerr << "RIImpl PC " << apt.cache().HeaderP->PackageCount + 1 << endl;
// Populate the vector of versions to print
for (pkgCache::PkgIterator pi = apt.cache().PkgBegin(); !pi.end(); ++pi)
{
-cerr << "RIImpl HASPKG" << endl;
+cerr << "RIImpl HASPKG " << pi.Name() << 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);
@@ -206,19 +205,18 @@ cerr << "RIImpl HASVER" << endl;
vi = pi.CurrentVer();
}
-cerr << "RIImpl CHOSENVER" << endl;
+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)
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;
+cerr << "RIImpl LOCALPKG" << endl;
for (pkgCache::VerIterator cur = pi.VersionList(); cur.end() != true; cur++)
{
for (vfi = cur.FileList(); vfi.end() == false; vfi++)
@@ -234,8 +232,15 @@ 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;