]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cacheset.cc
algorithms: Replace qsort() by thread-safe std::sort()
[apt.git] / apt-pkg / cacheset.cc
index 6b31a4fff2c4527cb516ea93b6076037d368e999..5e60ef54a371e518e738683d372dbdf58c56b0de 100644 (file)
@@ -265,6 +265,7 @@ bool CacheSetHelper::PackageFromPackageName(PackageContainerInterface * const pc
        if (unlikely(Cache.GetPkgCache() == 0))
                return false;
 
+       std::string const pkgstring = pkg;
        size_t const archfound = pkg.find_last_of(':');
        std::string arch;
        if (archfound != std::string::npos) {
@@ -301,7 +302,7 @@ bool CacheSetHelper::PackageFromPackageName(PackageContainerInterface * const pc
                }
        }
 
-       pkgCache::PkgIterator Pkg = canNotFindPkgName(Cache, pkg);
+       pkgCache::PkgIterator Pkg = canNotFindPkgName(Cache, pkgstring);
        if (Pkg.end() == true)
           return false;