xbps-uhelper: make the 'version' target also match virtual pkgs.

This commit is contained in:
Juan RP 2013-03-25 21:11:30 +01:00
parent 4411ff82ac
commit e25216822b

View File

@ -155,8 +155,8 @@ main(int argc, char **argv)
if (argc != 2) if (argc != 2)
usage(); usage();
dict = xbps_pkgdb_get_pkg(&xh, argv[1]); if ((((dict = xbps_pkgdb_get_pkg(&xh, argv[1])) == NULL)) &&
if (dict == NULL) (((dict = xbps_pkgdb_get_virtualpkg(&xh, argv[1])) == NULL)))
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
prop_dictionary_get_cstring_nocopy(dict, "pkgver", &version); prop_dictionary_get_cstring_nocopy(dict, "pkgver", &version);