1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-24 14:20:59 +03:00

fix package name check

This commit is contained in:
david hill
2016-02-23 15:52:45 -06:00
parent 98041433f3
commit 7dd06e6a4d
3 changed files with 32 additions and 39 deletions

View File

@@ -14,17 +14,13 @@ set USERNAME root
set MODULE [lindex $argv 0]
set SERVER [lindex $argv 1]
set PASSWORD [lindex $argv 2]
set CALPONTRPM1 [lindex $argv 3]
set CALPONTRPM2 [lindex $argv 4]
set CALPONTRPM3 [lindex $argv 5]
set CALPONTMYSQLRPM [lindex $argv 6]
set CALPONTMYSQLDRPM [lindex $argv 7]
set INSTALLTYPE [lindex $argv 8]
set PKGTYPE [lindex $argv 9]
set NODEPS [lindex $argv 10]
set DEBUG [lindex $argv 11]
set VERSION [lindex $argv 3]
set INSTALLTYPE [lindex $argv 4]
set PKGTYPE [lindex $argv 5]
set NODEPS [lindex $argv 6]
set DEBUG [lindex $argv 7]
set INSTALLDIR "/usr/local/Calpont"
set IDIR [lindex $argv 12]
set IDIR [lindex $argv 8]
if { $IDIR != "" } {
set INSTALLDIR $IDIR
}
@@ -43,17 +39,17 @@ log_user $DEBUG
spawn -noecho /bin/bash
#
if { $PKGTYPE == "rpm" } {
set PKGERASE "rpm -e --nodeps $(rpm -qa | grep '^infinidb')"
set PKGERASE "rpm -e --nodeps '$'(rpm -qa | grep '^infinidb')"
set PKGERASE1 "rpm -e --nodeps "
set PKGINSTALL "rpm -ivh $NODEPS --force "
set PKGUPGRADE "rpm -Uvh --noscripts "
set PKGINSTALL "rpm -ivh $NODEPS --force infinidb*$VERSION*"
set PKGUPGRADE "rpm -Uvh --noscripts infinidb*$VERSION*"
} else {
if { $PKGTYPE == "deb" } {
set PKGERASE "dpkg -P $(dpkg --get-selections | grep '^infinidb')"
set PKGERASE "dpkg -P '$'(dpkg --get-selections | grep '^infinidb')"
set PKGERASE1 "dpkg -P "
set PKGINSTALL "dpkg -i --force-confnew"
set PKGUPGRADE "dpkg -i --force-confnew"
set PKGINSTALL "dpkg -i --force-confnew infinidb*$VERSION*"
set PKGUPGRADE "dpkg -i --force-confnew infinidb*$VERSION*"
} else {
if { $PKGTYPE != "bin" } {
send_user "Invalid Package Type of $PKGTYPE"
@@ -146,7 +142,7 @@ expect {
-re {[$#] } { }
}
send "scp $CALPONTRPM1 $USERNAME@$SERVER:.;$PKGERASE dummy\n"
send "scp $HOME/infinidb*$VERSION* $USERNAME@$SERVER:.;$PKGERASE dummy\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {

View File

@@ -14,24 +14,20 @@ set USERNAME root
set MODULE [lindex $argv 0]
set SERVER [lindex $argv 1]
set PASSWORD [lindex $argv 2]
set CALPONTRPM1 [lindex $argv 3]
set CALPONTRPM2 [lindex $argv 4]
set CALPONTRPM3 [lindex $argv 5]
set CALPONTMYSQLRPM [lindex $argv 6]
set CALPONTMYSQLDRPM [lindex $argv 7]
set INSTALLTYPE [lindex $argv 8]
set PKGTYPE [lindex $argv 9]
set NODEPS [lindex $argv 10]
set MYSQLPW [lindex $argv 11]
set MYSQLPORT [lindex $argv 12]
set DEBUG [lindex $argv 13]
set VERSION [lindex $argv 3]
set INSTALLTYPE [lindex $argv 4]
set PKGTYPE [lindex $argv 5]
set NODEPS [lindex $argv 6]
set MYSQLPW [lindex $argv 7]
set MYSQLPORT [lindex $argv 8]
set DEBUG [lindex $argv 9]
set INSTALLDIR "/usr/local/Calpont"
set IDIR [lindex $argv 14]
set IDIR [lindex $argv 10]
if { $IDIR != "" } {
set INSTALLDIR $IDIR
}
set USERNAME "root"
set UNM [lindex $argv 15]
set UNM [lindex $argv 11]
if { $UNM != "" } {
set USERNAME $UNM
}
@@ -49,17 +45,17 @@ log_user $DEBUG
spawn -noecho /bin/bash
#
if { $PKGTYPE == "rpm" } {
set PKGERASE "rpm -e --nodeps $(rpm -qa | grep '^infinidb')"
set PKGERASE "rpm -e --nodeps '$'(rpm -qa | grep '^infinidb')"
set PKGERASE1 "rpm -e --nodeps "
set PKGINSTALL "rpm -ivh $NODEPS --force "
set PKGUPGRADE "rpm -Uvh --noscripts "
set PKGINSTALL "rpm -ivh $NODEPS --force infinidb*$VERSION*"
set PKGUPGRADE "rpm -Uvh --noscripts infinidb*$VERSION*"
} else {
if { $PKGTYPE == "deb" } {
set PKGERASE "dpkg -P $(dpkg --get-selections | grep '^infinidb')"
set PKGERASE "dpkg -P '$'(dpkg --get-selections | grep '^infinidb')"
set PKGERASE1 "dpkg -P "
set PKGINSTALL "dpkg -i --force-confnew"
set PKGUPGRADE "dpkg -i --force-confnew"
set PKGINSTALL "dpkg -i --force-confnew infinidb*$VERSION*"
set PKGUPGRADE "dpkg -i --force-confnew infinidb*$VERSION*"
} else {
send_user "Invalid Package Type of $PKGTYPE"
exit 1
@@ -148,7 +144,7 @@ expect {
-re {[$#] } { }
}
send "scp $CALPONTRPM1 $USERNAME@$SERVER:.;$PKGERASE dummy\n"
send "scp $HOME/infinidb*$VERSION* $USERNAME@$SERVER:.;$PKGERASE dummy\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {

View File

@@ -2920,6 +2920,7 @@ int main(int argc, char *argv[])
}
//check if pkgs are located in $HOME directory
string version = systemsoftware.Version + "-" + systemsoftware.Release;
if ( EEPackageType != "binary") {
string separator = "-";
if ( EEPackageType == "deb" )
@@ -3085,7 +3086,7 @@ int main(int argc, char *argv[])
temppwprompt = "none";
//run remote installer script
cmd = installDir + "/bin/user_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpontPackage1 + " " + calpontPackage2 + " " + calpontPackage3 + " " + mysqlPackage + " " + mysqldPackage + " initial " + EEPackageType + " " + nodeps + " " + temppwprompt + " " + mysqlPort + " " + remote_installer_debug + " " + debug_logfile;
cmd = installDir + "/bin/user_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + EEPackageType + " " + nodeps + " " + temppwprompt + " " + mysqlPort + " " + remote_installer_debug + " " + debug_logfile;
cout << cmd << endl;
if ( thread_remote_installer ) {
@@ -3234,7 +3235,7 @@ cout << cmd << endl;
if ( EEPackageType != "binary" ) {
//run remote installer script
cmd = installDir + "/bin/performance_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpontPackage1 + " " + calpontPackage2 + " " + calpontPackage3 + " " + mysqlPackage + " " + mysqldPackage + " initial " + EEPackageType + " " + nodeps + " " + remote_installer_debug + " " + debug_logfile;
cmd = installDir + "/bin/performance_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + EEPackageType + " " + nodeps + " " + remote_installer_debug + " " + debug_logfile;
cout << cmd << endl;
if ( thread_remote_installer ) {