From 12cec6e7071a2090a7559df31ac9e9517bbf4f70 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 23 Nov 2009 00:28:57 +0000 Subject: [PATCH] xbps-pkgdb: don't forget to add the pkgver object in register target. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091123002857-ntwcf91swcol7m9d --- bin/xbps-pkgdb/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/xbps-pkgdb/main.c b/bin/xbps-pkgdb/main.c index 7027dbe6..7be7902b 100644 --- a/bin/xbps-pkgdb/main.c +++ b/bin/xbps-pkgdb/main.c @@ -94,7 +94,7 @@ main(int argc, char **argv) { prop_dictionary_t dict; const char *version; - char *plist, *pkgname, *in_chroot_env, *root = ""; + char *plist, *pkgname, *pkgver, *in_chroot_env, *root = ""; bool in_chroot = false; int c, rv = 0; @@ -144,6 +144,11 @@ main(int argc, char **argv) prop_dictionary_set_cstring_nocopy(dict, "pkgname", argv[1]); prop_dictionary_set_cstring_nocopy(dict, "version", argv[2]); prop_dictionary_set_cstring_nocopy(dict, "short_desc", argv[3]); + pkgver = xbps_xasprintf("%s-%s", argv[1], argv[2]); + if (pkgver == NULL) + exit(EXIT_FAILURE); + prop_dictionary_set_cstring(dict, "pkgver", pkgver); + free(pkgver); rv = xbps_set_pkg_state_installed(argv[1], XBPS_PKG_STATE_INSTALLED);