- short reason = section.FindI("Remove-Reason",
- pkgCache::State::RemoveManual);
- PkgState[pkg->ID].AutomaticRemove = reason;
- //std::cout << "Set: " << pkgname << " to " << reason << std::endl;
+ short reason = section.FindI("Install-Reason", 0);
+ if(reason > 0)
+ PkgState[pkg->ID].Flags |= pkgCache::Flag::Auto;
+ if(_config->FindB("Debug::pkgAutoRemove",false))
+ std::cout << "Install-Reason for: " << pkgname
+ << " is " << reason << std::endl;