xbps_repository_pool_find_pkg: return ENODEV in bestpkg case if pkg not installed.

This commit is contained in:
Juan RP 2011-10-31 21:29:37 +01:00
parent 5aca09b5f5
commit e472fc1334

View File

@ -142,8 +142,11 @@ repo_find_best_pkg_cb(struct repository_pool_index *rpi,
* the version currently installed.
*/
instpkgd = xbps_find_pkg_dict_installed(rpf->pattern, false);
if (instpkgd == NULL)
return 0;
if (instpkgd == NULL) {
xbps_dbg_printf("[rpool] `%s' not installed, "
"ignoring...\n", rpf->pattern);
return ENODEV;
}
prop_dictionary_get_cstring_nocopy(instpkgd,
"version", &instver);
prop_dictionary_get_cstring_nocopy(rpf->pkgd,