diff options
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; +} + /*}}}*/ |