Browse Source

use FindB instead of FindI for Debug::pkgAutoRemove

Again no practical difference, but for consistency a boolean option
should really be accessed via a boolean method rather than an int
especially if you happen to try setting the option to "true" …

Gbp-Dch: Ignore
tags/debian/1.4_beta3
David Kalnischkies 4 years ago
parent
commit
c15ba854b6
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      apt-pkg/algorithms.cc
  2. +1
    -1
      apt-private/private-install.cc

+ 1
- 1
apt-pkg/algorithms.cc View File

@@ -1144,7 +1144,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
pkgCache::PkgIterator I = Cache.PkgBegin();
for (;I.end() != true; ++I) {
if (Cache[I].NewInstall() && !(Flags[I->ID] & PreInstalled)) {
if(_config->FindI("Debug::pkgAutoRemove",false)) {
if(_config->FindB("Debug::pkgAutoRemove",false)) {
std::clog << "Resolve installed new pkg: " << I.FullName(false)
<< " (now marking it as auto)" << std::endl;
}


+ 1
- 1
apt-private/private-install.cc View File

@@ -396,7 +396,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
/* Remove unused automatic packages */
bool DoAutomaticRemove(CacheFile &Cache)
{
bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
bool Debug = _config->FindB("Debug::pkgAutoRemove",false);
bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
bool hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove");



Loading…
Cancel
Save