summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-10-12 15:57:53 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-11-04 18:04:01 +0100
commit14341a7ee1ca3dbcdcdbe10ad19b947ce23d972d (patch)
treeff8d00ce2347061a0ca8f28fc6ff55173c125abc /apt-pkg/cacheset.cc
parent64b66a46a7fc9e7070ee6a758013a6059fee691e (diff)
support .deb files in upgrade operations as well
The main part is refactoring through to allow hiding the magic needed to support .deb files in deeper layers of libapt so that frontends have less exposure to Debian specific classes like debDebPkgFileIndex.
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 {