summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/deblistparser.cc39
-rw-r--r--apt-pkg/deb/deblistparser.h9
2 files changed, 7 insertions, 41 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index cb2b15668..c7c4ffe77 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -50,13 +50,9 @@ static debListParser::WordList PrioList[] = {
/* Provide an architecture and only this one and "all" will be accepted
in Step(), if no Architecture is given we will accept every arch
we would accept in general with checkArchitecture() */
-debListParser::debListParser(FileFd *File, string const &Arch) :
- pkgCacheListParser(), d(NULL), Tags(File), Arch(Arch)
+debListParser::debListParser(FileFd *File) :
+ pkgCacheListParser(), d(NULL), Tags(File)
{
- if (Arch == "native")
- this->Arch = _config->Find("APT::Architecture");
- Architectures = APT::Configuration::getArchitectures();
- MultiArchEnabled = Architectures.size() > 1;
}
/*}}}*/
// ListParser::Package - Return the package name /*{{{*/
@@ -887,34 +883,7 @@ bool debListParser::GrabWord(string Word,WordList *List,unsigned char &Out)
bool debListParser::Step()
{
iOffset = Tags.Offset();
- while (Tags.Step(Section) == true)
- {
- /* See if this is the correct Architecture, if it isn't then we
- drop the whole section. A missing arch tag only happens (in theory)
- inside the Status file, so that is a positive return */
- string const Architecture = Section.FindS("Architecture");
-
- if (Arch.empty() == true || Arch == "any" || MultiArchEnabled == false)
- {
- if (APT::Configuration::checkArchitecture(Architecture) == true)
- return true;
- /* parse version stanzas without an architecture only in the status file
- (and as misfortune bycatch flat-archives) */
- if ((Arch.empty() == true || Arch == "any") && Architecture.empty() == true)
- return true;
- }
- else
- {
- if (Architecture == Arch)
- return true;
-
- if (Architecture == "all" && Arch == _config->Find("APT::Architecture"))
- return true;
- }
-
- iOffset = Tags.Offset();
- }
- return false;
+ return Tags.Step(Section);
}
/*}}}*/
// ListParser::GetPrio - Convert the priority from a string /*{{{*/
@@ -950,7 +919,7 @@ bool debListParser::SameVersion(unsigned short const Hash, /*{{{*/
/*}}}*/
debDebFileParser::debDebFileParser(FileFd *File, std::string const &DebFile)
- : debListParser(File, ""), DebFile(DebFile)
+ : debListParser(File), DebFile(DebFile)
{
}
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index 975620070..747e022d8 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -45,9 +45,6 @@ class APT_HIDDEN debListParser : public pkgCacheListParser
pkgTagFile Tags;
pkgTagSection Section;
map_filesize_t iOffset;
- std::string Arch;
- std::vector<std::string> Architectures;
- bool MultiArchEnabled;
virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
bool ParseDepends(pkgCache::VerIterator &Ver,const char *Tag,
@@ -96,7 +93,7 @@ class APT_HIDDEN debListParser : public pkgCacheListParser
APT_PUBLIC static const char *ConvertRelation(const char *I,unsigned int &Op);
- debListParser(FileFd *File, std::string const &Arch = "");
+ debListParser(FileFd *File);
virtual ~debListParser();
};
@@ -118,8 +115,8 @@ class APT_HIDDEN debTranslationsParser : public debListParser
virtual std::string Architecture() APT_OVERRIDE { return ""; }
virtual std::string Version() APT_OVERRIDE { return ""; }
- debTranslationsParser(FileFd *File, std::string const &Arch = "")
- : debListParser(File, Arch) {};
+ debTranslationsParser(FileFd *File)
+ : debListParser(File) {};
};
#endif