Skip to content
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

Improve macro traceback behavior #1515

Merged
merged 3 commits into from Jan 29, 2021

Conversation

pmatilai
Copy link
Member

@pmatilai pmatilai commented Jan 25, 2021

Revert commit 7f22020 to fix #1418 and make things more consistent.
We always want the tracing output on stderr, but we might not always want the traces so conditionalize the traceback outputing to only occur on verbose levels.

Also generate actually meaningful tracebacks by supplying the macro names where possible.

The rationale behind the change was to suppress the excessive output
when trying to expand a recursive macro definition (RhBug:613010) but
this is not so good as it effectively suppresses *all* backtrace output,
include those requested by %trace where the other half is printed to
stderr and the other half in the debug log because of the change.

Besides making things consistent, this also avoids deadlock on
`rpm -vv --eval '%trace'`.

This reverts commit 7f22020.

Fixes: rpm-software-management#1418
Only dump out macro tracebacks in verbose mode, which incidentally
rpmbuild normally runs in.

Sadly our tracebacks are not as useful as they could be, but improving
that is a separate topic...
@pmatilai pmatilai added the bug label Jan 25, 2021
Should make macro debugging a little saner, including but not limited
to Lua.

Fixes: rpm-software-management#545
@ffesti ffesti merged commit f67d239 into rpm-software-management:master Jan 29, 2021
@pmatilai pmatilai deleted the macroerr-pr branch February 3, 2021 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible deadlock when macro tracing and debug is turned on
2 participants