diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:58 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:58 +0000 |
commit | be8922fdc7521f4172e166b274430540be1913a8 (patch) | |
tree | b64a98adb78624da4b92b66b33dbb1c1cc402364 /apt-pkg/sourcelist.cc | |
parent | 2b154e536a0df3afb318ddcf9b7daf9337de3c23 (diff) |
Flag to fetch the source index
Author: jgg
Date: 1999-03-02 18:35:24 GMT
Flag to fetch the source index
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r-- | apt-pkg/sourcelist.cc | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 61d5dc7ab..b2f480599 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.10 1999/01/27 02:48:52 jgg Exp $ +// $Id: sourcelist.cc,v 1.11 1999/03/02 18:35:24 jgg Exp $ /* ###################################################################### List of Sources @@ -129,6 +129,12 @@ bool pkgSourceList::Item::SetType(string S) return true; } + if (S == "deb-src") + { + Type = DebSrc; + return true; + } + return true; } /*}}}*/ @@ -170,6 +176,16 @@ string pkgSourceList::Item::PackagesURI() const Res += "Packages"; break; + + case DebSrc: + if (Dist[Dist.size() - 1] == '/') + Res = URI + Dist; + else + Res = URI + "dists/" + Dist + '/' + Section + + "/source/"; + + Res += "Sources"; + break; }; return Res; } @@ -191,6 +207,16 @@ string pkgSourceList::Item::PackagesInfo() const Res += " Packages"; break; + + case DebSrc: + Res += SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + Res += Dist; + else + Res += Dist + '/' + Section; + + Res += " Sources"; + break; }; return Res; } @@ -212,6 +238,16 @@ string pkgSourceList::Item::ReleaseURI() const Res += "Release"; break; + + case DebSrc: + if (Dist[Dist.size() - 1] == '/') + Res = URI + Dist; + else + Res = URI + "dists/" + Dist + '/' + Section + + "/source/"; + + Res += "Release"; + break; }; return Res; } @@ -225,6 +261,7 @@ string pkgSourceList::Item::ReleaseInfo() const switch (Type) { case Deb: + case DebSrc: Res += SiteOnly(URI) + ' '; if (Dist[Dist.size() - 1] == '/') Res += Dist; @@ -245,6 +282,7 @@ string pkgSourceList::Item::ArchiveInfo(pkgCache::VerIterator Ver) const string Res; switch (Type) { + case DebSrc: case Deb: Res += SiteOnly(URI) + ' '; if (Dist[Dist.size() - 1] == '/') @@ -271,6 +309,7 @@ string pkgSourceList::Item::ArchiveURI(string File) const switch (Type) { case Deb: + case DebSrc: Res = URI + File; break; }; |