From 47eed214a6de18396388a9c64c800b522e09f915 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 27 Jun 2013 18:14:38 +0200 Subject: [PATCH] xbps_repo_get_pkg_revdeps: don't continue if arg is a virtual pkg. --- lib/repo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/repo.c b/lib/repo.c index 28b8e5ae..906cae90 100644 --- a/lib/repo.c +++ b/lib/repo.c @@ -312,6 +312,7 @@ xbps_repo_get_pkg_revdeps(struct xbps_repo *repo, const char *pkg) const char *vpkg; char *buf = NULL; unsigned int i; + bool match = false; if (((pkgd = xbps_rpool_get_pkg(repo->xhp, pkg)) == NULL) && ((pkgd = xbps_rpool_get_virtualpkg(repo->xhp, pkg)) == NULL)) { @@ -342,11 +343,12 @@ xbps_repo_get_pkg_revdeps(struct xbps_repo *repo, const char *pkg) buf = NULL; } if (buf) { + match = true; revdeps = revdeps_match(repo, pkgd, buf); free(buf); } } - if (!xbps_array_count(revdeps)) + if (!match) revdeps = revdeps_match(repo, pkgd, NULL); return revdeps;