summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/cacheset.cc')
-rw-r--r--apt-pkg/cacheset.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index 5e60ef54a..db34c4a20 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -441,14 +441,6 @@ bool VersionContainerInterface::FromString(VersionContainerInterface * const vci
CacheSetHelper::VerSelector const fallback,
CacheSetHelper &helper,
bool const onlyFromName) {
- PackageSet pkgset;
- if(FileExists(pkg)) {
- helper.PackageFrom(CacheSetHelper::STRING, &pkgset, Cache, pkg);
- if(pkgset.empty() == true)
- return false;
- return VersionContainerInterface::FromPackage(vci, Cache, pkgset.begin(), fallback, helper);
- }
-
std::string ver;
bool verIsRel = false;
size_t const vertag = pkg.find_last_of("/=");
@@ -457,6 +449,8 @@ bool VersionContainerInterface::FromString(VersionContainerInterface * const vci
verIsRel = (pkg[vertag] == '/');
pkg.erase(vertag);
}
+
+ PackageSet pkgset;
if (onlyFromName == false)
helper.PackageFrom(CacheSetHelper::STRING, &pkgset, Cache, pkg);
else {