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

@ -53,7 +53,7 @@
* @def XBPS_RELVER
* Current library release date.
*/
#define XBPS_RELVER "20110221"
#define XBPS_RELVER "20110222"
/**
* @def XBPS_META_PATH
@ -1130,11 +1130,16 @@ int xbps_get_pkg_state_dictionary(prop_dictionary_t dict, pkg_state_t *state);
* Sets package state \a state in package \a pkgname.
*
* @param[in] pkgname Package name.
* @param[in] version Package version (optional).
* @param[in] pkgver Package name/version touple (optional).
* @param[in] state Package state to be set.
*
* @return 0 on success, otherwise an errno value.
*/
int xbps_set_pkg_state_installed(const char *pkgname, pkg_state_t state);
int xbps_set_pkg_state_installed(const char *pkgname,
const char *version,
const char *pkgver,
pkg_state_t state);
/**
* Sets package state \a state in package dictionary \a dict.