From 60745080a36bbd64b5194bd764cc38dd215dc56d Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 12 Sep 2011 13:02:13 +0300 Subject: [PATCH] Actually remember scriptlet flags in the rpmScript struct - Currently doesn't make any difference but since we actually have a flags member in the struct, might as well use it. Also we'll shortly be needing these during the actual execution too. --- lib/rpmscript.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c index 66ab944..57c24c6 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c @@ -378,16 +378,17 @@ static rpmScript rpmScriptNew(Header h, rpmTagVal tag, const char *body, char *nevra = headerGetAsString(h, RPMTAG_NEVRA); rpmScript script = xcalloc(1, sizeof(*script)); script->tag = tag; + script->flags = flags; script->body = (body != NULL) ? xstrdup(body) : NULL; rasprintf(&script->descr, "%s(%s)", tag2sln(tag), nevra); /* macros need to be expanded before possible queryformat */ - if (script->body && (flags & RPMSCRIPT_FLAG_EXPAND)) { + if (script->body && (script->flags & RPMSCRIPT_FLAG_EXPAND)) { char *body = rpmExpand(script->body, NULL); free(script->body); script->body = body; } - if (script->body && (flags & RPMSCRIPT_FLAG_QFORMAT)) { + if (script->body && (script->flags & RPMSCRIPT_FLAG_QFORMAT)) { /* XXX TODO: handle queryformat errors */ char *body = headerFormat(h, script->body, NULL); free(script->body); -- 2.7.4