summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-cmndline.cc4
-rw-r--r--apt-private/private-download.cc2
-rw-r--r--apt-private/private-install.cc6
-rw-r--r--apt-private/private-json-hooks.cc2
4 files changed, 10 insertions, 4 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc
index 5ad3b65d3..101e0ae40 100644
--- a/apt-private/private-cmndline.cc
+++ b/apt-private/private-cmndline.cc
@@ -176,7 +176,7 @@ static bool addArgumentsAPTHelper(std::vector<CommandLine::Args> &Args, char con
static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const * const Cmd)/*{{{*/
{
if (CmdMatches("install", "remove", "purge", "upgrade", "dist-upgrade",
- "dselect-upgrade", "autoremove", "full-upgrade"))
+ "dselect-upgrade", "autoremove", "autopurge", "full-upgrade"))
{
addArg(0, "show-progress", "DpkgPM::Progress", 0);
addArg('f', "fix-broken", "APT::Get::Fix-Broken", 0);
@@ -240,7 +240,7 @@ static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const
addArg(0, "color", "APT::Moo::Color", 0);
if (CmdMatches("install", "remove", "purge", "upgrade", "dist-upgrade",
- "dselect-upgrade", "autoremove", "auto-remove", "clean", "autoclean", "auto-clean", "check",
+ "dselect-upgrade", "autoremove", "auto-remove", "autopurge", "clean", "autoclean", "auto-clean", "check",
"build-dep", "full-upgrade", "source"))
{
addArg('s', "simulate", "APT::Get::Simulate", 0);
diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc
index 8bd7e33e0..2c12676ea 100644
--- a/apt-private/private-download.cc
+++ b/apt-private/private-download.cc
@@ -248,7 +248,7 @@ bool DoChangelog(CommandLine &CmdL)
APT::VersionList verset = APT::VersionList::FromCommandLine(Cache,
CmdL.FileList + 1, APT::CacheSetHelper::CANDIDATE, helper);
if (verset.empty() == true)
- return false;
+ return _error->Error(_("No packages found"));
bool const downOnly = _config->FindB("APT::Get::Download-Only", false);
bool const printOnly = _config->FindB("APT::Get::Print-URIs", false);
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index 4e888a9bd..1713ff308 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -599,6 +599,12 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<PseudoPkg
_config->Set("APT::Get::AutomaticRemove", "true");
fallback = MOD_REMOVE;
}
+ else if (strcasecmp(CmdL.FileList[0], "autopurge") == 0)
+ {
+ _config->Set("APT::Get::AutomaticRemove", "true");
+ _config->Set("APT::Get::Purge", true);
+ fallback = MOD_REMOVE;
+ }
std::list<APT::VersionSet::Modifier> mods;
mods.push_back(APT::VersionSet::Modifier(MOD_INSTALL, "+",
diff --git a/apt-private/private-json-hooks.cc b/apt-private/private-json-hooks.cc
index 0e4b4913b..b5c1a7172 100644
--- a/apt-private/private-json-hooks.cc
+++ b/apt-private/private-json-hooks.cc
@@ -176,7 +176,7 @@ class APT_HIDDEN JsonWriter
};
/**
- * @brief Wrtie a VerIterator to a JsonWriter
+ * @brief Write a VerIterator to a JsonWriter
*/
static void verIterToJson(JsonWriter &writer, CacheFile &Cache, pkgCache::VerIterator const &Ver)
{