Trivial reproducer:
# recursive macro definition
%global cflags "-O3 %{cflags}"
Name: test
Version: 0.1
Release: %autorelease
Summary: Test package
License: MIT
%description
Test package
%changelog
%autochangelog
spec = Specfile("test.spec")
spec.update_version("0.2")
This raises specfile.exceptions.RPMException: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration..
A workaround is to define the macro (even to an empty value):
spec = Specfile("test.spec", macros=[("cflags", "")])
spec.update_version("0.2")
Trivial reproducer:
This raises
specfile.exceptions.RPMException: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration..A workaround is to define the macro (even to an empty value):