/* Set the current state of everything. In this state all of the
packages are kept exactly as is. See AllUpgrade */
int Done = 0;
/* Set the current state of everything. In this state all of the
packages are kept exactly as is. See AllUpgrade */
int Done = 0;
while(tagfile.Step(section)) {
string pkgname = section.FindS("Package");
pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname);
while(tagfile.Step(section)) {
string pkgname = section.FindS("Package");
pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname);
short reason = section.FindI("Auto-Installed", 0);
if(reason > 0)
PkgState[pkg->ID].Flags |= Flag::Auto;
short reason = section.FindI("Auto-Installed", 0);
if(reason > 0)
PkgState[pkg->ID].Flags |= Flag::Auto;
for(pkgCache::PkgIterator pkg=Cache->PkgBegin(); !pkg.end(); pkg++) {
if(PkgState[pkg->ID].Flags & Flag::Auto) {
if (pkgs_seen.find(pkg.Name()) != pkgs_seen.end()) {
for(pkgCache::PkgIterator pkg=Cache->PkgBegin(); !pkg.end(); pkg++) {
if(PkgState[pkg->ID].Flags & Flag::Auto) {
if (pkgs_seen.find(pkg.Name()) != pkgs_seen.end()) {
std::clog << "Skipping already written " << pkg.Name() << std::endl;
continue;
}
// skip not installed ones if requested
if(InstalledOnly && pkg->CurrentVer == 0)
continue;
std::clog << "Skipping already written " << pkg.Name() << std::endl;
continue;
}
// skip not installed ones if requested
if(InstalledOnly && pkg->CurrentVer == 0)
continue;