You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/12/03 04:44:00 UTC

incubator-impala git commit: IMPALA-4570: shell tarball breaks with certain setuptools versions

Repository: incubator-impala
Updated Branches:
  refs/heads/master d484d2f68 -> cdbcdca67


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:
https://github.com/pypa/setuptools/commit/e5822f0d5be6386bf86cde03988bfdf1bfc2e935

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 <ta...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/cdbcdca6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/cdbcdca6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/cdbcdca6

Branch: refs/heads/master
Commit: cdbcdca67018fe77ee7a33a11695ca89cf8d476a
Parents: d484d2f
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Thu Dec 1 16:45:15 2016 -0800
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Sat Dec 3 03:34:16 2016 +0000

----------------------------------------------------------------------
 shell/pkg_resources.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/cdbcdca6/shell/pkg_resources.py
----------------------------------------------------------------------
diff --git a/shell/pkg_resources.py b/shell/pkg_resources.py
index 92e01db..aca743a 100644
--- a/shell/pkg_resources.py
+++ b/shell/pkg_resources.py
@@ -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