On 16. 03. 21 20:22, Jos de Kloe wrote:
in general I think explicit is better than implicit
(and since I am Dutch, this seems obvious to me).
But regarding your question, I think a better argument for creating a
to prevent mistakes from packagers. I think that is more relevant than avoiding
a few lines of code in a spec file.
The examples I've put are really not that complex as %py3_build/%py3_install, so
I don't think "error prevention" would apply for them.
For myself, I am happy as long as I can find or print the definition
of a macro
easily. For some this is easy enough, i.e.:
> rpm --eval '%py3_install'
/usr/bin/python3 setup.py install -O1 --skip-build --root
and this also illustrates my earlier point, since I am sure I would forget
setting this CFLAGS and LD_FLAGS often (are they really needed for plain python
No, they are not needed for noarch packages, but they are needed or extension
modules and since we don't want a different set of macros for noarch/arch, we
set it everywhere.
But for other macros this just doesn't work, i.e.:
> rpm --eval '%autosetup'
error: lua script failed: attempt to index a nil value
Yes, some macros need the context defined in the spec file, this one needs a
And actually, it is also not obvious to me where this one is defined
(a grep on
the files in /usr/lib/rpm/macros.d/ did not tell me anything relevant).
This macro is defined directly in the /usr/lib/rpm/macros file.
Thanks for the input Jos, I really appreciate it.