summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debindexfile.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:57:45 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:57:45 +0000
commitaf87ab54430b31a0e1840b2c1673c07d74813447 (patch)
tree9f2143bc188495cf84c64c2c54cc9b60e1738bed /apt-pkg/deb/debindexfile.cc
parent70d73d7e0c05939443131ed815fabcd0b087483d (diff)
'apt-cache policy' preferences debug tool.
Author: jgg Date: 2001-04-29 05:13:51 GMT 'apt-cache policy' preferences debug tool.
Diffstat (limited to 'apt-pkg/deb/debindexfile.cc')
-rw-r--r--apt-pkg/deb/debindexfile.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index 2cc1de8a1..38316d17e 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debindexfile.cc,v 1.4 2001/03/13 06:51:46 jgg Exp $
+// $Id: debindexfile.cc,v 1.5 2001/04/29 05:13:51 jgg Exp $
/* ######################################################################
Debian Specific sources.list types and the three sorts of Debian
@@ -74,11 +74,15 @@ pkgSrcRecords::Parser *debSourcesIndex::CreateSrcParser() const
// SourcesIndex::Describe - Give a descriptive path to the index /*{{{*/
// ---------------------------------------------------------------------
/* */
-string debSourcesIndex::Describe() const
+string debSourcesIndex::Describe(bool Short) const
{
char S[300];
- snprintf(S,sizeof(S),"%s (%s)",Info("Packages").c_str(),
- IndexFile("Sources").c_str());
+ if (Short == true)
+ snprintf(S,sizeof(S),"%s",Info("Packages").c_str());
+ else
+ snprintf(S,sizeof(S),"%s (%s)",Info("Packages").c_str(),
+ IndexFile("Sources").c_str());
+
return S;
}
/*}}}*/
@@ -188,11 +192,14 @@ string debPackagesIndex::ArchiveInfo(pkgCache::VerIterator Ver) const
// ---------------------------------------------------------------------
/* This should help the user find the index in the sources.list and
in the filesystem for problem solving */
-string debPackagesIndex::Describe() const
+string debPackagesIndex::Describe(bool Short) const
{
char S[300];
- snprintf(S,sizeof(S),"%s (%s)",Info("Packages").c_str(),
- IndexFile("Packages").c_str());
+ if (Short == true)
+ snprintf(S,sizeof(S),"%s",Info("Packages").c_str());
+ else
+ snprintf(S,sizeof(S),"%s (%s)",Info("Packages").c_str(),
+ IndexFile("Packages").c_str());
return S;
}
/*}}}*/