From 9e363dba038ee7b7c8fae330a6931211e61e8678 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 12 Sep 2011 12:19:15 +0300 Subject: [PATCH] Show all interpreter arguments on --scripts query (ticket #847) - Previously any arguments to interpreter were invisible unless you happened to know that RPMTAG_FOOPROG are actually string arrays despite their type showing plain string, and queried as arrays. This makes all the arguments for all scriptlets supporting interpreter arguments visible on --scripts query and also serves as an example on how to properly query them.i - Perhaps worth noting is the exact formatting of the query: "(using[ %{PRETRANSPROG}]" instead of the more typical style of "(using [%{PRETRANSPROG} ]" to avoid extra trailing blanks. --- rpmpopt.in | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/rpmpopt.in b/rpmpopt.in index c14fb1a..2f4a411 100644 --- a/rpmpopt.in +++ b/rpmpopt.in @@ -14,32 +14,32 @@ rpm alias --scripts --qf '\ %|PRETRANS?{pretrans scriptlet\ -%|PRETRANSPROG?{ (using %{PRETRANSPROG})}|:\n%{PRETRANS}\n}:\ -{%|PRETRANSPROG?{pretrans program: %{PRETRANSPROG}\n}|}|\ +%|PRETRANSPROG?{ (using[ %{PRETRANSPROG}])}|:\n%{PRETRANS}\n}:\ +{%|PRETRANSPROG?{pretrans program:[ %{PRETRANSPROG}]\n}|}|\ \ %|PREIN?{preinstall scriptlet\ -%|PREINPROG?{ (using %{PREINPROG})}|:\n%{PREIN}\n}:\ -{%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\ +%|PREINPROG?{ (using[ %{PREINPROG}])}|:\n%{PREIN}\n}:\ +{%|PREINPROG?{preinstall program:[ %{PREINPROG}]\n}|}|\ \ %|POSTIN?{postinstall scriptlet\ -%|POSTINPROG?{ (using %{POSTINPROG})}|:\n%{POSTIN}\n}:\ -{%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\ +%|POSTINPROG?{ (using[ %{POSTINPROG}])}|:\n%{POSTIN}\n}:\ +{%|POSTINPROG?{postinstall program:[ %{POSTINPROG}]\n}|}|\ \ %|PREUN?{preuninstall scriptlet\ -%|PREUNPROG?{ (using %{PREUNPROG})}|:\n%{PREUN}\n}:\ -{%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\ +%|PREUNPROG?{ (using[ %{PREUNPROG}])}|:\n%{PREUN}\n}:\ +{%|PREUNPROG?{preuninstall program:[ %{PREUNPROG}]\n}|}|\ \ %|POSTUN?{postuninstall scriptlet\ -%|POSTUNPROG?{ (using %{POSTUNPROG})}|:\n%{POSTUN}\n}:\ -{%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\ +%|POSTUNPROG?{ (using[ %{POSTUNPROG}])}|:\n%{POSTUN}\n}:\ +{%|POSTUNPROG?{postuninstall program:[ %{POSTUNPROG}]\n}|}|\ \ %|POSTTRANS?{posttrans scriptlet\ -%|POSTTRANSPROG?{ (using %{POSTTRANSPROG})}|:\n%{POSTTRANS}\n}:\ -{%|POSTTRANSPROG?{posttrans program: %{POSTTRANSPROG}\n}|}|\ +%|POSTTRANSPROG?{ (using[ %{POSTTRANSPROG}])}|:\n%{POSTTRANS}\n}:\ +{%|POSTTRANSPROG?{posttrans program:[ %{POSTTRANSPROG}]\n}|}|\ \ %|VERIFYSCRIPT?{verify scriptlet\ -%|VERIFYSCRIPTPROG?{ (using %{VERIFYSCRIPTPROG}}|:\n%{VERIFYSCRIPT}\n}:\ -{%|VERIFYSCRIPTPROG?{verify program: %{VERIFYSCRIPTPROG}\n}|}|\ +%|VERIFYSCRIPTPROG?{ (using[ %{VERIFYSCRIPTPROG}])}|:\n%{VERIFYSCRIPT}\n}:\ +{%|VERIFYSCRIPTPROG?{verify program:[ %{VERIFYSCRIPTPROG}]\n}|}|\ ' \ --POPTdesc=$"list install/erase scriptlets from package(s)" -- 2.7.4