Skip to content

Detect endless #include loop when parsing profiles

If an include file includes itsself (for example if local/foo has '#include <local/foo>'), print a warning instead of calling load_include() again and again.

This fixes a crash when hitting such a case: RecursionError: maximum recursion depth exceeded while calling a Python object

Fixes: https://bugzilla.suse.com/show_bug.cgi?id=1184779 for the tools. The parser will also need a fix.

I propose this fix for 3.0 and master. (Older versions have completely different code for handling include rules, and would need a different fix.)

Edited by Christian Boltz

Merge request reports