On Fri, Aug 28, 2020 at 01:47:14PM -0000, Martin Gansser wrote:
> when I want to do a review with: fedora-review -m fedora-rawhide-x86_64 -b
> 1873407
> i get this error message:
>
> warning: line 16: Possible unexpanded macro in: Requires:
> vdr(abi)(x86-64) = %{vdr_apiversion}
It means the %{vdr_apiversion} macro is not defined
> Building target platforms: x86_64
> Building for target x86_64
> setting SOURCE_DATE_EPOCH=1598313600
> Wrote: /builddir/build/SRPMS/vdr-skinelchihd-0.5.0-1.fc34.src.rpm
when building the source package.
> How can i solve this ?
>
Requires tags are evaluated when building a source package, although they are
not used at this stage in any way. This is a deficiency in a rpmbuild tool.
Until (if ever) it is fixed in rpmbuild, you need to work around it in the
spec file.
First, the macro is not available in a minimal build root used for build
source packages. Thus you need to check its definess and use it only if it is
defined:
Requires: vdr(abi)(%{_isa}) = %{?vdr_apiversion:%{vdr_apiversion}}
But that's not all. The Requires tag value must be a valid dependency value
after the expansion. In that form it would yield an invalid dependency value
"vdr(abi)(x86-64) = ". Thus you need either to supply a dummy value after the
equal sign if the macro is not defined, or better just do not generate the
dependency at all:
%if %{defined vdr_apiversion}
Requires: vdr(abi)(%{_isa}) = %{vdr_apiversion}
%endif
-- Petr
signature.asc
Description: PGP signature
_______________________________________________ devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
