IMPALA-4570: shell tarball breaks with certain setuptools versions

The bug was in the third-party pkg_resources.py script. The version
check was broken because it matches any version with a "0.7" substring
instead of just versions starting with 0.7.

This is a known bug. setuptools even re-released 20.7.0 as version
20.8.0 to avoid it:
e5822f0d5b

Testing:
I was unable to reproduce this locally, but I think the fix is clear-cut
enough that this is ok.

Change-Id: I0565c0e6c1be7d82c3f35d2545ba044a684bb075
Reviewed-on: http://gerrit.cloudera.org:8080/5314
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins
This commit is contained in:
Tim Armstrong
2016-12-01 16:45:15 -08:00
committed by Impala Public Jenkins
parent d484d2f684
commit cdbcdca670

View File

@@ -2292,7 +2292,7 @@ class Distribution(object):
version = self.version
except ValueError:
version = ''
if '0.7' in version:
if version.startswith('0.7'):
raise ValueError(
"A 0.7-series setuptools cannot be installed "
"with distribute. Found one at %s" % str(self.location))
@@ -2593,7 +2593,7 @@ def _override_setuptools(req):
return True
for comparator, version in req.specs:
if comparator in ['==', '>=', '>']:
if '0.7' in version:
if version.startswith('0.7'):
# We want some setuptools not from the 0.6 series.
return False
return True