X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/1040dc888db00fdb0fe059e6b847fdc88fe53d80..05ef357e575e9c25eb6a35cb693d1eb19bb14d45:/apt-private/private-install.cc diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 844fcbc7e..28b8d9a7b 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -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 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;