From 4b5a153a579f05bf89520d9378568cc55b5ce38f Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 10 Apr 2017 19:09:26 -0400 Subject: [PATCH] Force python2.7 for bindep-env We are currently seeing the following traceback for fedora-25: Traceback (most recent call last): File "/usr/bindep-env/bin/bindep", line 11, in sys.exit(main()) File "/usr/bindep-env/lib/python3.5/site-packages/bindep/main.py", line 64, in main errors = depends.check_rules(rules) File "/usr/bindep-env/lib/python3.5/site-packages/bindep/depends.py", line 205, in check_rules installed = self.platform.get_pkg_version(rule[0]) File "/usr/bindep-env/lib/python3.5/site-packages/bindep/depends.py", line 313, in get_pkg_version universal_newlines=True).decode('utf-8') AttributeError: 'str' object has no attribute 'decode' Until fixed, pin to python2.7. Change-Id: I5ac830b5f2f841dc50dafb58dccad6602afe448a Signed-off-by: Paul Belanger --- nodepool/elements/cache-bindep/install.d/40-install-bindep | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nodepool/elements/cache-bindep/install.d/40-install-bindep b/nodepool/elements/cache-bindep/install.d/40-install-bindep index a19ae97185..e499d86506 100755 --- a/nodepool/elements/cache-bindep/install.d/40-install-bindep +++ b/nodepool/elements/cache-bindep/install.d/40-install-bindep @@ -22,5 +22,6 @@ if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then fi set -e -sudo -H virtualenv /usr/bindep-env +# TODO(pabelanger): Force python2.7 for now, until we can fix bindep properly. +sudo -H virtualenv --python /usr/bin/python2.7 /usr/bindep-env sudo -H /usr/bindep-env/bin/pip install bindep