]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/policy.cc
apt-pkg/tagfile.h: Include stdint.h, fixes rdep build failures
[apt.git] / apt-pkg / policy.cc
index eaa72f084159c6ada1312bc5a7d480daa9597dd4..a1e903178a65ea831df6aae9d3901be4958765ec 100644 (file)
@@ -33,6 +33,7 @@
 #include <string>
 #include <vector>
 #include <iostream>
+#include <sstream>
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -235,15 +236,15 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVerNew(pkgCache::PkgIterator const
    pkgVersioningSystem *vs = Cache->VS;
 
    for (pkgCache::VerIterator ver = Pkg.VersionList(); ver.end() == false; ver++) {
-      int priority = GetPriority(ver);
+      int priority = GetPriority(ver, true);
 
-        if (priority == 0 || priority <= candPriority)
-           continue;
+      if (priority == 0 || priority <= candPriority)
+        continue;
 
-        // TODO: Maybe optimize to not compare versions
-        if (!cur.end() && priority < 1000
-           && (vs->CmpVersion(ver.VerStr(), cur.VerStr()) < 0))
-           continue;
+      // TODO: Maybe optimize to not compare versions
+      if (!cur.end() && priority < 1000
+         && (vs->CmpVersion(ver.VerStr(), cur.VerStr()) < 0))
+        continue;
 
       candPriority = priority;
       cand = ver;