[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Doubts about nested %if in spec file
- From: James Olin Oden <joden lee k12 nc us>
- To: rpm-list redhat com
- Subject: Re: Doubts about nested %if in spec file
- Date: Thu, 30 May 2002 12:26:46 -0500 (EST)
>
> Really? With the exception of the scriptlets (which I assume would simply
> be wrapped in appropriately-named tags)
You could implement as you assume to wrap the script in an appropriately named
tag, but I think it would be better for the script tags to actualy point to
an external file. In this way you could even specify an interpreter. For
example:
<postinstall interpreter="/usr/bin/perl">postinstall.pl</postinstall>
An automatic dependency could then be created for the interpreter. Since
most languages support access to environment variables, the population of
the environment before starting each interpreter (as is already done
with bash) should work fine for passing information about the RPM environment.
Another possibility is for the syntax to support passing particluar
variables to the environment other than the standard ones already passed
by rpm. The syntax might look like:
<script>
<type>postinstall</type>
<name>postinstall.pl</name>
<interprepter>/usr/bin/perl</interpreter>
<var>
<name>X</name>
<value>Y</value>
</var>
</script>
The main point is that if you continue to allow/force the script to
be inline in the XML format you really have to be careful about the script
accidently creating xml syntax (I know there are ways of avoiding this but
none are as clean as just placing the script external to the specfile).
Just my 2cents...james
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]