From de160a5a2bcd1b2e769165f80052ad38122999c0 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Sat, 20 Feb 2010 20:09:14 +0000 Subject: bcfg2-repo-validate: Add check for genshi bundles Signed-off-by: Sol Jerome git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5733 ce84e21b-d406-0410-9b95-82705330c041 --- src/sbin/bcfg2-repo-validate | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sbin/bcfg2-repo-validate b/src/sbin/bcfg2-repo-validate index 939fe2a07..33c06dffd 100755 --- a/src/sbin/bcfg2-repo-validate +++ b/src/sbin/bcfg2-repo-validate @@ -57,11 +57,12 @@ if __name__ == '__main__': # get all XIncluded bundles xdata.xinclude() for bundle in xdata.findall("//Bundle"): - ref_bundles.add("%s/Bundler/%s.xml" % (repo, bundle.get('name'))) + ref_bundles.add("%s/Bundler/%s" % (repo, bundle.get('name'))) # get lists of all other xml files to validate clients_list = glob.glob("%s/Metadata/clients.xml" % repo) bundle_list = glob.glob("%s/Bundler/*.xml" % repo) + genshibundle_list = glob.glob("%s/Bundler/*.genshi" % repo) pkg_list = glob.glob("%s/Pkgmgr/*.xml" % repo) base_list = glob.glob("%s/Base/*.xml" % repo) rules_list = glob.glob("%s/Rules/*.xml" % repo) @@ -150,7 +151,12 @@ if __name__ == '__main__': if verbose: print("") for bundle in ref_bundles: - if bundle not in bundle_list: + # check for both regular and genshi bundles + xmlbundle = "%s.xml" % bundle + genshibundle = "%s.genshi" % bundle + allbundles = bundle_list + genshibundle_list + if xmlbundle not in allbundles and \ + genshibundle not in allbundles: print("*** Warning: Bundle %s referenced, but does not " "exist." % bundle) -- cgit v1.2.3-1-g7c22