Anonymous committed 89331a2

Fix EGIT_COMMIT support.

First of all, the variable has to be declared in optenv. Secondly,
git.eclass defaults it to the branch name, so we need to check it more

Comparing it to EGIT_BRANCH may not be the best method to check if user
requested a particular commit (and not branch, for example) but that's
how the eclass does it and it should be sufficient for now.

Comments (0)

Files changed (1)

 class GitSupport(VCSSupport):
 	inherit = 'git'
 	def __init__(self, cpv, env):
 		VCSSupport.__init__(self, cpv, env)
 		if self.env['EGIT_HAS_SUBMODULES'] == 'true':
 			raise NotImplementedError('Submodules are not supported')
-		elif self.env['EGIT_COMMIT']:
+		elif self.env['EGIT_COMMIT'] and self.env['EGIT_COMMIT'] != self.env['EGIT_BRANCH']:
 			raise Exception('EGIT_COMMIT set, package is not really live one')
 	def getpath(self):