summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-01-22 02:00:42 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-01-25 18:15:44 +0100
commit074564d40c21cb063bf327e9151a4e24cd9534b5 (patch)
tree68a12653bd3f9cc57d74d74ede08c5d9b05fcfb1 /apt-pkg/pkgcache.cc
parent529bf9b00dfd3c0472d77e9515007e52a3557bc4 (diff)
use consistently the last : as name:arch separator
Proper debian packages do not contain ':' in the package name, so for real packages this is a non-issue, but apt itself frequently makes use of packages with such an illegal name for internal proposes. Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index d2ecb8b1f..d6dd169bb 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -263,7 +263,7 @@ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) {
}
pkgCache::PkgIterator pkgCache::FindPkg(StringView Name) {
- auto const found = Name.find(':');
+ auto const found = Name.rfind(':');
if (found == string::npos)
return FindPkg(Name, "native");
auto const Arch = Name.substr(found+1);