Skip to content

Commit

Permalink
repoman: Fix unsupported eapi continuing with remaining checks. bug 5…
Browse files Browse the repository at this point in the history
…81600

Tighten up the xpkg loop and the use of the xpkg_continue bolean for invalid pkg or ebuilds.
This still allows addtional checks for some types of errors, while completely bypassing the 
remaining checks for EAPI.unsupported.

X-gentoo-bug: 581600
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=581600
  • Loading branch information
dol-sen committed Apr 30, 2016
1 parent a2ee8a9 commit 6ead9b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
15 changes: 12 additions & 3 deletions pym/repoman/modules/scan/ebuild/ebuild.py
Expand Up @@ -166,7 +166,8 @@ def check_isebuild(self, **kwargs):
@param checkdir: current package directory path
@param xpkg: current package directory being checked
@param validity_future: Future instance
@returns: dictionary, including {pkgs, can_force}
@param can_force: boolean
@returns: bolean
'''
checkdirlist = kwargs.get('checkdirlist').get()
checkdir = kwargs.get('checkdir')
Expand Down Expand Up @@ -208,6 +209,7 @@ def check_isebuild(self, **kwargs):
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))
self._abandon_ship(can_force)
continue
pkgs[pf] = Package(
cpv=cpv, metadata=myaux, root_config=self.root_config,
Expand All @@ -219,14 +221,21 @@ def check_isebuild(self, **kwargs):
# Do not try to do any more QA checks on this package since missing
# metadata leads to false positives for several checks, and false
# positives confuse users.
self.continue_ = True
can_force.set(False, ignore_InvalidState=True)
self._abandon_ship(can_force)
self.pkgs = pkgs
# set our updated data
dyn_pkgs = kwargs.get('pkgs')
dyn_pkgs.set(pkgs)
return self.continue_

def _abandon_ship(self, can_force):
'''Internal function to set some important return values
@param can_force: boolean
'''
self.continue_ = True
can_force.set(False, ignore_InvalidState=True)

@property
def runInPkgs(self):
'''Package level scans'''
Expand Down
7 changes: 7 additions & 0 deletions pym/repoman/scanner.py
Expand Up @@ -336,8 +336,15 @@ def scan_pkgs(self, can_force):
# Do not try to do any more QA checks on this package since missing
# metadata leads to false positives for several checks, and false
# positives confuse users.
logging.debug("xpkg function loop, continue triggered from function: %s",
func)
xpkg_continue = True
break
if not dynamic_data['validity_future'].get() and xpkg_continue:
logging.debug("Invalid ebuild detected...Aborting")
break
elif xpkg_continue:
continue

if xpkg_continue:
continue
Expand Down

0 comments on commit 6ead9b7

Please sign in to comment.