From 173c98da4cfa28ccde70c4d503fcdf6230b9085f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 26 Sep 2012 21:34:49 +0200 Subject: * cmdline/apt-cache.cc: - print versioned dependency relations in (r)depends if the option APT::Cache::ShowVersion is true (default: false) as discussed in #218995 to help debian-cd fixing #687949. Thanks to Sam Lidder for initial patch and Steve McIntyre for nagging and testing! --- cmdline/apt-cache.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index ce869581b..0a2c28d23 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -597,6 +597,7 @@ bool ShowDepends(CommandLine &CmdL, bool const RevDepends) bool const Installed = _config->FindB("APT::Cache::Installed", false); bool const Important = _config->FindB("APT::Cache::Important", false); bool const ShowDepType = _config->FindB("APT::Cache::ShowDependencyType", RevDepends == false); + bool const ShowVersion = _config->FindB("APT::Cache::ShowVersion", false); bool const ShowPreDepends = _config->FindB("APT::Cache::ShowPre-Depends", true); bool const ShowDepends = _config->FindB("APT::Cache::ShowDepends", true); bool const ShowRecommends = _config->FindB("APT::Cache::ShowRecommends", Important == false); @@ -646,10 +647,13 @@ bool ShowDepends(CommandLine &CmdL, bool const RevDepends) if (ShowDepType == true) cout << D.DepType() << ": "; if (Trg->VersionList == 0) - cout << "<" << Trg.FullName(true) << ">" << endl; + cout << "<" << Trg.FullName(true) << ">"; else - cout << Trg.FullName(true) << endl; - + cout << Trg.FullName(true); + if (ShowVersion == true && D->Version != 0) + cout << " (" << pkgCache::CompTypeDeb(D->CompareOp) << ' ' << D.TargetVer() << ')'; + cout << std::endl; + if (Recurse == true && Shown[Trg->ID] == false) { Shown[Trg->ID] = true; -- cgit v1.2.3 From 18056707d923f55c165385f08569bed00162cb7b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 20 Oct 2012 15:23:21 +0200 Subject: adds a comment for Translators to the 'do as I say' prompt to prevent problems like #691024 in new translations --- cmdline/apt-get.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 4e307b657..6890b7120 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1255,7 +1255,9 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, { if (_config->FindB("APT::Get::Trivial-Only",false) == true) return _error->Error(_("Trivial Only specified but this is not a trivial operation.")); - + + // TRANSLATOR: This string needs to be typed by the user as a confirmation, so be + // careful with hard to type or special characters (like non-breaking spaces) const char *Prompt = _("Yes, do as I say!"); ioprintf(c2out, _("You are about to do something potentially harmful.\n" -- cgit v1.2.3