bool CacheSetHelper::PackageFromCommandLine(PackageContainerInterface * const pci, pkgCacheFile &Cache, const char **cmdline) {
bool found = false;
for (const char **I = cmdline; *I != 0; ++I)
- found |= PackageFrom(CacheSetHelper::PACKAGENAME, pci, Cache, *I);
+ found |= PackageFrom(CacheSetHelper::STRING, pci, Cache, *I);
return found;
}
/*}}}*/
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("/=");
verIsRel = (pkg[vertag] == '/');
pkg.erase(vertag);
}
+
+ PackageSet pkgset;
if (onlyFromName == false)
helper.PackageFrom(CacheSetHelper::STRING, &pkgset, Cache, pkg);
else {