[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Doubts about nested %if in spec file
- From: "Jaco Greeff" <jaco puxedo org>
- To: rpm-list redhat com
- Subject: Re: Doubts about nested %if in spec file
- Date: 30 May 2002 20:27:56 -0000
On Thu, 30 May 2002 15:49:25 -0400, Jeff Johnson <jbj@redhat.com> wrote :
> Actually the interpreter needs to be separately distinguished as
> <interpreter>/sbin/ldconfig</interpreter>
Somebody else has mentioned something (staying with my current syntax) in
the order of;
<post>
<script interpreter="/bin/sh">/sbin/ldconfig</script>
...
</post>
Maybe not the best example, but at least the idea is there - execute the
script using the provided interpreter.
> > <files>
> > <file attr="777" uid="rpm" gid="rpm">/var/lib/whatever</file>
>
> I'd attempt to abstract common info somehow, as that's right for
> the majority of files, there's a great deal of redundancy that
> can/should lead to compact expression in XML.
I've really haven't optimised too much currently, but rather, at present
have and almost one to one mapping (spec -> xml). Let's just see if I
understand the abstraction of common info. For a %files section, something
may be written as
%files
%defattr(755,root,root)
/var/lib/one
%attr(777,-,-) /var/lib/two
%attr(-,rpm,rpm) /var/lib/three
The current implementation allows for some abstaction, eg. you don't have to
specify all the stuff for each file. As such the above can be directly
translated to;
<files attr="755" uid="root" gid="root">
<file>/var/lib/one</file>
<file attr="777">/var/lib/two</file>
<file uid="rpm" gid="rpm">/var/lib/three</file>
</files>
Is this more or less what you had in mind? It doesn't give you more than
rpm, but neither does it do anything less. In this specxific example I found
the spec syntax not much of a burden, hence the implementation. Anything big
missing here that can be made easier?
Greetings,
Jaco
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]