summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/deb/debindexfile.cc2
-rw-r--r--apt-pkg/pkgcache.h1
-rw-r--r--cmdline/apt-cache.cc2
3 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index f089cda81..944cbe0bf 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -203,7 +203,7 @@ bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
if (Prog != NULL)
Prog->SubProgress(0, Target.Description);
- if (Gen.SelectFile(TranslationFile, *this, "", Target.Option(IndexTarget::COMPONENT), pkgCache::Flag::NotSource) == false)
+ if (Gen.SelectFile(TranslationFile, *this, "", Target.Option(IndexTarget::COMPONENT), pkgCache::Flag::NotSource | pkgCache::Flag::NoPackages) == false)
return _error->Error("Problem with SelectFile %s",TranslationFile.c_str());
// Store the IMS information
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 696b3b94d..3cc85f1e8 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -195,6 +195,7 @@ class pkgCache /*{{{*/
enum PkgFFlags {
NotSource=(1<<0), /*!< packages can't be fetched from here, e.g. dpkg/status file */
LocalSource=(1<<1), /*!< local sources can't and will not be verified by hashes */
+ NoPackages=(1<<2), /*!< the file includes no package records itself, but additions like Translations */
};
enum ReleaseFileFlags {
NotAutomatic=(1<<0), /*!< archive has a default pin of 1 */
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 3b8ebc96d..c2f6dbd5c 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1638,6 +1638,8 @@ static bool Policy(CommandLine &CmdL)
cout << _("Package files:") << endl;
for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F.end() == false; ++F)
{
+ if (F.Flagged(pkgCache::Flag::NoPackages))
+ continue;
// Locate the associated index files so we can derive a description
pkgIndexFile *Indx;
if (SrcList->FindIndex(F,Indx) == false &&