]> git.ipfire.org Git - pakfire.git/commitdiff
cli: builder: Show questions we are always saying yes to
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 31 Oct 2023 17:31:48 +0000 (17:31 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 31 Oct 2023 17:31:48 +0000 (17:31 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/cli/pakfire-builder.c

index 583b4a1f81632ac7facb51a9347790d296cdd1dd..5c30678d250f021a0a120e452d7f11a50b5ea30c 100644 (file)
@@ -134,6 +134,15 @@ static error_t parse(int key, char* arg, struct argp_state* state, void* data) {
        return 0;
 }
 
+static int cli_confirm(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+               void* data, const char* message, const char* question) {
+       // Just print the message
+       if (message)
+               printf("%s\n", message);
+
+       return 0;
+}
+
 int main(int argc, char* argv[]) {
        struct pakfire_ctx* ctx = NULL;
        int r;
@@ -143,6 +152,9 @@ int main(int argc, char* argv[]) {
        if (r)
                goto ERROR;
 
+       // Setup confirm callback
+       pakfire_ctx_set_confirm_callback(ctx, cli_confirm, NULL);
+
        // Setup progress callback
        pakfire_ctx_set_progress_callback(ctx, cli_setup_progressbar, NULL);