##################################################################### */
/*}}}*/
// Include Files /*{{{*/
-#ifdef __GNUG__
-#pragma implementation "apt-pkg/debindexfile.h"
-#endif
-
#include <apt-pkg/debindexfile.h>
#include <apt-pkg/debsrcrecords.h>
#include <apt-pkg/deblistparser.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/debmetaindex.h>
-
+
#include <sys/stat.h>
/*}}}*/
FileFd Rel(ReleaseFile,FileFd::ReadOnly);
if (_error->PendingError() == true)
return false;
- Parser.LoadReleaseInfo(File,Rel);
+ Parser.LoadReleaseInfo(File,Rel,Section);
}
return true;
pkgCache::PkgFileIterator File = Cache.FileBegin();
for (; File.end() == false; File++)
{
- if (FileName != File.FileName())
+ if (File.FileName() == NULL || FileName != File.FileName())
continue;
struct stat St;
/* */
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()),
/*}}}*/
bool debTranslationsIndex::HasPackages() const
{
- if(!UseTranslation())
+ if(!TranslationsAvailable())
return false;
return FileExists(IndexFile(LanguageCode().c_str()));
{
// 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);