]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-install.cc
tests: use SHA1 checksum only by default in tests
[apt.git] / apt-private / private-install.cc
index 844fcbc7e0c52d32e0959f8c7e0a5a0fb7d74b32..28b8d9a7b7abe5dff374fb5a64c2a2a8a3b4fee1 100644 (file)
@@ -560,13 +560,8 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
 
       if (Fix != NULL && _config->FindB("APT::Get::AutoSolving", true) == true)
       {
-         for (unsigned short i = 0; order[i] != 0; ++i)
-         {
-           if (order[i] != MOD_INSTALL)
-              continue;
-           InstallAction.propergateReleaseCandiateSwitching(helper.selectedByRelease, c0out);
-           InstallAction.doAutoInstall();
-        }
+        InstallAction.propergateReleaseCandiateSwitching(helper.selectedByRelease, c0out);
+        InstallAction.doAutoInstall();
       }
 
       if (_error->PendingError() == true)
@@ -675,6 +670,18 @@ bool DoInstall(CommandLine &CmdL)
    
    std::map<unsigned short, APT::VersionSet> verset;
 
+   for (const char **I = CmdL.FileList; *I != 0; I++) {
+      // Check for local pkgs like in the loop above.
+      if(!FileExists(*I) || flExtension(*I) != "deb")
+        continue;
+
+      pkgCache::PkgIterator pkg = Cache->FindPkg(*I);
+
+      // Set any version providing the .deb as the candidate.
+      for (auto Prv = pkg.ProvidesList(); Prv.end() == false; Prv++)
+        Cache.GetDepCache()->SetCandidateVersion(Prv.OwnerVer());
+   }
+
    if(!DoCacheManipulationFromCommandLine(CmdL, Cache, verset, 0))
       return false;