I swear I searched for this one, but I didn't find it. Then again, I think this one's so far out in left field that maybe not so many people see it.
I've got a spec file, and part of it looks like this:
%{expand:%(tar xzfO %{S:0} <filename>}
In that file, I have a common construct:
> %define apacheDevelName %{apacheName}-devel%if "%(rpm -qf /etc/issue --qf %%{name})" == "redhat-release" %define apacheName %(rpm -q --qf "%%{name}" --whatprovides webserver) %else %define apacheName apache %endif
This is probably something EVERYONE's seen, unfortunately, or at least anyone who builds package for RH7 and RH9 and which depends on the web server being present (Joe, can ya toss a provides:webserver-devel in there?).
The problem is, when %expand picks up the output of the %(), it runs BOTH parts of the %if. It leads me to believe that %expand only deals with things line-by-line. True? If so, how does one do an %if/else like the above on a single line?
I fear much bashing.
Thanks for your time, folks. Happy Saturnalia.
- bish
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list