diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2010-02-27 03:37:45 +0100 |
---|---|---|
committer | Zac Medico <zmedico@gmail.com> | 2010-03-23 18:51:17 -0700 |
commit | 7c11c8ec5f568984ee720fc677959f9d2c9dfd32 (patch) | |
tree | 29245a70db33d8023509a8a410f93e3c4f4718ec /bin | |
parent | 4866b8f1bc4cc4c089916ea5cd4b6d44691e8c6c (diff) | |
download | portage-7c11c8ec5f568984ee720fc677959f9d2c9dfd32.tar.gz portage-7c11c8ec5f568984ee720fc677959f9d2c9dfd32.tar.bz2 portage-7c11c8ec5f568984ee720fc677959f9d2c9dfd32.zip |
Add check of herds in metadata.xml
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/repoman | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman index 61a2c3359..144c19351 100755 --- a/bin/repoman +++ b/bin/repoman @@ -53,11 +53,13 @@ from portage import StringIO try: from repoman.checks import run_checks from repoman import utilities + from repoman.herdbase import make_herd_base except ImportError: from os import path as osp sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), 'pym')) from repoman.checks import run_checks from repoman import utilities + from repoman.herdbase import make_herd_base from _emerge.Package import Package from _emerge.RootConfig import RootConfig @@ -981,6 +983,11 @@ check_ebuild_notadded = not \ # Build a regex from thirdpartymirrors for the SRC_URI.mirror check. thirdpartymirrors = portage.flatten(list(repoman_settings.thirdpartymirrors().values())) +try: + herd_base = make_herd_base(os.path.join(repoman_settings["PORTDIR"], "metadata/herds.xml")) +except (EnvironmentError, ParseError) as e: + err(str(e)) + for x in scanlist: #ebuilds and digests added to cvs respectively. logging.info("checking package %s" % x) @@ -1316,6 +1323,15 @@ for x in scanlist: fails["metadata.bad"].append("%s/metadata.xml: %s" % (x, e)) del e + # Run other metadata.xml checkers + try: + utilities.check_metadata(_metadata_xml, herd_base) + except (EnvironmentError, ParseError, utilities.UnknownHerdsError) as e: + metadata_bad = True + stats["metadata.bad"] += 1 + fails["metadata.bad"].append("%s/metadata.xml: %s" % (x, e)) + del e + #Only carry out if in package directory or check forced if xmllint_capable and not metadata_bad: # xmlint can produce garbage output even on success, so only dump |