Skip to content

Commit

Permalink
Show all interpreter arguments on --scripts query (ticket rpm-softwar…
Browse files Browse the repository at this point in the history
…e-management#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.
  • Loading branch information
pmatilai committed Sep 12, 2011
1 parent 527fa4a commit 9e363db
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions rpmpopt.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)"

Expand Down

0 comments on commit 9e363db

Please sign in to comment.