Added success states for state_cb, move some descriptions to the client cb.

This commit is contained in:
Juan RP
2011-11-25 09:44:49 +01:00
parent 196b26035a
commit f3099fa2c6
8 changed files with 91 additions and 37 deletions

View File

@ -146,8 +146,7 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
}
prop_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver);
prop_dictionary_get_cstring_nocopy(pkgd, "version", &version);
xbps_set_cb_state(XBPS_STATE_PURGE, 0, pkgname, version,
"Purging package `%s'...", pkgver);
xbps_set_cb_state(XBPS_STATE_PURGE, 0, pkgname, version, NULL);
if (check_state) {
/*
@ -233,5 +232,7 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
if ((rv = xbps_unregister_pkg(pkgname, version)) != 0)
return rv;
xbps_set_cb_state(XBPS_STATE_PURGE_DONE, 0, pkgname, version, NULL);
return rv;
}