diff --git a/script/impl/postuninstall/PostUninstallImpl.py b/script/impl/postuninstall/PostUninstallImpl.py index 696cae908b084eab7634a548e3a98ae68f490407..2f4f88bb13862abaf679cc9459e26da4f0abf600 100644 --- a/script/impl/postuninstall/PostUninstallImpl.py +++ b/script/impl/postuninstall/PostUninstallImpl.py @@ -483,6 +483,8 @@ class PostUninstallImpl: if os.path.exists(user_bashrc): FileUtil.deleteLine(user_bashrc, "^\\s*export\\s*%s=.*$" % DefaultValue.MPPRC_FILE_ENV) + FileUtil.deleteLine(user_bashrc, + "^\\s*source\\s*=\\s*%s" % DefaultValue.MPPRC_FILE_ENV) # clean $GAUSS_ENV if (not self.deleteUser): diff --git a/script/local/PreInstallUtility.py b/script/local/PreInstallUtility.py index 770870831da53be46a65b4fd06a07cbdfc7466c0..467e9b3b930d31667607bdc7be57d4fb6a57cd22 100644 --- a/script/local/PreInstallUtility.py +++ b/script/local/PreInstallUtility.py @@ -1335,6 +1335,7 @@ Common options: FileUtil.deleteLine(self.user_env_file, "^\\s*export\\s*%s=.*$" % DefaultValue.MPPRC_FILE_ENV) context = "export %s=%s" % (DefaultValue.MPPRC_FILE_ENV, self.mpprcFile) + context += "\nsource %s" % self.mpprcFile FileUtil.writeFile(self.user_env_file, [context]) self.logger.debug("Successfully flush 'export MPPRC' in bashrc")