From 36375005d9e971d2fdfc62224671f009ce7adaf9 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:53:24 +0000 Subject: working apt-get source Author: jgg Date: 1999-04-07 05:30:17 GMT working apt-get source --- apt-pkg/sourcelist.cc | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'apt-pkg/sourcelist.cc') 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 /*{{{*/ // --------------------------------------------------------------------- /* */ -- cgit v1.2.3