xbps_set_pkg_state_installed: added two new optional arguments: version and pkgver.

This can be used to avoid some rare cases where the pkg dictionary is regpkgdb
is in a state where code can be faulty if those objects are not found.
This commit is contained in:
Juan RP
2011-02-22 11:09:39 +01:00
parent 9abcb92e39
commit a306cebc96
6 changed files with 52 additions and 17 deletions

View File

@@ -178,7 +178,7 @@ main(int argc, char **argv)
prop_dictionary_set_cstring(dict, "pkgver", pkgver);
free(pkgver);
rv = xbps_set_pkg_state_installed(argv[1],
rv = xbps_set_pkg_state_installed(argv[1], argv[2], pkgver,
XBPS_PKG_STATE_INSTALLED);
if (rv != 0)
exit(EXIT_FAILURE);