]> git.saurik.com Git - apt.git/commitdiff
use FindB instead of FindI for Debug::pkgAutoRemove
authorDavid Kalnischkies <david@kalnischkies.de>
Fri, 30 Dec 2016 23:09:11 +0000 (00:09 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Sat, 31 Dec 2016 01:29:21 +0000 (02:29 +0100)
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

apt-pkg/algorithms.cc
apt-private/private-install.cc

index 65c5ff85d9f89a229999738a74045e8a01833fd2..4e651a9f32316b87150f53dab96e041459a7ef37 100644 (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;
         }
index e3fe4696059163a9b265cdd16edfd15443f47987..b49c7f2efb29dcf79dbcc8c2745ee76340a2a3b4 100644 (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");