xbps-{install,remove}: print guards in post-install/pre-remove messages.
This avoids the need to manually add them to the {INSTALL,REMOVE}.msg files in binary packages, and saves some bytes in the repository archive and binary packages. Idea by @dominikh.
This commit is contained in:
parent
e3b76ac30a
commit
f80df0fa22
@ -141,7 +141,10 @@ state_cb(const struct xbps_state_cb_data *xscd, void *cbdata _unused)
|
|||||||
rv = yesno("Do you want to import this public key?");
|
rv = yesno("Do you want to import this public key?");
|
||||||
break;
|
break;
|
||||||
case XBPS_STATE_SHOW_INSTALL_MSG:
|
case XBPS_STATE_SHOW_INSTALL_MSG:
|
||||||
printf("%s: post-install message:\n%s", xscd->arg, xscd->desc);
|
printf("%s: post-install message:\n", xscd->arg);
|
||||||
|
printf("========================================================================\n");
|
||||||
|
printf("%s", xscd->desc);
|
||||||
|
printf("========================================================================\n");
|
||||||
break;
|
break;
|
||||||
case XBPS_STATE_UNPACK_FILE_PRESERVED:
|
case XBPS_STATE_UNPACK_FILE_PRESERVED:
|
||||||
printf("%s\n", xscd->desc);
|
printf("%s\n", xscd->desc);
|
||||||
|
@ -92,7 +92,10 @@ state_cb_rm(const struct xbps_state_cb_data *xscd, void *cbdata _unused)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XBPS_STATE_SHOW_REMOVE_MSG:
|
case XBPS_STATE_SHOW_REMOVE_MSG:
|
||||||
printf("%s: pre-remove message:\n%s", xscd->arg, xscd->desc);
|
printf("%s: pre-remove message:\n", xscd->arg);
|
||||||
|
printf("========================================================================\n");
|
||||||
|
printf("%s", xscd->desc);
|
||||||
|
printf("========================================================================\n");
|
||||||
break;
|
break;
|
||||||
/* errors */
|
/* errors */
|
||||||
case XBPS_STATE_REMOVE_FAIL:
|
case XBPS_STATE_REMOVE_FAIL:
|
||||||
|
Loading…
Reference in New Issue
Block a user