diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:57:45 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:57:45 +0000 |
commit | af87ab54430b31a0e1840b2c1673c07d74813447 (patch) | |
tree | 9f2143bc188495cf84c64c2c54cc9b60e1738bed /apt-pkg/pkgcache.cc | |
parent | 70d73d7e0c05939443131ed815fabcd0b087483d (diff) |
'apt-cache policy' preferences debug tool.
Author: jgg
Date: 2001-04-29 05:13:51 GMT
'apt-cache policy' preferences debug tool.
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index ea5c264dc..fa231ef37 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcache.cc,v 1.33 2001/03/05 02:43:28 jgg Exp $ +// $Id: pkgcache.cc,v 1.34 2001/04/29 05:13:51 jgg Exp $ /* ###################################################################### Package Cache - Accessor code for the cache @@ -578,3 +578,22 @@ bool pkgCache::PkgFileIterator::IsOk() return true; } /*}}}*/ +// PkgFileIterator::RelStr - Return the release string /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string pkgCache::PkgFileIterator::RelStr() +{ + string Res; + if (Version() != 0) + Res = Res + (Res.empty() == true?"v=":",v=") + Version(); + if (Origin() != 0) + Res = Res + (Res.empty() == true?"o=":",o=") + Origin(); + if (Archive() != 0) + Res = Res + (Res.empty() == true?"a=":",a=") + Archive(); + if (Label() != 0) + Res = Res + (Res.empty() == true?"l=":",l=") + Label(); + if (Component() != 0) + Res = Res + (Res.empty() == true?"c=":",c=") + Component(); + return Res; +} + /*}}}*/ |