Message ID | 20190105193759.3333-5-nicolas.iooss@m4x.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Run tests in python/ with "make test" | expand |
diff --git a/python/sepolgen/src/sepolgen/defaults.py b/python/sepolgen/src/sepolgen/defaults.py index 533a90412475..6e800695b60f 100644 --- a/python/sepolgen/src/sepolgen/defaults.py +++ b/python/sepolgen/src/sepolgen/defaults.py @@ -70,7 +70,10 @@ def attribute_info(): def refpolicy_makefile(): chooser = PathChooser("/etc/selinux/sepolgen.conf") - return chooser("Makefile") + result = chooser("Makefile") + if not os.path.exists(result): + result = chooser("include/Makefile") + return result def headers(): chooser = PathChooser("/etc/selinux/sepolgen.conf")
When running "make install-headers" on refpolicy, /usr/share/selinux/refpolicy/Makefile does not exist but /usr/share/selinux/refpolicy/include/Makefile does. Use it when available. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org> --- python/sepolgen/src/sepolgen/defaults.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)