summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/pkgcachegen.cc6
-rw-r--r--apt-pkg/sourcelist.cc41
-rw-r--r--apt-pkg/sourcelist.h4
3 files changed, 47 insertions, 4 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 402d2e4ff..bb678154c 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.30 1999/02/23 06:50:36 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.31 1999/03/02 18:35:24 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -422,6 +422,10 @@ bool pkgSrcCacheCheck(pkgSourceList &List)
int Missing = 0;
for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++)
{
+ // Only cache deb source types.
+ if (I->Type != pkgSourceList::Item::Deb)
+ continue;
+
string File = ListDir + URItoFileName(I->PackagesURI());
struct stat Buf;
if (stat(File.c_str(),&Buf) != 0)
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;
};
diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h
index 0ed77b301..bbf2dba4e 100644
--- a/apt-pkg/sourcelist.h
+++ b/apt-pkg/sourcelist.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: sourcelist.h,v 1.6 1998/10/15 07:00:02 jgg Exp $
+// $Id: sourcelist.h,v 1.7 1999/03/02 18:35:24 jgg Exp $
/* ######################################################################
SourceList - Manage a list of sources
@@ -37,7 +37,7 @@ class pkgSourceList
item */
struct Item
{
- enum {Deb} Type;
+ enum {Deb, DebSrc} Type;
string URI;
string Dist;