diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-08-10 15:58:09 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-08-10 15:58:09 +0200 |
commit | 47f6d1b72bc883ecdc00542da4c824a5c4fb79fa (patch) | |
tree | 0ab0c7f953f72d1c65f936b3c6eedeb0293534bd /apt-pkg/pkgcache.cc | |
parent | 8d3489abd90a64715b92976a7c60b42a386a4c5c (diff) |
* apt-pkg/algorithms.cc:
- change the debug outputs to display also arch of the
package and version dependencies information
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 9e1f8b633..2b051cbb0 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -661,6 +661,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 |