xbps_set_pkg_state_installed: simplify (API change).

The third optional argument "pkgver" clearly is useless because we can
create it internally with "pkgname" and "version" arguments instead.

Also make the "version" argument mandatory.
This commit is contained in:
Juan RP
2012-04-10 09:43:59 +02:00
parent 341ab01219
commit ef6d1adf91
6 changed files with 27 additions and 35 deletions

View File

@ -625,7 +625,7 @@ xbps_unpack_binary_pkg(prop_dictionary_t pkg_repod)
/*
* Set package state to half-unpacked.
*/
if ((rv = xbps_set_pkg_state_installed(pkgname, version, pkgver,
if ((rv = xbps_set_pkg_state_installed(pkgname, version,
XBPS_PKG_STATE_HALF_UNPACKED)) != 0) {
xbps_set_cb_state(XBPS_STATE_UNPACK_FAIL,
rv, pkgname, version,
@ -647,7 +647,7 @@ xbps_unpack_binary_pkg(prop_dictionary_t pkg_repod)
/*
* Set package state to unpacked.
*/
if ((rv = xbps_set_pkg_state_installed(pkgname, version, pkgver,
if ((rv = xbps_set_pkg_state_installed(pkgname, version,
XBPS_PKG_STATE_UNPACKED)) != 0) {
xbps_set_cb_state(XBPS_STATE_UNPACK_FAIL,
rv, pkgname, version,