Install newer yum and yum-utils on precise

Fixes ISO build failure. Apparently the version of yum (and yum-utils)
shipped with precise is unable to handle OSCI repositories metadata.

Change-Id: Icf1b4226b7b6a73da821cdc2fef60372b1b4c9a2
Closes-bug: #1381535
This commit is contained in:
Alexei Sheplyakov 2014-11-06 10:54:04 +03:00
parent 35eed79fd6
commit 0d3f162547
1 changed files with 22 additions and 0 deletions

View File

@ -20,6 +20,22 @@
# - We need not try to install rubygems on trusty, because it doesn't exists
# - We also should use multistrap version 2.1.6 from devops mirror
# install yum and yum-utils from trusty, so it can handle the meta-data
# of OSCI rpm repositories. Works around ISO build failure (LP #1381535).
update_yum_utils ()
{
local pkgs="yum_3.4.3-2ubuntu1_all.deb yum-utils_1.1.31-2_all.deb"
# required for new yum-utils
local deps="python-iniparse"
local mirror="https://launchpad.net/ubuntu/+archive/primary/+files"
sudo apt-get install $deps
for pkg in $pkgs; do
rm -f $pkg >/dev/null 2>&1
wget "${mirror}/${pkg}"
sudo dpkg -i $pkg
done
}
DISTRO=$(lsb_release -c -s)
case "${DISTRO}" in
@ -119,6 +135,12 @@ else
echo "`whoami` ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
fi
case "${DISTRO}" in
precise)
update_yum_utils
;;
esac
# Fix tmp folder ownership
[ -d ~/tmp ] && sudo chown -R `whoami`.`id -gn` ~/tmp || mkdir ~/tmp