+ /*}}}*/
+// Cache::SingleArchFindPkg - Locate a package by name /*{{{*/
+// ---------------------------------------------------------------------
+/* Returns 0 on error, pointer to the package otherwise
+ The multiArch enabled methods will fallback to this one as it is (a bit)
+ faster for single arch environments and realworld is mostly singlearch… */
+pkgCache::PkgIterator pkgCache::SingleArchFindPkg(const string &Name)
+{
+ // Look at the hash bucket
+ Package *Pkg = PkgP + HeaderP->PkgHashTable[Hash(Name)];
+ for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage)
+ {
+ if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] &&
+ stringcasecmp(Name,StrP + Pkg->Name) == 0)
+ return PkgIterator(*this,Pkg);
+ }
+ return PkgIterator(*this,0);
+}