summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debindexfile.cc6
-rw-r--r--apt-pkg/deb/deblistparser.cc10
-rw-r--r--apt-pkg/deb/debmetaindex.cc4
3 files changed, 12 insertions, 8 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index 5510ad161..23cc7d075 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -358,7 +358,7 @@ string debTranslationsIndex::IndexURI(const char *Type) const
/* */
bool debTranslationsIndex::GetIndexes(pkgAcquire *Owner) const
{
- if (UseTranslation()) {
+ if (TranslationsAvailable()) {
string TranslationFile = "Translation-" + LanguageCode();
new pkgAcqIndexTrans(Owner, IndexURI(LanguageCode().c_str()),
Info(TranslationFile.c_str()),
@@ -403,7 +403,7 @@ string debTranslationsIndex::Info(const char *Type) const
/*}}}*/
bool debTranslationsIndex::HasPackages() const
{
- if(!UseTranslation())
+ if(!TranslationsAvailable())
return false;
return FileExists(IndexFile(LanguageCode().c_str()));
@@ -435,7 +435,7 @@ bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const
{
// Check the translation file, if in use
string TranslationFile = IndexFile(LanguageCode().c_str());
- if (UseTranslation() && FileExists(TranslationFile))
+ if (TranslationsAvailable() && FileExists(TranslationFile))
{
FileFd Trans(TranslationFile,FileFd::ReadOnly);
debListParser TransParser(&Trans);
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 6e78ed42b..fcc31ec2c 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -143,14 +143,16 @@ string debListParser::DescriptionLanguage()
/*}}}*/
// ListParser::Description - Return the description_md5 MD5SumValue /*{{{*/
// ---------------------------------------------------------------------
-/* This is to return the md5 string to allow the check if is the right
- description. If thisreturns a blank string then calculate the md5
- value. */
+/* This is to return the md5 string to allow the check if it is the right
+ description. If no Description-md5 is found in the section it will be
+ calculated.
+ */
MD5SumValue debListParser::Description_md5()
{
string value = Section.FindS("Description-md5");
- if (value.empty()) {
+ if (value.empty())
+ {
MD5Summation md5;
md5.Add((Description() + "\n").c_str());
return md5.Result();
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 9c7828d6a..8dfbf7aff 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -189,8 +189,10 @@ vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles()
if ((*I)->IsSrc)
Indexes->push_back(new debSourcesIndex (URI, Dist, (*I)->Section, IsTrusted()));
else
+ {
Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted()));
- Indexes->push_back(new debTranslationsIndex(URI,Dist,(*I)->Section));
+ Indexes->push_back(new debTranslationsIndex(URI, Dist, (*I)->Section));
+ }
}
return Indexes;