Proposal (and yes, I'm willing to do stuff!): Must Use More Macros

Kevin Kofler kevin.kofler at chello.at
Fri Jun 5 18:33:28 UTC 2009


Adam Williamson wrote:
> %{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)}
> %{!?tcl_sitelib: %global tcl_sitelib %{_datadir}/tcl%{tcl_version}}"
> 
> %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
> distutils.sysconfig import get_python_lib; print get_python_lib()")}"

This kind of stuff should really be provided in RPM macros in a package
which is BRed anyway (tcl resp. python themselves are good candidates). I
really don't see why the macro has to be defined by the specfile itself,
that makes no sense. For KDE 4, that kind of macros is defined by
kde-filesystem. MinGW does the same in mingw32-filesystem now. It's also
kinda silly to have to query the tcl or python binary at runtime for this.
The RPM macro should be set to a constant value by a package which KNOWS
the constant value (again, like it is in KDE and MinGW, we're not calling
kde4-config each time to figure out where to put files!).

        Kevin Kofler




More information about the fedora-devel-list mailing list