Using %global instead of %define in conditionalized macro expressions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Or to place it more explicit make

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
[%{!?foo: %define foo ...}]

to

%{!?python_sitelib:%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
[%{!?foo:%global foo ...}]

Otherwise using parametrized macros can mess things up (#237448). The
nesting levels seems to get mixed up and the conditionalized
definition above get swallowed away. The %global ensures that this
bug doesn't happen.

It may also be cleaner to remove the space between the colon and the
percent sign.
-- 
Axel.Thimm at ATrpms.net

Attachment: pgppYTmAycsaj.pgp
Description: PGP signature

--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux