summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-09-26 21:34:49 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-09-26 21:34:49 +0200
commit173c98da4cfa28ccde70c4d503fcdf6230b9085f (patch)
treee91550ddf8b6791a8ea98fba57874f2e0d5a11b4
parent021626db10191cc4388b0516687dbc51bba18820 (diff)
* 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!
-rw-r--r--cmdline/apt-cache.cc10
-rw-r--r--debian/changelog5
2 files changed, 12 insertions, 3 deletions
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;
diff --git a/debian/changelog b/debian/changelog
index 4389f4090..607dddcfa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,11 @@ apt (0.9.7.6) UNRELEASED; urgency=low
* apt-pkg/pkgcache.cc:
- ignore negative dependencies applying in the same group for
M-A:same packages on the real package name as self-conflicts
+ * 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!
-- David Kalnischkies <kalnischkies@gmail.com> Wed, 19 Sep 2012 11:29:56 +0200