]> git.saurik.com Git - apt.git/commitdiff
Make auto-remove and auto-clean aliases for the versions without -
authorJulian Andres Klode <jak@debian.org>
Fri, 14 Aug 2015 16:27:24 +0000 (18:27 +0200)
committerJulian Andres Klode <jak@debian.org>
Fri, 14 Aug 2015 16:27:24 +0000 (18:27 +0200)
Some people type them instead of autoremove and autoclean, so make
them happy.

Closes: #274159
Makes-Happy: Ansgar

apt-private/private-cmndline.cc
apt-private/private-install.cc
cmdline/apt-get.cc
doc/apt-get.8.xml

index 487349c8c206e9e2898e48008c4bef102d7286c8..3a1564b238ab0f5d321fa3b37e3e11ead38f80c4 100644 (file)
@@ -169,14 +169,14 @@ static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const
       addArg(0,"format","APT::Get::IndexTargets::Format", CommandLine::HasArg);
       addArg(0,"release-info","APT::Get::IndexTargets::ReleaseInfo", 0);
    }
-   else if (CmdMatches("clean", "autoclean", "check", "download", "changelog") ||
+   else if (CmdMatches("clean", "autoclean", "auto-clean", "check", "download", "changelog") ||
            CmdMatches("markauto", "unmarkauto")) // deprecated commands
       ;
    else if (CmdMatches("moo"))
       addArg(0, "color", "APT::Moo::Color", 0);
 
    if (CmdMatches("install", "remove", "purge", "upgrade", "dist-upgrade",
-           "dselect-upgrade", "autoremove", "clean", "autoclean", "check",
+           "dselect-upgrade", "autoremove", "auto-remove", "clean", "autoclean", "auto-clean", "check",
            "build-dep", "full-upgrade", "source"))
    {
       addArg('s', "simulate", "APT::Get::Simulate", 0);
index 96e33f7dead319d29d393ab617b8d4283357afe9..e61c4ca51e1d3507fa416348c52db1212527ff9f 100644 (file)
@@ -519,7 +519,8 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
       _config->Set("APT::Get::Purge", true);
       fallback = MOD_REMOVE;
    }
-   else if (strcasecmp(CmdL.FileList[0], "autoremove") == 0)
+   else if (strcasecmp(CmdL.FileList[0], "autoremove") == 0 ||
+           strcasecmp(CmdL.FileList[0], "auto-remove") == 0)
    {
       _config->Set("APT::Get::AutomaticRemove", "true");
       fallback = MOD_REMOVE;
index 61ed41164c52384cf7dbe813486bb33da30245e7..80e344740029af3fcaf5e5f2286016d946622d77 100644 (file)
@@ -1643,6 +1643,7 @@ int main(int argc,const char *argv[])                                     /*{{{*/
                                    {"remove",&DoInstall},
                                    {"purge",&DoInstall},
                                   {"autoremove",&DoInstall},
+                                  {"auto-remove",&DoInstall},
                                   {"markauto",&DoMarkAuto},
                                   {"unmarkauto",&DoMarkAuto},
                                    {"dist-upgrade",&DoDistUpgrade},
@@ -1650,6 +1651,7 @@ int main(int argc,const char *argv[])                                     /*{{{*/
                                   {"build-dep",&DoBuildDep},
                                    {"clean",&DoClean},
                                    {"autoclean",&DoAutoClean},
+                                   {"auto-clean",&DoAutoClean},
                                    {"check",&DoCheck},
                                   {"source",&DoSource},
                                    {"download",&DoDownload},
index 76a53aec298f387712711904fa4c9cc90d4fc805..785b4e9a86004c8df3b1dbfedcaa6be45c4e272e 100644 (file)
      <filename>&cachedir;/archives/partial/</filename>.</para></listitem>
      </varlistentry>
 
-     <varlistentry><term><option>autoclean</option></term>
+     <varlistentry><term><option>autoclean</option> (and the <option>auto-clean</option> alias since 1.1)</term>
      <listitem><para>Like <literal>clean</literal>, <literal>autoclean</literal> clears out the local 
      repository of retrieved package files. The difference is that it only 
      removes package files that can no longer be downloaded, and are largely 
      erased if it is set to off.</para></listitem>
      </varlistentry>
 
-     <varlistentry><term><option>autoremove</option></term>
+     <varlistentry><term><option>autoremove</option> (and the <option>auto-remove</option> alias since 1.1)</term>
      <listitem><para><literal>autoremove</literal> is used to remove packages that were automatically
      installed to satisfy dependencies for other packages and are now no longer needed.</para></listitem>
      </varlistentry>