From e25216822bc51b5ff1a87cbe980d1a96843a3a93 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 25 Mar 2013 21:11:30 +0100 Subject: [PATCH] xbps-uhelper: make the 'version' target also match virtual pkgs. --- bin/xbps-uhelper/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/xbps-uhelper/main.c b/bin/xbps-uhelper/main.c index f1eb1119..25acd456 100644 --- a/bin/xbps-uhelper/main.c +++ b/bin/xbps-uhelper/main.c @@ -155,8 +155,8 @@ main(int argc, char **argv) if (argc != 2) usage(); - dict = xbps_pkgdb_get_pkg(&xh, argv[1]); - if (dict == NULL) + if ((((dict = xbps_pkgdb_get_pkg(&xh, argv[1])) == NULL)) && + (((dict = xbps_pkgdb_get_virtualpkg(&xh, argv[1])) == NULL))) exit(EXIT_FAILURE); prop_dictionary_get_cstring_nocopy(dict, "pkgver", &version);