diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-27 23:09:23 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-27 23:09:23 +0000 |
commit | 2ebaee0adc496323d472dc52eeb0fa5ded924796 (patch) | |
tree | 08cb6040d22731d279a20881820726c05af78c32 | |
parent | 2ab7c2f4d0708b33f07446b759a02e5f08f7e8a2 (diff) | |
download | portage-2ebaee0adc496323d472dc52eeb0fa5ded924796.tar.gz portage-2ebaee0adc496323d472dc52eeb0fa5ded924796.tar.bz2 portage-2ebaee0adc496323d472dc52eeb0fa5ded924796.zip |
Fix the new glep56 code to handle missing metadata.xml. Thanks to jmbsvicetto
for reporting.
svn path=/main/trunk/; revision=11226
-rwxr-xr-x | bin/repoman | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/bin/repoman b/bin/repoman index 35807c658..c45622a00 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1061,6 +1061,8 @@ for x in scanlist: fails["changelog.missing"].append(x+"/ChangeLog") #metadata.xml file check + muselist = [] + if "metadata.xml" not in checkdirlist: stats["metadata.missing"]+=1 fails["metadata.missing"].append(x+"/metadata.xml") @@ -1080,15 +1082,14 @@ for x in scanlist: stats["metadata.bad"]+=1 fails["metadata.bad"].append(x+"/metadata.xml") - #load USE flags from metadata.xml - muselist=[] - try: - f = open(os.path.join(checkdir, "metadata.xml")) - utilities.parse_metadata_use(f, muselist) - f.close() - except (IOError, OSError, ParseError), e: - logging.exception("Couldn't read from metadata.xml", e) - sys.exit(1) + #load USE flags from metadata.xml + try: + f = open(os.path.join(checkdir, "metadata.xml")) + utilities.parse_metadata_use(f, muselist) + f.close() + except (EnvironmentError, ParseError), e: + logging.exception("Couldn't read from metadata.xml: %s" % (e,)) + sys.exit(1) allmasked = True |