]> git.saurik.com Git - apt.git/commitdiff
edsp: if internal is used, keep this decision
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 8 Jun 2016 08:56:14 +0000 (10:56 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Wed, 8 Jun 2016 11:07:21 +0000 (13:07 +0200)
It wasn't noticeable before, but now with the (optional) logging it can
be observed that we decide in the internal path two times if an internal
or external solver should be used (and hence with logging, it is
attempted twice), so if we are in the internal path call the internal
resolver directly, which means those internal methods need to be public
– but we can hide them based on the symbol at least.

apt-pkg/algorithms.h
apt-pkg/upgrade.cc

index 5b0d8fb2997ed29c01c85976517c0bbfaa0a20bf..c1a26587dcc994bf16a5566f84a4a9cadec6726a 100644 (file)
@@ -124,9 +124,6 @@ class pkgProblemResolver                                            /*{{{*/
    APT_HIDDEN void MakeScores();
    APT_HIDDEN bool DoUpgrade(pkgCache::PkgIterator Pkg);
 
-   APT_HIDDEN bool ResolveInternal(bool const BrokenFix = false);
-   APT_HIDDEN bool ResolveByKeepInternal();
-
    protected:
    bool InstOrNewPolicyBroken(pkgCache::PkgIterator Pkg);
 
@@ -138,9 +135,11 @@ class pkgProblemResolver                                           /*{{{*/
 
    // Try to intelligently resolve problems by installing and removing packages
    bool Resolve(bool BrokenFix = false, OpProgress * const Progress = NULL);
+   APT_HIDDEN bool ResolveInternal(bool const BrokenFix = false);
 
    // Try to resolve problems only by using keep
    bool ResolveByKeep(OpProgress * const Progress = NULL);
+   APT_HIDDEN bool ResolveByKeepInternal();
 
    APT_DEPRECATED_MSG("NOOP as MarkInstall enforces not overriding FromUser markings") void InstallProtect();
 
index 8ba48e7867cc4bf8e1e703802023fc8aa6f57f79..c3be9b64f88e1877c95ac93385cc8912a7c6c306 100644 (file)
@@ -115,7 +115,7 @@ static bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
       }
    }
 
-   bool const success = Fix.Resolve(false, Progress);
+   bool const success = Fix.ResolveInternal(false);
    if (Progress != NULL)
       Progress->Done();
    return success;
@@ -158,7 +158,7 @@ static bool pkgAllUpgradeNoNewPackages(pkgDepCache &Cache, OpProgress * const Pr
       Progress->Progress(50);
 
    // resolve remaining issues via keep
-   bool const success = Fix.ResolveByKeep(Progress);
+   bool const success = Fix.ResolveByKeepInternal();
    if (Progress != NULL)
       Progress->Done();
    return success;
@@ -218,7 +218,7 @@ static bool pkgAllUpgradeWithNewPackages(pkgDepCache &Cache, OpProgress * const
       Progress->Progress(60);
 
    // resolve remaining issues via keep
-   bool const success = Fix.ResolveByKeep(Progress);
+   bool const success = Fix.ResolveByKeepInternal();
    if (Progress != NULL)
       Progress->Done();
    return success;