From bb041083f197d6ccdd63e108520f17c76267bf6d Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sat, 17 Apr 2010 19:42:14 +0200 Subject: Improve overlay detection from gitosis.conf --- diff-gitosis-conf-against-repositories-xml.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/diff-gitosis-conf-against-repositories-xml.py b/diff-gitosis-conf-against-repositories-xml.py index 81b2165..20205df 100755 --- a/diff-gitosis-conf-against-repositories-xml.py +++ b/diff-gitosis-conf-against-repositories-xml.py @@ -120,12 +120,21 @@ for section_name in gitosis_conf.sections(): continue _description = gitosis_conf.get(section_name, 'description') - if not gitosis_conf.has_option(section_name, 'gentoo-is-overlay') or \ - not gitosis_conf.getboolean(section_name, 'gentoo-is-overlay'): - if not gitosis_repo_name.endswith('overlay') \ - and not _description.lower().endswith('overlay'): - # TODO print NOT_AN_OVERLAY_MESSAGE % gitosis_repo_name + + if gitosis_conf.has_option(section_name, 'gentoo-dont-add-to-layman'): + continue + + overlay_status_clear = False + if gitosis_conf.has_option(section_name, 'gentoo-is-overlay'): + is_overlay = gitosis_conf.getboolean(section_name, 'gentoo-is-overlay') + if not is_overlay: continue + overlay_status_clear = True + + if not overlay_status_clear \ + and not gitosis_repo_name.endswith('overlay') \ + and not _description.lower().endswith('overlay'): + continue if not is_public(section_name): # TODO print 'Skipping %s (not public)' % gitosis_repo_name -- cgit v1.2.3-65-gdbad