Code update

* Add ubuntu 14.04 handling and icehouse repos
* Updated dpkg apt params
* Disabled exit on pip 1.5 detection

Change-Id: I80b2c584e27407d172ad9dfeb4b405099fba9d34
This commit is contained in:
Igor Yozhikov 2014-05-20 20:22:00 +04:00
parent 60205a1e4c
commit 8c0ce97101
2 changed files with 14 additions and 11 deletions

View File

@ -90,7 +90,7 @@ function find_or_install()
case $(lowercase $DISTRO_BASED_ON) in
"debian")
_pkg_mrg_cmd="$PKG_MGR -s $_searching_for"
_pkgr_cmd="$PACKAGER install $_searching_for --yes -o Dpkg::Options::=\"--force-confnew\""
_pkgr_cmd="$PACKAGER install $_searching_for --yes -o Dpkg::Options::=--force-confnew"
;;
*)
_pkg_mrg_cmd="$PKG_MGR -q $_searching_for"
@ -203,8 +203,8 @@ function find_pip()
_pip_ver=$($_cmd --version | grep -oE "[0-9]\.[0-9]" | head -n1)
version_ge $_pip_ver "1.5"
if [ $? -eq 0 ]; then
log "For future use, sorry, use pip v$pip_min_ver, exiting!"
exit 1
log "For future use, experimental, use pip v$pip_min_ver!"
#exit 1
##_pipargs="--allow-unverified --allow-external"
#_pipargs="--allow-all-external"
#mk_dir "/root/.pip"

View File

@ -54,15 +54,18 @@ function install_prerequisites()
fi
find /var/lib/apt/lists/ -name "*cloud.archive*" | grep -q "icehouse_main"
if [ $? -ne 0 ]; then
add-apt-repository -y cloud-archive:icehouse >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then
log "... can't enable \"cloud-archive:havana\", exiting !"
retval=1
return $retval
# Ubuntu 14.04 already has icehouse repos.
if [ $REV != "14.04" ]; then
add-apt-repository -y cloud-archive:icehouse >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then
log "... can't enable \"cloud-archive:havana\", exiting !"
retval=1
return $retval
fi
apt-get update -y
apt-get upgrade -y -o Dpkg::Options::="--force-confnew"
log "..success"
fi
apt-get update -y
apt-get upgrade -y -o Dpkg::Options::="--force-confnew"
log "..success"
fi
;;
"redhat")