]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: parser: Fix logging of replacements
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 22 May 2019 15:24:13 +0000 (16:24 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 22 May 2019 15:24:13 +0000 (16:24 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/parser.c

index ace037bd7b6472bcb5ffb55f88c34653b3ded891..95f800ee9fa19ca80b7ae400f16cad48fc66fee4 100644 (file)
@@ -262,17 +262,14 @@ static char* pakfire_parser_expand_declaration(PakfireParser parser,
                struct pakfire_parser_declaration* v =
                        pakfire_parser_find_declaration(parser, namespace, variable);
 
-               DEBUG(parser->pakfire, "v = %p\n", v);
-
                const char* value = NULL;
                if (v && v->value) {
-                       DEBUG(parser->pakfire, "Replacing %%{%s} with %s = '%s'\n",
-                               variable, v->name, value);
                        value = v->value;
-               } else {
-                       DEBUG(parser->pakfire, "Replacing %%{%s} with an empty string\n", variable);
                }
 
+               DEBUG(parser->pakfire, "Replacing %%{%s} with %s = '%s'\n",
+                       variable, v->name, value);
+
                // Reset offsets to the whole matched string
                start = groups[0].rm_so; end = groups[0].rm_eo;