summaryrefslogtreecommitdiff
path: root/apt-pkg/sourcelist.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:04 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:04 +0000
commit0118833a3b3e65ad7296863aa7d49574eb615f83 (patch)
treebbeac95408b7a84a983cc602dae3b315ed9976d9 /apt-pkg/sourcelist.cc
parent7b0229fe01e9b300e1a67d82f7a6511c31444756 (diff)
Devel acquire module
Author: jgg Date: 1998-10-15 06:59:59 GMT Devel acquire module
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r--apt-pkg/sourcelist.cc44
1 files changed, 43 insertions, 1 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 6fd5e1eb5..c9d0285a9 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.5 1998/07/26 04:49:33 jgg Exp $
+// $Id: sourcelist.cc,v 1.6 1998/10/15 07:00:01 jgg Exp $
/* ######################################################################
List of Sources
@@ -195,6 +195,48 @@ string pkgSourceList::Item::PackagesInfo() const
return Res;
}
/*}}}*/
+// SourceList::Item::ReleaseURI - Returns a URI to the release file /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+string pkgSourceList::Item::ReleaseURI() const
+{
+ string Res;
+ switch (Type)
+ {
+ case Deb:
+ if (Dist[Dist.size() - 1] == '/')
+ Res = URI + Dist;
+ else
+ Res = URI + "dists/" + Dist + '/' + Section +
+ "/binary-" + _config->Find("APT::Architecture") + '/';
+
+ Res += "Release";
+ break;
+ };
+ return Res;
+}
+ /*}}}*/
+// SourceList::Item::ReleaseInfo - Shorter version of the URI /*{{{*/
+// ---------------------------------------------------------------------
+/* This is a shorter version that is designed to be < 60 chars or so */
+string pkgSourceList::Item::ReleaseInfo() const
+{
+ string Res;
+ switch (Type)
+ {
+ case Deb:
+ Res += SiteOnly(URI) + ' ';
+ if (Dist[Dist.size() - 1] == '/')
+ Res += Dist;
+ else
+ Res += Dist + '/' + Section;
+
+ Res += " Release";
+ break;
+ };
+ return Res;
+}
+ /*}}}*/
// SourceList::Item::ArchiveInfo - Shorter version of the archive spec /*{{{*/
// ---------------------------------------------------------------------
/* This is a shorter version that is designed to be < 60 chars or so */