|
|
@@ -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;
|