summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2019-01-22 10:54:07 +0000
committerJulian Andres Klode <jak@debian.org>2019-01-22 10:54:07 +0000
commit01c57d7235e9013a977646cbee73af43cbc1048b (patch)
tree20c6953585a1c55472b6bf73197dc0bf48b4d35e
parent1351fb372ae01453166682e8e12484b2e02c759b (diff)
parentbe7eb047e1202971f84bb4ac27e796d85bebdce9 (diff)
Merge branch 'pu/minimize-manual' into 'master'
apt-mark minimize-manual See merge request apt-team/apt!39
-rw-r--r--apt-private/private-cmndline.cc11
-rw-r--r--apt-private/private-output.h4
-rw-r--r--cmdline/apt-cache.cc2
-rw-r--r--cmdline/apt-mark.cc122
-rw-r--r--doc/apt-mark.8.xml8
-rw-r--r--po/apt-all.pot3
-rw-r--r--po/ar.po4
-rw-r--r--po/ast.po4
-rw-r--r--po/bg.po4
-rw-r--r--po/bs.po3
-rw-r--r--po/ca.po5
-rw-r--r--po/cs.po5
-rw-r--r--po/cy.po4
-rw-r--r--po/da.po5
-rw-r--r--po/de.po5
-rw-r--r--po/dz.po4
-rw-r--r--po/el.po4
-rw-r--r--po/es.po5
-rw-r--r--po/eu.po4
-rw-r--r--po/fi.po4
-rw-r--r--po/fr.po4
-rw-r--r--po/gl.po4
-rw-r--r--po/hu.po5
-rw-r--r--po/it.po5
-rw-r--r--po/ja.po5
-rw-r--r--po/km.po4
-rw-r--r--po/ko.po4
-rw-r--r--po/ku.po3
-rw-r--r--po/lt.po4
-rw-r--r--po/mr.po4
-rw-r--r--po/nb.po4
-rw-r--r--po/ne.po4
-rw-r--r--po/nl.po5
-rw-r--r--po/nn.po4
-rw-r--r--po/pl.po4
-rw-r--r--po/pt.po4
-rw-r--r--po/pt_BR.po4
-rw-r--r--po/ro.po4
-rw-r--r--po/ru.po5
-rw-r--r--po/sk.po4
-rw-r--r--po/sl.po4
-rw-r--r--po/sv.po4
-rw-r--r--po/th.po4
-rw-r--r--po/tl.po4
-rw-r--r--po/tr.po5
-rw-r--r--po/uk.po4
-rw-r--r--po/vi.po4
-rw-r--r--po/zh_CN.po5
-rw-r--r--po/zh_TW.po4
49 files changed, 243 insertions, 89 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc
index 101e0ae40..87deb6bf0 100644
--- a/apt-private/private-cmndline.cc
+++ b/apt-private/private-cmndline.cc
@@ -287,7 +287,7 @@ static bool addArgumentsAPTMark(std::vector<CommandLine::Args> &Args, char const
{
if (CmdMatches("auto", "manual", "hold", "unhold", "showauto",
"showmanual", "showhold", "showholds",
- "markauto", "unmarkauto"))
+ "markauto", "unmarkauto", "minimize-manual"))
{
addArg('f',"file","Dir::State::extended_states",CommandLine::HasArg);
}
@@ -303,7 +303,14 @@ static bool addArgumentsAPTMark(std::vector<CommandLine::Args> &Args, char const
addArg('v',"verbose","APT::MarkAuto::Verbose",0);
}
- if (Cmd != nullptr && strncmp(Cmd, "show", strlen("show")) != 0)
+ if (CmdMatches("minimize-manual"))
+ {
+ addArg('y',"yes","APT::Get::Assume-Yes",0);
+ addArg('y',"assume-yes","APT::Get::Assume-Yes",0);
+ addArg(0,"assume-no","APT::Get::Assume-No",0);
+ }
+
+ if (CmdMatches("minimize-manual") || (Cmd != nullptr && strncmp(Cmd, "show", strlen("show")) != 0))
{
addArg('s',"simulate","APT::Mark::Simulate",0);
addArg('s',"just-print","APT::Mark::Simulate",0);
diff --git a/apt-private/private-output.h b/apt-private/private-output.h
index 1ac861328..c20cc9e17 100644
--- a/apt-private/private-output.h
+++ b/apt-private/private-output.h
@@ -101,11 +101,11 @@ bool ShowEssential(std::ostream &out,CacheFile &Cache);
void Stats(std::ostream &out, pkgDepCache &Dep);
// prompting
-bool YnPrompt(char const * const Question, bool Default=true);
+APT_PUBLIC bool YnPrompt(char const *const Question, bool Default = true);
bool YnPrompt(char const * const Question, bool const Default, bool const ShowGlobalErrors, std::ostream &c1o, std::ostream &c2o);
bool AnalPrompt(std::string const &Question, const char *Text);
-std::string PrettyFullName(pkgCache::PkgIterator const &Pkg);
+APT_PUBLIC std::string PrettyFullName(pkgCache::PkgIterator const &Pkg);
std::string CandidateVersion(pkgCacheFile * const Cache, pkgCache::PkgIterator const &Pkg);
std::function<std::string(pkgCache::PkgIterator const &)> CandidateVersion(pkgCacheFile * const Cache);
std::string CurrentToCandidateVersion(pkgCacheFile * const Cache, pkgCache::PkgIterator const &Pkg);
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index f1b1e144d..3c0e477b1 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -182,7 +182,7 @@ static void ShowHashTableStats(std::string Type,
static bool Stats(CommandLine &CmdL)
{
if (CmdL.FileSize() > 1) {
- _error->Error(_("apt-cache stats does not take any arguments"));
+ _error->Error(_("%s does not take any arguments"), "apt-cache stats");
return false;
}
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index 927b31d2f..161845b53 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -125,6 +125,127 @@ static bool DoMarkAuto(CommandLine &CmdL)
return true;
}
/*}}}*/
+// helper for Install-Recommends-Sections and Never-MarkAuto-Sections /*{{{*/
+static bool
+ConfigValueInSubTree(const char *SubTree, const char *needle)
+{
+ // copied from depcache.cc
+ Configuration::Item const *Opts;
+ Opts = _config->Tree(SubTree);
+ if (Opts != 0 && Opts->Child != 0)
+ {
+ Opts = Opts->Child;
+ for (; Opts != 0; Opts = Opts->Next)
+ {
+ if (Opts->Value.empty() == true)
+ continue;
+ if (strcmp(needle, Opts->Value.c_str()) == 0)
+ return true;
+ }
+ }
+ return false;
+}
+ /*}}}*/
+/* DoMinimize - minimize manually installed {{{*/
+/* Traverses dependencies of meta packages and marks them as manually
+ * installed. */
+static bool DoMinimize(CommandLine &CmdL)
+{
+
+ pkgCacheFile CacheFile;
+ pkgDepCache *const DepCache = CacheFile.GetDepCache();
+ if (unlikely(DepCache == nullptr))
+ return false;
+
+ if (CmdL.FileList[1] != nullptr)
+ return _error->Error(_("%s does not take any arguments"), "apt-mark minimize-manual");
+
+ auto Debug = _config->FindB("Debug::AptMark::Minimize", false);
+ auto is_root = [&DepCache](pkgCache::PkgIterator const &pkg) {
+ auto ver = pkg.CurrentVer();
+ return ver.end() == false && ((*DepCache)[pkg].Flags & pkgCache::Flag::Auto) == 0 &&
+ ver->Section != 0 &&
+ ConfigValueInSubTree("APT::Never-MarkAuto-Sections", ver.Section());
+ };
+
+ APT::PackageSet roots;
+ for (auto Pkg = DepCache->PkgBegin(); Pkg.end() == false; ++Pkg)
+ {
+ if (is_root(Pkg))
+ {
+ if (Debug)
+ std::clog << "Found root " << Pkg.Name() << std::endl;
+ roots.insert(Pkg);
+ }
+ }
+
+ APT::PackageSet workset(roots);
+ APT::PackageSet seen;
+ APT::PackageSet changed;
+
+ pkgDepCache::ActionGroup group(*DepCache);
+
+ while (workset.empty() == false)
+ {
+ if (Debug)
+ std::clog << "Iteration\n";
+
+ APT::PackageSet workset2;
+ for (auto &Pkg : workset)
+ {
+ if (seen.find(Pkg) != seen.end())
+ continue;
+
+ seen.insert(Pkg);
+
+ if (Debug)
+ std::cerr << " Visiting " << Pkg.FullName(true) << "\n";
+ if (roots.find(Pkg) == roots.end() && ((*DepCache)[Pkg].Flags & pkgCache::Flag::Auto) == 0)
+ {
+ DepCache->MarkAuto(Pkg, true);
+ changed.insert(Pkg);
+ }
+
+ // Visit dependencies, add them to next working set
+ for (auto Dep = Pkg.CurrentVer().DependsList(); !Dep.end(); ++Dep)
+ {
+ if (DepCache->IsImportantDep(Dep) == false)
+ continue;
+ std::unique_ptr<pkgCache::Version *[]> targets(Dep.AllTargets());
+ for (int i = 0; targets[i] != nullptr; i++)
+ {
+ pkgCache::VerIterator Tgt(*DepCache, targets[i]);
+ if (Tgt.ParentPkg()->CurrentVer != 0 && Tgt.ParentPkg().CurrentVer()->ID == Tgt->ID)
+ workset2.insert(Tgt.ParentPkg());
+ }
+ }
+ }
+
+ workset = std::move(workset2);
+ }
+
+ if (changed.empty()) {
+ cout << _("No changes necessary") << endl;
+ return true;
+ }
+
+ ShowList(c1out, _("The following packages will be marked as automatically installed:"), changed,
+ [](const pkgCache::PkgIterator &) { return true; },
+ &PrettyFullName,
+ &PrettyFullName);
+
+ if (_config->FindB("APT::Mark::Simulate", false) == false)
+ {
+ if (YnPrompt(_("Do you want to continue?"), false) == false)
+ return true;
+
+ return DepCache->writeStateFile(NULL);
+ }
+
+ return true;
+}
+ /*}}}*/
+
/* ShowAuto - show automatically installed packages (sorted) {{{*/
static bool ShowAuto(CommandLine &CmdL)
{
@@ -293,6 +414,7 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
return {
{"auto",&DoAuto, _("Mark the given packages as automatically installed")},
{"manual",&DoAuto, _("Mark the given packages as manually installed")},
+ {"minimize-manual", &DoMinimize, _("Mark all dependencies of meta packages as automatically installed.")},
{"hold",&DoSelection, _("Mark a package as held back")},
{"unhold",&DoSelection, _("Unset a package set as held back")},
{"install",&DoSelection, nullptr},
diff --git a/doc/apt-mark.8.xml b/doc/apt-mark.8.xml
index ddde0416f..ea39b7faa 100644
--- a/doc/apt-mark.8.xml
+++ b/doc/apt-mark.8.xml
@@ -66,6 +66,14 @@
</para></listitem>
</varlistentry>
+ <varlistentry><term><option>minimize-manual</option></term>
+ <listitem><para><literal>minimize-manual</literal> is used to mark
+ (transitive) dependencies of metapackages as automatically installed.
+ This can be used after an installation for example, to minimize the
+ number of manually installed packages; or continuously on systems
+ managed by system configuration metapackages.
+ </para></listitem>
+ </varlistentry>
<varlistentry><term><option>showauto</option></term>
<listitem><para><literal>showauto</literal> is used to print a
list of automatically installed packages with each package on a new line.
diff --git a/po/apt-all.pot b/po/apt-all.pot
index e1d0e0f97..84a22e321 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -2408,7 +2408,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
+#, c-format
+msgid "%s does not take any arguments"
msgstr ""
#: cmdline/apt-cache.cc
diff --git a/po/ar.po b/po/ar.po
index 45db62325..73df37b58 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -2445,8 +2445,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "لا يقبل الأمر update أية مُعطيات"
#: cmdline/apt-cache.cc
diff --git a/po/ast.po b/po/ast.po
index e42eb8231..cdd964e14 100644
--- a/po/ast.po
+++ b/po/ast.po
@@ -2524,8 +2524,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "La orde update nun lleva argumentos"
#: cmdline/apt-cache.cc
diff --git a/po/bg.po b/po/bg.po
index b305489c1..fedc7fc93 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -2571,8 +2571,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Командата „update“ не възприема аргументи"
#: cmdline/apt-cache.cc
diff --git a/po/bs.po b/po/bs.po
index 6ba4a312f..7c9d1db39 100644
--- a/po/bs.po
+++ b/po/bs.po
@@ -2427,7 +2427,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
+#, c-format
+msgid "%s does not take any arguments"
msgstr ""
#: cmdline/apt-cache.cc
diff --git a/po/ca.po b/po/ca.po
index 6d8c55656..41fb9f23d 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -2629,8 +2629,9 @@ msgid "All packages are up to date."
msgstr "Tots els paquets estan actualitzats."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "apt-cache stats no pren cap argument"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "%s no pren cap argument"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/cs.po b/po/cs.po
index 347ba8ddf..a1893aba0 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -2558,8 +2558,9 @@ msgid "All packages are up to date."
msgstr "Všechny balíky jsou aktuální."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "apt-cache stats neakceptuje žádné argumenty"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "%s neakceptuje žádné argumenty"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/cy.po b/po/cy.po
index 28e410007..ed6d074cd 100644
--- a/po/cy.po
+++ b/po/cy.po
@@ -2516,8 +2516,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Nid yw'r gorchymyn diweddaru yn derbyn ymresymiadau"
#: cmdline/apt-cache.cc
diff --git a/po/da.po b/po/da.po
index b670240d4..3d963a3fc 100644
--- a/po/da.po
+++ b/po/da.po
@@ -2576,8 +2576,9 @@ msgid "All packages are up to date."
msgstr "Alle pakker er opdateret."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "»apt-cache stats« benytter ingen parametre"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "»%s« benytter ingen parametre"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/de.po b/po/de.po
index c40f9c699..db6e6f4c6 100644
--- a/po/de.po
+++ b/po/de.po
@@ -2676,8 +2676,9 @@ msgid "All packages are up to date."
msgstr "Alle Pakete sind aktuell."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "Der Befehl »apt-cache stats« akzeptiert keine Argumente."
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "Der Befehl »%s« akzeptiert keine Argumente."
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/dz.po b/po/dz.po
index 8166da841..6573db5aa 100644
--- a/po/dz.po
+++ b/po/dz.po
@@ -2480,8 +2480,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "དུས་མཐུན་བཟོ་བའི་བརྡ་བཀོད་འདི་གིས་སྒྲུབ་རྟགས་ཚུ་མི་འབག་འབད།"
#: cmdline/apt-cache.cc
diff --git a/po/el.po b/po/el.po
index ef1ecc38b..338b86844 100644
--- a/po/el.po
+++ b/po/el.po
@@ -2507,8 +2507,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Η εντολή update δεν παίρνει ορίσματα"
#: cmdline/apt-cache.cc
diff --git a/po/es.po b/po/es.po
index 75bad50b4..d828b5b73 100644
--- a/po/es.po
+++ b/po/es.po
@@ -2691,8 +2691,9 @@ msgid "All packages are up to date."
msgstr "Todos los paquetes están actualizados."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "«apt-cache stats» no necesita argumentos"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "«%s» no necesita argumentos"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/eu.po b/po/eu.po
index a9348fcf5..eb70279f3 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -2484,8 +2484,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Eguneratzeko komandoak ez du argumenturik hartzen"
#: cmdline/apt-cache.cc
diff --git a/po/fi.po b/po/fi.po
index eb1da8516..2476d6f8f 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -2476,8 +2476,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Komento update ei käytä parametreja"
#: cmdline/apt-cache.cc
diff --git a/po/fr.po b/po/fr.po
index b06b92a46..396d9ed2b 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -2687,7 +2687,9 @@ msgid "All packages are up to date."
msgstr "Tous les paquets sont à jour."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+#| msgid "%s does not take any arguments"
+msgid "%s does not take any arguments"
msgstr "La commande apt-cache ne prend pas de paramètre"
#: cmdline/apt-cache.cc
diff --git a/po/gl.po b/po/gl.po
index 50c855cef..42242f41f 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -2556,8 +2556,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "A orde «update» non toma argumentos"
#: cmdline/apt-cache.cc
diff --git a/po/hu.po b/po/hu.po
index 4630744b4..8ea1f6151 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -2606,8 +2606,9 @@ msgid "All packages are up to date."
msgstr "Minden csomag naprakész."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "Az apt-cache stats parancsnak nincsenek argumentumai"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "Az %s parancsnak nincsenek argumentumai"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/it.po b/po/it.po
index 2158888e1..fc28b3111 100644
--- a/po/it.po
+++ b/po/it.po
@@ -2641,8 +2641,9 @@ msgid "All packages are up to date."
msgstr "Tutti i pacchetti sono aggiornati."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "Il comando \"apt-cache stats\" non accetta alcun argomento"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "Il comando \"%s\" non accetta alcun argomento"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/ja.po b/po/ja.po
index f11b7037e..8ba4df794 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -2594,8 +2594,9 @@ msgid "All packages are up to date."
msgstr "パッケージはすべて最新です。"
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "apt-cache stats は引数をとりません"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "%s は引数をとりません"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/km.po b/po/km.po
index 5b068b2e5..ace0cbe10 100644
--- a/po/km.po
+++ b/po/km.po
@@ -2467,8 +2467,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "ពាក្យ​បញ្ជា​ដែលធ្វើ​ឲ្យ​ទាន់​សម័យ​គ្មាន​អាគុយម៉ង់​ទេ"
#: cmdline/apt-cache.cc
diff --git a/po/ko.po b/po/ko.po
index 32306172e..04b77dde0 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -2491,8 +2491,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "update 명령은 인수를 받지 않습니다"
#: cmdline/apt-cache.cc
diff --git a/po/ku.po b/po/ku.po
index 4910d51b0..18e2bce96 100644
--- a/po/ku.po
+++ b/po/ku.po
@@ -2427,7 +2427,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
+#, c-format
+msgid "%s does not take any arguments"
msgstr ""
#: cmdline/apt-cache.cc
diff --git a/po/lt.po b/po/lt.po
index 5fc6ba385..75add9735 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -2457,8 +2457,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Atnaujinimo komandai argumentų nereikia"
#: cmdline/apt-cache.cc
diff --git a/po/mr.po b/po/mr.po
index 02533a83c..929e07352 100644
--- a/po/mr.po
+++ b/po/mr.po
@@ -2470,8 +2470,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "सुधारित आवृत्तीचा विधान आर्ग्युमेंटस घेऊ शकत नाही."
#: cmdline/apt-cache.cc
diff --git a/po/nb.po b/po/nb.po
index 85aacc833..70c4afa0d 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -2544,8 +2544,8 @@ msgid "All packages are up to date."
msgstr "Alle pakkene er oppdatert."
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Oppdaterings-kommandoen tar ingen argumenter"
#: cmdline/apt-cache.cc
diff --git a/po/ne.po b/po/ne.po
index 5245fd1db..565c11719 100644
--- a/po/ne.po
+++ b/po/ne.po
@@ -2465,8 +2465,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "अद्यावधिक आदेशले कुनै तर्कहरू लिदैन"
#: cmdline/apt-cache.cc
diff --git a/po/nl.po b/po/nl.po
index a9d9da14f..d3ba448fc 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -2637,8 +2637,9 @@ msgid "All packages are up to date."
msgstr "Alle pakketten zijn up-to-date."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "De opdracht 'apt-cache stats' aanvaardt geen argumenten"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "De opdracht '%s' aanvaardt geen argumenten"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/nn.po b/po/nn.po
index 7a651e275..c5bd2bbac 100644
--- a/po/nn.po
+++ b/po/nn.po
@@ -2478,8 +2478,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Oppdateringskommandoen tek ingen argument"
#: cmdline/apt-cache.cc
diff --git a/po/pl.po b/po/pl.po
index 66cd64854..bd1ed694c 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -2596,8 +2596,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Polecenie update nie wymaga żadnych argumentów"
#: cmdline/apt-cache.cc
diff --git a/po/pt.po b/po/pt.po
index 7ccc58b54..cfc665a96 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -2575,8 +2575,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "O comando update não leva argumentos"
#: cmdline/apt-cache.cc
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 441558ae4..66e3b1568 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -2494,8 +2494,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "O comando update não leva argumentos"
#: cmdline/apt-cache.cc
diff --git a/po/ro.po b/po/ro.po
index 1fd21b5ca..904481a07 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -2503,8 +2503,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Comanda de actualizare nu are argumente"
#: cmdline/apt-cache.cc
diff --git a/po/ru.po b/po/ru.po
index 4c8521eb5..714cb22c8 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -2625,8 +2625,9 @@ msgid "All packages are up to date."
msgstr "Все пакеты имеют последние версии."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "Команде apt-cache stats не нужны аргументы"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "Команде %s не нужны аргументы"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/sk.po b/po/sk.po
index aaffad92b..97f794269 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -2545,8 +2545,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Príkaz update neprijíma žiadne argumenty"
#: cmdline/apt-cache.cc
diff --git a/po/sl.po b/po/sl.po
index a123b88e2..22580f245 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -2550,8 +2550,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Ukaz update ne sprejema argumentov"
#: cmdline/apt-cache.cc
diff --git a/po/sv.po b/po/sv.po
index 4a6733422..daa2d336e 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -2564,8 +2564,8 @@ msgid "All packages are up to date."
msgstr "Alla paket är uppdaterade."
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Uppdateringskommandot tar inga argument"
#: cmdline/apt-cache.cc
diff --git a/po/th.po b/po/th.po
index ce2833724..c31a2dd65 100644
--- a/po/th.po
+++ b/po/th.po
@@ -2479,8 +2479,8 @@ msgid "All packages are up to date."
msgstr "ปรับรุ่นทุกแพกเกจเป็นรุ่นล่าสุดแล้ว"
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "คำสั่ง update ไม่รับอาร์กิวเมนต์เพิ่ม"
#: cmdline/apt-cache.cc
diff --git a/po/tl.po b/po/tl.po
index 95e7fc1d6..a50de95a6 100644
--- a/po/tl.po
+++ b/po/tl.po
@@ -2494,8 +2494,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Ang utos na update ay hindi tumatanggap ng mga argumento"
#: cmdline/apt-cache.cc
diff --git a/po/tr.po b/po/tr.po
index fc7a56710..68a997f5e 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -2598,8 +2598,9 @@ msgid "All packages are up to date."
msgstr "Tüm paketler güncel."
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "apt-cache stats komutu argüman almaz"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "%s komutu argüman almaz"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/uk.po b/po/uk.po
index 798b3bd92..b5a968df9 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -2582,8 +2582,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Команді update не потрібні аргументи"
#: cmdline/apt-cache.cc
diff --git a/po/vi.po b/po/vi.po
index f76755e16..316333913 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -2536,8 +2536,8 @@ msgid "All packages are up to date."
msgstr "Mọi gói đã được cập nhật."
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "Lệnh cập nhật không chấp nhận đối số"
#: cmdline/apt-cache.cc
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 8a935332c..07eca117d 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -2474,8 +2474,9 @@ msgid "All packages are up to date."
msgstr "所有软件包均为最新。"
#: cmdline/apt-cache.cc
-msgid "apt-cache stats does not take any arguments"
-msgstr "apt-cache stats 命令不需要参数"
+#, c-format
+msgid "%s does not take any arguments"
+msgstr "%s 命令不需要参数"
#: cmdline/apt-cache.cc
msgid "Total package names: "
diff --git a/po/zh_TW.po b/po/zh_TW.po
index db704f10d..d6a08d0ec 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -2454,8 +2454,8 @@ msgid "All packages are up to date."
msgstr ""
#: cmdline/apt-cache.cc
-#, fuzzy
-msgid "apt-cache stats does not take any arguments"
+#, fuzzy, c-format
+msgid "%s does not take any arguments"
msgstr "update 指令不需任何參數"
#: cmdline/apt-cache.cc