Enhance ReInstall error diagnostics (ALT#24044)

This commit is contained in:
Дмитрий Левин 2011-02-13 13:23:58 +00:00
parent 57c0417fcd
commit e1aab96204
3 changed files with 19 additions and 8 deletions

View File

@ -1428,9 +1428,12 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache,
{
if (_config->FindB("APT::Get::ReInstall",false) == true)
{
if (Pkg->CurrentVer == 0 || Pkg.CurrentVer().Downloadable() == false)
ioprintf(c1out,_("Reinstallation of %s is not possible, it cannot be downloaded.\n"),
if (Pkg->CurrentVer == 0)
ioprintf(c1out,_("Reinstallation of %s is not possible.\n"),
Pkg.Name());
else if (Pkg.CurrentVer().Downloadable() == false)
ioprintf(c1out,_("Reinstallation of %s %s is not possible, it cannot be downloaded.\n"),
Pkg.Name(), Pkg.CurrentVer().VerStr());
else
Cache.SetReInstall(Pkg,true);
}

View File

@ -1504,9 +1504,12 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache,
{
if (_config->FindB("APT::Get::ReInstall",false) == true)
{
if (Pkg->CurrentVer == 0 || Pkg.CurrentVer().Downloadable() == false)
ioprintf(c1out,_("Reinstallation of %s is not possible, it cannot be downloaded.\n"),
if (Pkg->CurrentVer == 0)
ioprintf(c1out,_("Reinstallation of %s is not possible.\n"),
Pkg.Name());
else if (Pkg.CurrentVer().Downloadable() == false)
ioprintf(c1out,_("Reinstallation of %s %s is not possible, it cannot be downloaded.\n"),
Pkg.Name(), Pkg.CurrentVer().VerStr());
else
Cache.SetReInstall(Pkg,true);
}

View File

@ -789,8 +789,13 @@ msgstr "
#: cmdline/apt-get.cc:1432 cmdline/apt-shell.cc:1507
#, c-format
msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n"
msgstr "Переустановить %s невозможно, потому что этот пакет нельзя скачать.\n"
msgid "Reinstallation of %s is not possible.\n"
msgstr "ðÅÒÅÕÓÔÁÎÏ×ÉÔØ %s ÎÅ×ÏÚÍÏÖÎÏ.\n"
#: cmdline/apt-get.cc:1432 cmdline/apt-shell.cc:1507
#, c-format
msgid "Reinstallation of %s-%s is not possible, it cannot be downloaded.\n"
msgstr "ðÅÒÅÕÓÔÁÎÏ×ÉÔØ %s-%s ÎÅ×ÏÚÍÏÖÎÏ, ÐÏÔÏÍÕ ÞÔÏ ÜÔÏÔ ÐÁËÅÔ ÎÅÌØÚÑ ÓËÁÞÁÔØ.\n"
#: cmdline/apt-get.cc:1440 cmdline/apt-shell.cc:1515
#, c-format