summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-05-13 21:31:54 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-05-13 21:31:54 +0000
commit11680bfd380d52c96feeb76600e50a145838b329 (patch)
treedeeae00624d07bc55391df97bdcd0e5beba96196 /apt-pkg/deb
parent4d34acf1a0c8319fa498d4dd6ac5cfd369d3c29e (diff)
* don't throw any more warnings
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debindexfile.cc8
-rw-r--r--apt-pkg/deb/debindexfile.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index b57493b9e..5510ad161 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -401,6 +401,14 @@ string debTranslationsIndex::Info(const char *Type) const
return Info;
}
/*}}}*/
+bool debTranslationsIndex::HasPackages() const
+{
+ if(!UseTranslation())
+ return false;
+
+ return FileExists(IndexFile(LanguageCode().c_str()));
+}
+
// TranslationsIndex::Exists - Check if the index is available /*{{{*/
// ---------------------------------------------------------------------
/* */
diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h
index 02c776882..57005222f 100644
--- a/apt-pkg/deb/debindexfile.h
+++ b/apt-pkg/deb/debindexfile.h
@@ -96,7 +96,7 @@ class debTranslationsIndex : public pkgIndexFile
// Interface for the Cache Generator
virtual bool Exists() const;
- virtual bool HasPackages() const { return UseTranslation();};
+ virtual bool HasPackages() const;
virtual unsigned long Size() const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;