summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/cacheiterators.h2
-rw-r--r--apt-pkg/deb/deblistparser.cc10
-rw-r--r--apt-pkg/deb/deblistparser.h1
-rw-r--r--apt-pkg/pkgcache.cc4
-rw-r--r--apt-pkg/pkgcache.h1
-rw-r--r--apt-pkg/pkgcachegen.h1
6 files changed, 12 insertions, 7 deletions
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index 33d2ed6be..d8e044f88 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -178,7 +178,7 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
// Accessors
inline const char *VerStr() const {return S->VerStr == 0?0:Owner->StrP + S->VerStr;};
inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;};
- inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;};
+ inline const char *Arch() const {return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;};
inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + S->ParentPkg);};
inline DescIterator DescriptionList() const;
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index f683de423..26841d3d2 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -83,6 +83,13 @@ string debListParser::Architecture() {
return Result;
}
/*}}}*/
+// ListParser::ArchitectureAll /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool debListParser::ArchitectureAll() {
+ return Section.FindS("Architecture") == "all";
+}
+ /*}}}*/
// ListParser::Version - Return the version string /*{{{*/
// ---------------------------------------------------------------------
/* This is to return the string describing the version in debian form,
@@ -101,9 +108,6 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver)
// Parse the section
Ver->Section = UniqFindTagWrite("Section");
- // Parse the architecture
- Ver->Arch = WriteUniqString(Architecture());
-
// Parse multi-arch
if (Section.FindS("Architecture") == "all")
/* Arch all packages can't have a Multi-Arch field,
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index cba4f8e5d..8da051530 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -47,6 +47,7 @@ class debListParser : public pkgCacheGenerator::ListParser
// These all operate against the current section
virtual string Package();
virtual string Architecture();
+ virtual bool ArchitectureAll();
virtual string Version();
virtual bool NewVersion(pkgCache::VerIterator Ver);
virtual string Description();
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 1e4c7edb3..7d98869ea 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -399,7 +399,7 @@ const char *
pkgCache::PkgIterator::CandVersion() const
{
//TargetVer is empty, so don't use it.
- VerIterator version = pkgPolicy::pkgPolicy(Owner).GetCandidateVer(*this);
+ VerIterator version = pkgPolicy(Owner).GetCandidateVer(*this);
if (version.IsGood())
return version.VerStr();
return 0;
@@ -727,7 +727,7 @@ string pkgCache::VerIterator::RelStr()
Res += File.Site();
}
}
- if (S->Arch != 0)
+ if (S->ParentPkg != 0)
Res.append(" [").append(Arch()).append("]");
return Res;
}
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 5f50001d0..5edeedfd1 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -276,7 +276,6 @@ struct pkgCache::Version /*{{{*/
{
map_ptrloc VerStr; // Stringtable
map_ptrloc Section; // StringTable (StringItem)
- map_ptrloc Arch; // StringTable
enum {None, All, Foreign, Same, Allowed} MultiArch;
// Lists
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index 53f09b991..ca5d74a9f 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -112,6 +112,7 @@ class pkgCacheGenerator::ListParser
// These all operate against the current section
virtual string Package() = 0;
virtual string Architecture() = 0;
+ virtual bool ArchitectureAll() = 0;
virtual string Version() = 0;
virtual bool NewVersion(pkgCache::VerIterator Ver) = 0;
virtual string Description() = 0;