X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0e72dd523557b84a3b37988d23d99eae1d79a657..74c1e22b4a6b7c8d89e5d563f7a1f48d25b38fef:/apt-pkg/deb/debindexfile.cc diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index dcc916c1a..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.3 2001/02/23 06:41:55 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; } /*}}}*/ @@ -417,7 +424,8 @@ class debSLTypeDeb : public pkgSourceList::Type public: bool CreateItem(vector &List,string URI, - string Dist,string Section) const + string Dist,string Section, + pkgSourceList::Vendor const *Vendor) const { List.push_back(new debPackagesIndex(URI,Dist,Section)); return true; @@ -435,8 +443,9 @@ class debSLTypeDebSrc : public pkgSourceList::Type public: bool CreateItem(vector &List,string URI, - string Dist,string Section) const - { + string Dist,string Section, + pkgSourceList::Vendor const *Vendor) const + { List.push_back(new debSourcesIndex(URI,Dist,Section)); return true; };