diff options
author | Julian Andres Klode <jak@debian.org> | 2019-01-04 17:11:26 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2019-01-04 17:11:26 +0000 |
commit | d87d15beb103a20728348a0f4a4cedec8192ea6d (patch) | |
tree | e18cbfc0edecda5c817b82ec82a920bcc18f31b8 /apt-pkg/deb/deblistparser.cc | |
parent | d4be30586e85c8c89d7c8e68304092e9f57a3119 (diff) | |
parent | 563fedea263361b0786303f58dccc1a9a733e1d9 (diff) |
Merge branch 'pu/speedups' into 'master'
Pu/speedups
See merge request apt-team/apt!42
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index e8dff833d..80ca10e37 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -61,6 +61,7 @@ debListParser::debListParser(FileFd *File) : else forceEssential.emplace_back("apt"); forceImportant = _config->FindVector("pkgCacheGen::ForceImportant"); + myArch = _config->Find("APT::Architecture"); } /*}}}*/ // ListParser::Package - Return the package name /*{{{*/ @@ -621,12 +622,11 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, // We don't want to confuse library users which can't handle MultiArch if (StripMultiArch == true) { - string const arch = _config->Find("APT::Architecture"); size_t const found = Package.rfind(':'); if (found != StringView::npos && (Package.substr(found) == ":any" || Package.substr(found) == ":native" || - Package.substr(found +1) == arch)) + Package.substr(found +1) == Arch)) Package = Package.substr(0,found); } @@ -848,7 +848,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver, StringView Version; unsigned int Op; - Start = ParseDepends(Start, Stop, Package, Version, Op, false, false, false); + Start = ParseDepends(Start, Stop, Package, Version, Op, false, false, false, myArch); if (Start == 0) return _error->Error("Problem parsing dependency %zu",static_cast<size_t>(Key)); // TODO size_t const found = Package.rfind(':'); |