You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-24 14:20:59 +03:00
MCOL-811 - removed the preuninstall and added check for binary on the post-install
This commit is contained in:
@@ -411,21 +411,41 @@ int main(int argc, char *argv[])
|
||||
exit (1);
|
||||
}
|
||||
|
||||
//if InitialInstallFlag is set, then an install has been done
|
||||
// run pre-uninstall to clean from previous install and continue
|
||||
try {
|
||||
string InitialInstallFlag = sysConfig->getConfig(InstallSection, "InitialInstallFlag");
|
||||
if ( InitialInstallFlag == "y" ) {
|
||||
cmd = installDir + "/bin/pre-uninstall --quiet > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{}
|
||||
//determine package type
|
||||
string EEPackageType;
|
||||
|
||||
//run post install for coverage of possible binary package install
|
||||
cmd = installDir + "/bin/post-install --installdir=" + installDir + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
if (!rootUser)
|
||||
EEPackageType = "binary";
|
||||
else
|
||||
{
|
||||
int rtnCode = system("rpm -qi mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
|
||||
if (WEXITSTATUS(rtnCode) == 0)
|
||||
EEPackageType = "rpm";
|
||||
else {
|
||||
rtnCode = system("dpkg -s mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
|
||||
if (WEXITSTATUS(rtnCode) == 0)
|
||||
EEPackageType = "deb";
|
||||
else
|
||||
EEPackageType = "binary";
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
sysConfig->setConfig(InstallSection, "EEPackageType", EEPackageType);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cout << "ERROR: Problem setting EEPackageType from the MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//if binary install, then run post-install just in case the user didnt run it
|
||||
if ( EEPackageType == "binary" )
|
||||
{
|
||||
//run post install
|
||||
cmd = installDir + "/bin/post-install --installdir=" + installDir + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
//check Config saved files
|
||||
if ( !checkSaveConfigFile())
|
||||
@@ -434,7 +454,12 @@ int main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//check for local ip address as pm1
|
||||
if ( !writeConfig(sysConfig) ) {
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//check for local ip address as pm1
|
||||
ModuleConfig moduleconfig;
|
||||
|
||||
try
|
||||
@@ -2676,40 +2701,6 @@ int main(int argc, char *argv[])
|
||||
/* create a thread_data_t argument array */
|
||||
thread_data_t thr_data[childmodulelist.size()];
|
||||
|
||||
// determine package type
|
||||
string EEPackageType;
|
||||
|
||||
if (!rootUser)
|
||||
EEPackageType = "binary";
|
||||
else
|
||||
{
|
||||
int rtnCode = system("rpm -qi mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
|
||||
if (WEXITSTATUS(rtnCode) == 0)
|
||||
EEPackageType = "rpm";
|
||||
else {
|
||||
rtnCode = system("dpkg -s mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
|
||||
if (WEXITSTATUS(rtnCode) == 0)
|
||||
EEPackageType = "deb";
|
||||
else
|
||||
EEPackageType = "binary";
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
sysConfig->setConfig(InstallSection, "EEPackageType", EEPackageType);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cout << "ERROR: Problem setting EEPackageType from the MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( !writeConfig(sysConfig) ) {
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
string install = "y";
|
||||
|
||||
if ( IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM ||
|
||||
|
||||
Reference in New Issue
Block a user