From: Michael Tremer Date: Thu, 9 Dec 2021 13:10:20 +0000 (+0000) Subject: parser: Improve debugging output when expanding a value fails X-Git-Tag: 0.9.28~830 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6107586a5c774bee50dd2ba47adbb88ca6a2f1c9;p=pakfire.git parser: Improve debugging output when expanding a value fails Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/parser.c b/src/libpakfire/parser.c index 0d4cab0fb..8b5d33319 100644 --- a/src/libpakfire/parser.c +++ b/src/libpakfire/parser.c @@ -613,19 +613,25 @@ char* pakfire_parser_expand(struct pakfire_parser* parser, // Compile all regular expressions int r = pakfire_parser_compile_regexes(parser); - if (r) + if (r) { + DEBUG(parser->pakfire, "Could not compile regular expressions: %m\n"); goto ERROR; + } // Expand all variables r = pakfire_parser_expand_variables(parser, namespace, &buffer); - if (r) + if (r) { + DEBUG(parser->pakfire, "Failed to expand variables in '%s': %m\n", value); goto ERROR; + } // Expand all commands if (parser->flags & PAKFIRE_PARSER_FLAGS_EXPAND_COMMANDS) { r = pakfire_parser_expand_commands(parser, &buffer); - if (r) + if (r) { + DEBUG(parser->pakfire, "Failed to expand commands in '%s': %m\n", value); goto ERROR; + } } return buffer;