From 7f7e8d7b6b4408d6434070888d4548496fcf72c1 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 24 May 2012 14:54:05 +0000 Subject: [PATCH] apt-get, apt-shell: print (un)resolved package diagnostics consistently (ALT#27364) When a package could not be found, print the unmangled string passed to the utility. Based on patch by Igor Vlasenko. --- apt/cmdline/apt-get.cc | 6 +++--- apt/cmdline/apt-shell.cc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apt/cmdline/apt-get.cc b/apt/cmdline/apt-get.cc index 91ac4c9..779677f 100644 --- a/apt/cmdline/apt-get.cc +++ b/apt/cmdline/apt-get.cc @@ -1995,7 +1995,7 @@ bool DoInstall(CommandLine &CmdL) if (Hit == true) continue; #endif - return _error->Error(_("Couldn't find package %s"),S); + return _error->Error(_("Couldn't find package %s"), OrigS); } // Regexs must always be confirmed @@ -2021,7 +2021,7 @@ bool DoInstall(CommandLine &CmdL) // CNC:2003-11-23 ioprintf(c1out,_("Selecting %s for '%s'\n"), - Pkg.Name(),S); + Pkg.Name(), OrigS); if (VerTag != 0) // CNC:2003-11-05 @@ -2034,7 +2034,7 @@ bool DoInstall(CommandLine &CmdL) regfree(&Pattern); if (Hit == false) - return _error->Error(_("Couldn't find package %s"),S); + return _error->Error(_("Couldn't find package %s"), OrigS); } else { diff --git a/apt/cmdline/apt-shell.cc b/apt/cmdline/apt-shell.cc index 1dcfc06..2d29a0e 100644 --- a/apt/cmdline/apt-shell.cc +++ b/apt/cmdline/apt-shell.cc @@ -2065,7 +2065,7 @@ bool DoInstall(CommandLine &CmdL) if (Hit == true) continue; #endif - return _error->Error(_("Couldn't find package %s"),S); + return _error->Error(_("Couldn't find package %s"), OrigS); } // Regexs must always be confirmed @@ -2091,7 +2091,7 @@ bool DoInstall(CommandLine &CmdL) // CNC:2003-11-23 ioprintf(c1out,_("Selecting %s for '%s'\n"), - Pkg.Name(),S); + Pkg.Name(), OrigS); StateGuard->Ignore(Pkg); if (VerTag != 0) @@ -2105,7 +2105,7 @@ bool DoInstall(CommandLine &CmdL) regfree(&Pattern); if (Hit == false) - return _error->Error(_("Couldn't find package %s"),S); + return _error->Error(_("Couldn't find package %s"), OrigS); } else {