From e472fc1334d4372030b55ba77fe3b901d7d1bf50 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 31 Oct 2011 21:29:37 +0100 Subject: [PATCH] xbps_repository_pool_find_pkg: return ENODEV in bestpkg case if pkg not installed. --- lib/repository_pool_find.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/repository_pool_find.c b/lib/repository_pool_find.c index fa4c3c8d..979c67ce 100644 --- a/lib/repository_pool_find.c +++ b/lib/repository_pool_find.c @@ -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,