summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-20 14:17:08 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-20 14:17:08 +0200
commit95689ededb9738b0c4ec6ebf1add3b79595cc39a (patch)
treebc012486b38bf7d4029b5b97c776b66d311a1e5c /apt-pkg/depcache.cc
parentc64eacb78ffcdcd26602e9598b953f801724968c (diff)
* apt-pkg/depcache.{cc,h}:
- added OnlyInstalled option to writeState() * debian/changelog: - prepared nwe upload
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 15d7bac43..b8c996c58 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -179,7 +179,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog)
return true;
}
-bool pkgDepCache::writeStateFile(OpProgress *prog)
+bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)
{
if(_config->FindB("Debug::pkgAutoRemove",false))
std::clog << "pkgDepCache::writeStateFile()" << std::endl;
@@ -241,6 +241,9 @@ bool pkgDepCache::writeStateFile(OpProgress *prog)
std::clog << "Skipping already written " << pkg.Name() << std::endl;
continue;
}
+ // skip not installed ones if requested
+ if(InstalledOnly && pkg->CurrentVer == 0)
+ continue;
if(_config->FindB("Debug::pkgAutoRemove",false))
std::clog << "Writing new AutoInstall: "
<< pkg.Name() << std::endl;