summaryrefslogtreecommitdiff
path: root/apt-pkg/sourcelist.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:24 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:24 +0000
commit36375005d9e971d2fdfc62224671f009ce7adaf9 (patch)
tree4793d82c73be374f8f7a629237af2d73874fb468 /apt-pkg/sourcelist.cc
parent36f610f18a9a12c02ba89c6bb84726f7ed3ba7ad (diff)
working apt-get source
Author: jgg Date: 1999-04-07 05:30:17 GMT working apt-get source
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r--apt-pkg/sourcelist.cc29
1 files changed, 28 insertions, 1 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index bea2d91c8..c4f225fde 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: sourcelist.cc,v 1.12 1999/03/05 19:36:49 jgg Exp $
+// $Id: sourcelist.cc,v 1.13 1999/04/07 05:30:17 jgg Exp $
/* ######################################################################
List of Sources
@@ -316,6 +316,33 @@ string pkgSourceList::Item::ArchiveURI(string File) const
return Res;
}
/*}}}*/
+// SourceList::Item::SourceInfo - Returns an info line for a source /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+string pkgSourceList::Item::SourceInfo(string Pkg,string Ver,string Comp) const
+{
+ string Res;
+ switch (Type)
+ {
+ case DebSrc:
+ case Deb:
+ Res += SiteOnly(URI) + ' ';
+ if (Dist[Dist.size() - 1] == '/')
+ Res += Dist;
+ else
+ Res += Dist + '/' + Section;
+
+ Res += " ";
+ Res += Pkg;
+ Res += " ";
+ Res += Ver;
+ if (Comp.empty() == false)
+ Res += " (" + Comp + ")";
+ break;
+ };
+ return Res;
+}
+ /*}}}*/
// SourceList::Item::SiteOnly - Strip off the path part of a URI /*{{{*/
// ---------------------------------------------------------------------
/* */