From b29c448254fbc2000ea986a828cc6ec7dbbe41aa Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 9 Nov 2012 10:49:21 +0100 Subject: * cmdline/apt-get.cc: - do not call Mark{Install,Delete} from the autoremove code with the FromUser bit set to avoid modifying the auto-installed bit --- cmdline/apt-get.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 6890b7120..1bb981b20 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1736,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); } @@ -1750,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) @@ -1787,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); -- cgit v1.2.3 From ee5f5d257c6ad59c9b3ef8c55d61ffb293be847c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 14 Jan 2013 06:31:51 +0100 Subject: ensure sha512 is really used when available (thanks to Tyler Hicks ) --- cmdline/apt-get.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 1bb981b20..e3c74a099 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2395,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()); -- cgit v1.2.3 From 69c2ecbdc937e3c73fe67d3c9bce12a80d3ec7ec Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 10 Mar 2013 12:24:13 +0100 Subject: various simple changes to fix cppcheck warnings --- cmdline/apt-get.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index e3c74a099..5e6f50d41 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1912,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); @@ -1920,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) { @@ -2023,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++) { -- cgit v1.2.3 From c510253888191fe9537559ad2fdd982dc3fd89eb Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 25 Mar 2013 08:52:20 +0100 Subject: merge patch from Daniel Hartwig --- cmdline/apt-get.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index e3c74a099..64b062ea4 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2714,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 -- cgit v1.2.3