libxbps: some tweaks for struct xbps_state_cb_data.

- Renamed args pkgname/version to arg0/arg1 to make them generic.
- Update bins with this and make some tweaks in state_cb.

Bumped API version.
This commit is contained in:
Juan RP
2012-11-07 10:11:06 +01:00
parent 89d892d98f
commit ca095df52f
5 changed files with 35 additions and 40 deletions

View File

@@ -89,7 +89,7 @@ state_cb_rm(struct xbps_handle *xhp,
switch (xscd->state) {
/* notifications */
case XBPS_STATE_REMOVE:
printf("Removing `%s-%s' ...\n", xscd->pkgname, xscd->version);
printf("Removing `%s-%s' ...\n", xscd->arg0, xscd->arg1);
break;
/* success */
case XBPS_STATE_REMOVE_FILE:
@@ -103,10 +103,10 @@ state_cb_rm(struct xbps_handle *xhp,
break;
case XBPS_STATE_REMOVE_DONE:
printf("Removed `%s-%s' successfully.\n",
xscd->pkgname, xscd->version);
xscd->arg0, xscd->arg1);
if (syslog_enabled)
syslog(LOG_NOTICE, "Removed `%s-%s' successfully "
"(rootdir: %s).", xscd->pkgname, xscd->version,
"(rootdir: %s).", xscd->arg0, xscd->arg1,
xhp->rootdir);
break;
/* errors */