aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2015-10-20 15:10:12 +0530
committerNaresh Kamboju <naresh.kamboju@linaro.org>2015-10-20 17:14:09 +0530
commita109643883d6c3d908f53aaea249100e72125959 (patch)
treecaf7a4e81064cc81988d2f903ac202e54b044a91
parent690302ce6a685baf444657100afaa9698e8a59b8 (diff)
prerequisites: upgrade pip version
Some versions of pip (in particluar v1.5.4 which comes with Ubuntu 14.04) are know to set the wrong permissions when installing packages, resulting in WA failing to import them. To avoid this it is recommended that you update pip and setuptools before proceeding with installation. Following file upgrade pip version on kvm host machine before install-wa2.sh - prerequisites.sh Reference: http://pythonhosted.org/wlauto/installation.html#prerequisites LAVA test job: https://validation.linaro.org/scheduler/job/566907.0 Change-Id: If2397c069b7befb0311a9a53640f38130adef60b Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-xinstall-wa2.sh22
-rwxr-xr-xprerequisites.sh42
-rw-r--r--wa2host.yaml1
3 files changed, 65 insertions, 0 deletions
diff --git a/install-wa2.sh b/install-wa2.sh
index b7fa1b3..af24bc3 100755
--- a/install-wa2.sh
+++ b/install-wa2.sh
@@ -1,6 +1,28 @@
+# Workload Automation v2 for LAVA
+#
+# Copyright (C) 2015, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Naresh Kamboju <naresh.kamboju@linaro.org>
+#
+
BUILD_TOOLS_URL=$1
WA_HOME_URL=$2
+export PATH=$PATH:/usr/local/bin
# install SDK build-tools
echo "install SDK build-tools"
cd /usr/
diff --git a/prerequisites.sh b/prerequisites.sh
new file mode 100755
index 0000000..2eba199
--- /dev/null
+++ b/prerequisites.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+#
+# Workload Automation v2 for LAVA
+#
+# Copyright (C) 2015, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Naresh Kamboju <naresh.kamboju@linaro.org>
+#
+
+apt-get -y install python-pip || true
+export PATH=$PATH:/usr/bin
+PIP_VERSION=`pip --version | awk '{print $2}'`
+PIP_OLD_VERSION="1.5.4"
+if [ "$PIP_VERSION" == $PIP_OLD_VERSION ]; then
+
+ which pip
+ pip --version
+
+ sudo chmod -R a+r /usr/local/lib/python2.7/dist-packages
+ sudo find /usr/local/lib/python2.7/dist-packages -type d -exec chmod a+x {} \;
+ sudo pip install --upgrade pip --force
+ sudo pip install --upgrade setuptools
+
+ export PATH=$PATH:/usr/local/bin
+ which pip
+ pip --version
+fi
+exit 0
diff --git a/wa2host.yaml b/wa2host.yaml
index ccf5d7c..f3467f5 100644
--- a/wa2host.yaml
+++ b/wa2host.yaml
@@ -28,6 +28,7 @@ params:
install:
steps:
+ - './prerequisites.sh'
- './install-wa2.sh $BUILD_TOOLS_URL $WA_HOME_URL'
deps:
- git