}
int pakfire_confirm(struct pakfire* pakfire, const char* message, const char* question) {
- // No callback configured
- if (!pakfire->callbacks.confirm)
- return 0;
-
// Run callback
- return pakfire->callbacks.confirm(
- pakfire, pakfire->callbacks.confirm_data, message, question);
+ if (pakfire->callbacks.confirm)
+ return pakfire->callbacks.confirm(
+ pakfire, pakfire->callbacks.confirm_data, message, question);
+
+ // If no callback is set, we just log the message
+ INFO(pakfire, "%s\n", message);
+
+ return 0;
}
static const char* pakfire_user_lookup(void* data, la_int64_t uid) {
goto ERROR;
}
- // Write transaction dump to log
- INFO(transaction->pakfire, "%s\n", dump);
-
// Perform a check if this can actually be run
r = pakfire_transaction_check(transaction);
if (r)