[Fedora-packaging] Call rpm during rpmbuild
Richard W.M. Jones
rjones at redhat.com
Tue Jun 5 13:29:13 UTC 2007
I'm right in thinking that it's bad to call rpm from rpmbuild?
During my find-requires script, I need to get the exact
name-version-release of the ocaml compiler. Obviously the compiler
knows its name & version, but not its release.
At the moment I'm doing:
if [ -n "$emit_compiler_version" ]; then
# Every OCaml program depends on the precise version of the
# compiler which was used to compile it.
rpm -q --qf '%{NAME} = %{VERSION}-%{RELEASE}\n' ocaml
fi
but if calling rpm like this is bad, I'm wondering how to fix it. Best
way I can see to do this is to store the name-version-release of the
compiler in a special file in the ocaml RPM, something like:
/usr/lib64/ocaml/fedora-ocaml-release
which would contain something like 3.09.0-3 or whatever, then the script
can be changed to cat this file.
What do people think?
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20070605/520131c4/attachment.bin>
More information about the Fedora-packaging
mailing list