summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-repo-validate
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2010-02-20 20:09:14 +0000
committerSol Jerome <solj@ices.utexas.edu>2010-02-20 20:09:14 +0000
commitde160a5a2bcd1b2e769165f80052ad38122999c0 (patch)
treeb8f3428b66e26222270b91a3f7d9e5e86c718c6c /src/sbin/bcfg2-repo-validate
parenteb523d884b225f0f8c77ee4a1f678945c3d3d209 (diff)
downloadbcfg2-de160a5a2bcd1b2e769165f80052ad38122999c0.tar.gz
bcfg2-de160a5a2bcd1b2e769165f80052ad38122999c0.tar.bz2
bcfg2-de160a5a2bcd1b2e769165f80052ad38122999c0.zip
bcfg2-repo-validate: Add check for genshi bundles
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5733 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2-repo-validate')
-rwxr-xr-xsrc/sbin/bcfg2-repo-validate10
1 files 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)