8000 `Too many levels of recursion in macro expansion` error when calling `Specfile.update_version()` · Issue #402 · packit/specfile · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 span class="author flex-self-stretch" itemprop="author"> / specfile Public

Too many levels of recursion in macro expansion error when calling Specfile.update_version() #402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nforro opened this issue Jul 24, 2024 · 0 comments
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task; should be done within days gain/low Doesn't bring much value to users impact/low Affects only few of the users kind/bug An unexpected problem or behavior workaround-exists There is a workaround that can be used in the meantime

Comments

@nforro
Copy link
Member
nforro commented Jul 24, 2024

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")
@nforro nforro added the workaround-exists There is a workaround that can be used in the meantime label Jul 24, 2024
@nforro nforro changed the title Too many levels of recursion in macro expansion error when running Specfile.update_version() Too many levels of recursion in macro expansion error when calling Specfile.update_version() Jul 24, 2024
@lbarcziova lbarcziova added kind/bug An unexpected problem or behavior area/fedora Related to Fedora ecosystem complexity/single-task Regular task; should be done within days impact/low Affects only few of the users gain/low Doesn't bring much value to users labels Jul 25, 2024
@lbarcziova lbarcziova moved this from new to backlog in Packit Kanban Board Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task; should be done within days gain/low Doesn't bring much value to users impact/low Affects only few of the users kind/bug An unexpected problem or behavior workaround-exists There is a workaround that can be used in the meantime
Projects
Status: backlog
Development

No branches or pull requests

2 participants
0