commit:     94472883f86338c8c877bfc3af57d4d6815915ed
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 30 09:01:24 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Apr 30 09:01:24 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=94472883

repoman/modules/.../ebuild.py: Add InvalidPackageName exception trap bug 581598 

This adds the "ebuild.invalidname" qa notice for the ebuild.

X-Gentoo-bug: 581598
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=581598

 pym/repoman/modules/scan/ebuild/ebuild.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pym/repoman/modules/scan/ebuild/ebuild.py 
b/pym/repoman/modules/scan/ebuild/ebuild.py
index 7b31fcd..28cb8b4 100644
--- a/pym/repoman/modules/scan/ebuild/ebuild.py
+++ b/pym/repoman/modules/scan/ebuild/ebuild.py
@@ -14,6 +14,7 @@ from repoman.qa_data import no_exec, allvars
 from repoman._portage import portage
 from portage import os
 from portage.const import LIVE_ECLASSES
+from portage.exception import InvalidPackageName
 
 pv_toolong_re = re.compile(r'[0-9]{19,}')
 
@@ -200,6 +201,10 @@ class Ebuild(ScanBase):
                                        fuse.set(False, 
ignore_InvalidState=True)
                                        
self.qatracker.add_error("ebuild.output", os.path.join(xpkg, y))
                                        continue
+                               except InvalidPackageName:
+                                       fuse.set(False, 
ignore_InvalidState=True)
+                                       
self.qatracker.add_error("ebuild.invalidname", os.path.join(xpkg, y))
+                                       continue
                                if not portage.eapi_is_supported(myaux["EAPI"]):
                                        fuse.set(False, 
ignore_InvalidState=True)
                                        
self.qatracker.add_error("EAPI.unsupported", os.path.join(xpkg, y))

Reply via email to