From e6003a02529eed51952d9d558cc90b37a15405b8 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 18 Aug 2011 15:59:22 -0400 Subject: [PATCH 1/4] CC-2698: Fix for version 2.0 - fixed --- .../DoctrineMigrations/Version20110711161043.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install_minimal/DoctrineMigrations/Version20110711161043.php b/install_minimal/DoctrineMigrations/Version20110711161043.php index 4a0bed554..10821f9b2 100644 --- a/install_minimal/DoctrineMigrations/Version20110711161043.php +++ b/install_minimal/DoctrineMigrations/Version20110711161043.php @@ -27,7 +27,15 @@ class Version20110711161043 extends AbstractMigration $cc_files->addColumn('directory', 'integer', array('notnull' => 0, 'default'=> NULL)); $cc_files->addNamedForeignKeyConstraint('cc_music_dirs_folder_fkey', $cc_music_dirs, array('directory'), array('id'), array('onDelete' => 'CASCADE')); - + + // before 3) we have to delete all entries in cc_schedule with file_id that are not in cc_file table + $this->_addSql("DELETE FROM cc_schedule WHERE cc_schedule.id IN( + SELECT cc_schedule.id + FROM cc_schedule + LEFT JOIN cc_files + ON cc_schedule.file_id = cc_files.id + WHERE cc_files.id IS NULL)"); + /* 3) create a foreign key relationship from cc_schedule to cc_files */ $cc_schedule = $schema->getTable('cc_schedule'); $cc_schedule->addNamedForeignKeyConstraint('cc_files_folder_fkey', $cc_files, array('file_id'), array('id'), array('onDelete' => 'CASCADE')); From c544e0fb1ba287d33a87851b88b913d5ac41cf34 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 18 Aug 2011 17:34:26 -0400 Subject: [PATCH 2/4] CC-2664: Airtime install should check if the DEB package is installed and abort if so - done --- install_minimal/airtime-install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install_minimal/airtime-install b/install_minimal/airtime-install index cc104e775..860cfd18c 100755 --- a/install_minimal/airtime-install +++ b/install_minimal/airtime-install @@ -1,5 +1,11 @@ #!/bin/bash +DEB=$(dpkg -s lame 2> /dev/null | grep Status) +if [[ "$DEB" = "Status: install ok installed" ]]; then + echo -e "\nDebian package of Airtime detected. Please use the debian package to upgrade.\n" + exit 1 +fi + echo -e "\n******************************** Install Begin *********************************" # Absolute path to this script From 8ce4c6ae6a55ebcdfc8f14e15d01bafdddee5fbf Mon Sep 17 00:00:00 2001 From: James Date: Thu, 18 Aug 2011 17:36:20 -0400 Subject: [PATCH 3/4] CC-2664: fixing bug on the code - fixed --- install_minimal/airtime-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_minimal/airtime-install b/install_minimal/airtime-install index 860cfd18c..bf20978d4 100755 --- a/install_minimal/airtime-install +++ b/install_minimal/airtime-install @@ -1,6 +1,6 @@ #!/bin/bash -DEB=$(dpkg -s lame 2> /dev/null | grep Status) +DEB=$(dpkg -s airtime 2> /dev/null | grep Status) if [[ "$DEB" = "Status: install ok installed" ]]; then echo -e "\nDebian package of Airtime detected. Please use the debian package to upgrade.\n" exit 1 From 7ef7df86fb1bd394069e1041a5a2524d5b39c10a Mon Sep 17 00:00:00 2001 From: James Date: Thu, 18 Aug 2011 17:47:18 -0400 Subject: [PATCH 4/4] CC-2684: airtime_install script tries to copy without checking - fixed --- install_minimal/airtime-install | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install_minimal/airtime-install b/install_minimal/airtime-install index bf20978d4..d1e5afa67 100755 --- a/install_minimal/airtime-install +++ b/install_minimal/airtime-install @@ -14,6 +14,7 @@ SCRIPT=`readlink -f $0` SCRIPTPATH=`dirname $SCRIPT` VIRTUAL_ENV_DIR="/usr/lib/airtime/airtime_virtualenv" +VIRTUAL_ENV_SHARE="/usr/share/python-virtualenv/" if [ ! -d "$VIRTUAL_ENV_DIR" ]; then echo -e "\n*** Creating Virtualenv for Airtime ***" EXTRAOPTION=$(virtualenv --help | grep extra-search-dir) @@ -21,9 +22,11 @@ if [ ! -d "$VIRTUAL_ENV_DIR" ]; then if [ "$?" -eq "0" ]; then sudo virtualenv --extra-search-dir=${SCRIPTPATH}/3rd_party --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv else - # copy distibute-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 - cp ${SCRIPTPATH}/3rd_party/distribute-0.6.10.tar.gz /usr/share/python-virtualenv/ + if [ -d "$VIRTUAL_ENV_SHARE" ]; then + cp ${SCRIPTPATH}/3rd_party/distribute-0.6.10.tar.gz /usr/share/python-virtualenv/ + fi sudo virtualenv --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv fi