CC-3736: Full Install fail at Ubuntu 12.04
-various fixes
This commit is contained in:
parent
db2ccb1859
commit
141d27bf27
|
@ -1,6 +1,3 @@
|
||||||
#!/usr/bin/env python2.6
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This file holds the implementations for all the API clients.
|
# This file holds the implementations for all the API clients.
|
||||||
#
|
#
|
||||||
|
|
|
@ -64,7 +64,6 @@ class MediaMonitorCommon:
|
||||||
except IOError:
|
except IOError:
|
||||||
self.logger.warn("File does not have correct permissions: '%s'", filepath)
|
self.logger.warn("File does not have correct permissions: '%s'", filepath)
|
||||||
readable = False
|
readable = False
|
||||||
self.logger.error("traceback: %s", traceback.format_exc())
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
self.logger.error("Unexpected exception thrown: %s", e)
|
self.logger.error("Unexpected exception thrown: %s", e)
|
||||||
readable = False
|
readable = False
|
||||||
|
|
|
@ -100,10 +100,12 @@ try:
|
||||||
print e
|
print e
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
logging.basicConfig(format='%(asctime) %(message)s')
|
||||||
|
logger = logging.getLogger()
|
||||||
|
|
||||||
#generate liquidsoap config file
|
#generate liquidsoap config file
|
||||||
#access the DB and generate liquidsoap.cfg under /etc/airtime/
|
#access the DB and generate liquidsoap.cfg under /etc/airtime/
|
||||||
ac = api_client.api_client_factory(config)
|
ac = api_client.api_client_factory(config, logger)
|
||||||
ss = ac.get_stream_setting()
|
ss = ac.get_stream_setting()
|
||||||
|
|
||||||
if ss is not None:
|
if ss is not None:
|
||||||
|
|
|
@ -38,14 +38,14 @@ echo -e "\n*** Creating Virtualenv for Airtime ***"
|
||||||
EXTRAOPTION=$(virtualenv --help | grep extra-search-dir)
|
EXTRAOPTION=$(virtualenv --help | grep extra-search-dir)
|
||||||
|
|
||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
virtualenv --extra-search-dir=${SCRIPTPATH}/3rd_party --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv 2>/dev/null || exit 1
|
virtualenv --extra-search-dir=${SCRIPTPATH}/3rd_party --no-site-package -p /usr/bin/python /usr/lib/airtime/airtime_virtualenv 2>/dev/null || exit 1
|
||||||
else
|
else
|
||||||
# copy distribute-0.6.10.tar.gz to /usr/share/python-virtualenv/
|
# copy distribute-0.6.10.tar.gz to /usr/share/python-virtualenv/
|
||||||
# this is due to the bug in virtualenv 1.4.9
|
# this is due to the bug in virtualenv 1.4.9
|
||||||
if [ -d "$VIRTUAL_ENV_SHARE" ]; then
|
if [ -d "$VIRTUAL_ENV_SHARE" ]; then
|
||||||
cp ${SCRIPTPATH}/3rd_party/distribute-0.6.10.tar.gz /usr/share/python-virtualenv/
|
cp ${SCRIPTPATH}/3rd_party/distribute-0.6.10.tar.gz /usr/share/python-virtualenv/
|
||||||
fi
|
fi
|
||||||
virtualenv --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv 2>/dev/null || exit 1
|
virtualenv --no-site-package -p /usr/bin/python /usr/lib/airtime/airtime_virtualenv 2>/dev/null || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\n*** Installing Python Libraries ***"
|
echo -e "\n*** Installing Python Libraries ***"
|
||||||
|
@ -58,7 +58,7 @@ if [ -d $file ]; then
|
||||||
DIRNAME=$(basename $file)
|
DIRNAME=$(basename $file)
|
||||||
echo -e "\n ---Applying Patches for $DIRNAME---"
|
echo -e "\n ---Applying Patches for $DIRNAME---"
|
||||||
else
|
else
|
||||||
patch -N -p0 -i $file
|
patch -N -p7 -i $file -d /usr/lib/airtime/airtime_virtualenv/lib/python2.7/
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue