X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/700616ab8792227768cd73aa28eb69b8010ac90a..66706285737a895d0baf64c2387c58d5211be4f9:/cmdline/apt-get.cc diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 4e307b657..999f2a6a7 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1255,7 +1255,9 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, { if (_config->FindB("APT::Get::Trivial-Only",false) == true) return _error->Error(_("Trivial Only specified but this is not a trivial operation.")); - + + // TRANSLATOR: This string needs to be typed by the user as a confirmation, so be + // careful with hard to type or special characters (like non-breaking spaces) const char *Prompt = _("Yes, do as I say!"); ioprintf(c2out, _("You are about to do something potentially harmful.\n" @@ -1734,7 +1736,7 @@ bool DoAutomaticRemove(CacheFile &Cache) { if(Pkg.CurrentVer() != 0 && Pkg->CurrentState != pkgCache::State::ConfigFiles) - Cache->MarkDelete(Pkg, purgePkgs); + Cache->MarkDelete(Pkg, purgePkgs, 0, false); else Cache->MarkKeep(Pkg, false, false); } @@ -1748,7 +1750,7 @@ bool DoAutomaticRemove(CacheFile &Cache) { if (Pkg.CandVersion() != 0) tooMuch.insert(Pkg); - Cache->MarkDelete(Pkg, false); + Cache->MarkDelete(Pkg, false, 0, false); } // only show stuff in the list that is not yet marked for removal else if(hideAutoRemove == false && Cache[Pkg].Delete() == false) @@ -1785,7 +1787,7 @@ bool DoAutomaticRemove(CacheFile &Cache) continue; if (Debug == true) std::clog << "Save " << Pkg << " as another installed garbage package depends on it" << std::endl; - Cache->MarkInstall(Pkg, false); + Cache->MarkInstall(Pkg, false, 0, false); if (hideAutoRemove == false) ++autoRemoveCount; tooMuch.erase(Pkg); @@ -1910,7 +1912,6 @@ bool DoInstall(CommandLine &CmdL) return false; } - unsigned short const order[] = { MOD_REMOVE, MOD_INSTALL, 0 }; TryToInstall InstallAction(Cache, Fix, BrokenFix); TryToRemove RemoveAction(Cache, Fix); @@ -1918,6 +1919,7 @@ bool DoInstall(CommandLine &CmdL) // new scope for the ActionGroup { pkgDepCache::ActionGroup group(Cache); + unsigned short const order[] = { MOD_REMOVE, MOD_INSTALL, 0 }; for (unsigned short i = 0; order[i] != 0; ++i) { @@ -2021,7 +2023,7 @@ bool DoInstall(CommandLine &CmdL) /* Print out a list of suggested and recommended packages */ { - string SuggestsList, RecommendsList, List; + string SuggestsList, RecommendsList; string SuggestsVersions, RecommendsVersions; for (unsigned J = 0; J < Cache->Head().PackageCount; J++) { @@ -2393,7 +2395,7 @@ bool DoDownload(CommandLine &CmdL) HashString hash; if (rec.SHA512Hash() != "") hash = HashString("sha512", rec.SHA512Hash()); - if (rec.SHA256Hash() != "") + else if (rec.SHA256Hash() != "") hash = HashString("sha256", rec.SHA256Hash()); else if (rec.SHA1Hash() != "") hash = HashString("sha1", rec.SHA1Hash()); @@ -2712,7 +2714,7 @@ bool DoSource(CommandLine &CmdL) { string buildopts = _config->Find("APT::Get::Host-Architecture"); if (buildopts.empty() == false) - buildopts = "-a " + buildopts + " "; + buildopts = "-a" + buildopts + " "; buildopts.append(_config->Find("DPkg::Build-Options","-b -uc")); // Call dpkg-buildpackage