summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-12 13:51:31 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-12 13:51:31 +0200
commite4fa1bca08e6a1df1b6101a1c096f44879b4575e (patch)
treeb1b145cd3c2448452045e487c64d940c4854e3bc /apt-pkg/pkgcache.cc
parent22041bd2864b8d0b401b45dde9eda4003a11fec4 (diff)
parent086bb6d7b5ba933e0a8a6de13d731fcfb8eeda74 (diff)
* Swedish translation update. Closes: #592366
* merge of the debian-expermental-ma branch * refresh po/pot files in doc/ and po/ * apt-pkg/algorithms.cc: - change the debug outputs to display also arch of the package and version dependencies information * cmdline/apt-get.cc: - let APT::Get::Arch-Only in build-dep default to false again (Closes: #592628) Thanks Mohamed Amine IL Idrissi for report! * Swedish translation update. Closes: #592366
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index ae11057ed..bb28a33ca 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -664,6 +664,30 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End)
}
}
/*}}}*/
+// ostream operator to handle string representation of a dependecy /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+std::ostream& operator<<(ostream& out, pkgCache::DepIterator D)
+{
+ if (D.end() == true)
+ return out << "invalid dependency";
+
+ pkgCache::PkgIterator P = D.ParentPkg();
+ pkgCache::PkgIterator T = D.TargetPkg();
+
+ out << (P.end() ? "invalid pkg" : P.FullName(false)) << " " << D.DepType()
+ << " on ";
+ if (T.end() == true)
+ out << "invalid pkg";
+ else
+ out << T;
+
+ if (D->Version != 0)
+ out << " (" << D.CompType() << " " << D.TargetVer() << ")";
+
+ return out;
+}
+ /*}}}*/
// VerIterator::CompareVer - Fast version compare for same pkgs /*{{{*/
// ---------------------------------------------------------------------
/* This just looks over the version list to see if B is listed before A. In