def getFileMan22_2RoutineFile(rFile): sha1sum = readSha1SumFromSha1File(rFile) logger.info("sha1sum is %s" % sha1sum) result, path = obtainKIDSBuildFileBySha1(rFile, sha1sum, filedir) if not result: logger.error("Could not obtain FileMan 22V2 file for %s" % rFile) raise Exception("Error getting FileMan 22V2 file for %s" % rFile) return path
def __installPatch__(self, patchInfo): installName = patchInfo.installName kidsPath = patchInfo.kidsFilePath seqNo = patchInfo.seqNo logFileName = self._logFileName multiBuildsList = patchInfo.multiBuildsList kidsInstaller = None """ handle patch stored as external link """ if patchInfo.kidsSha1Path != None: kidsSha1 = patchInfo.kidsSha1 (result, resultPath) = obtainKIDSBuildFileBySha1(kidsPath, kidsSha1, DEFAULT_CACHE_DIR) if not result: logger.error("Could not obtain external Patch for %s" % kidsPath) return result kidsPath = resultPath # set the KIDS Path """ get the right KIDS installer """ associateFiles = patchInfo.associatedInfoFiles associatedGlobals = patchInfo.associatedGlobalFiles if patchInfo.hasCustomInstaller: """ use python imp module to load the source """ logger.info("using custom installer %s" % patchInfo.customInstallerPath) import imp installerModule = imp.load_source("KIDS", patchInfo.customInstallerPath) from KIDS import CustomInstaller kidsInstaller = CustomInstaller(kidsPath, installName, seqNo, logFileName, multiBuildsList, files=associateFiles, globals=associatedGlobals, duz=self._duz) else: kidsInstaller = KIDSInstallerFactory.createKIDSInstaller( kidsPath, installName, seqNo, logFileName, multiBuildsList, files=associateFiles, globals=associatedGlobals, duz=self._duz) logger.info("Applying Patch %s" % patchInfo) assert kidsInstaller return kidsInstaller.runInstallation(self._testClient, self._testClient2)
def __installPatch__(self, patchInfo): installName = patchInfo.installName kidsPath = patchInfo.kidsFilePath seqNo = patchInfo.seqNo logFileName = self._logFileName multiBuildsList = patchInfo.multiBuildsList kidsInstaller = None """ handle patch stored as external link """ if patchInfo.kidsSha1Path != None: kidsSha1 = patchInfo.kidsSha1 (result, resultPath) = obtainKIDSBuildFileBySha1(kidsPath, kidsSha1, DEFAULT_CACHE_DIR) if not result: logger.error("Could not obtain external Patch for %s" % kidsPath) return result kidsPath = resultPath # set the KIDS Path """ get the right KIDS installer """ associateFiles = patchInfo.associatedInfoFiles associatedGlobals = patchInfo.associatedGlobalFiles if patchInfo.hasCustomInstaller: """ use python imp module to load the source """ logger.info("using custom installer %s" % patchInfo.customInstallerPath) import imp installerModule = imp.load_source("KIDS", patchInfo.customInstallerPath) from KIDS import CustomInstaller kidsInstaller = CustomInstaller(kidsPath, installName, seqNo, logFileName, multiBuildsList, files=associateFiles, globals=associatedGlobals, duz = self._duz) else: kidsInstaller = KIDSInstallerFactory.createKIDSInstaller( kidsPath, installName, seqNo, logFileName, multiBuildsList, files=associateFiles, globals=associatedGlobals, duz = self._duz) logger.info("Applying Patch %s" % patchInfo) assert kidsInstaller return kidsInstaller.runInstallation(self._testClient, self._testClient2)
def __getGlobalFileList__(self): globalFiles = [] if self._globalFiles is None or len(self._globalFiles) == 0: return globalFiles for gFile in self._globalFiles: if isValidGlobalFileSuffix(gFile): globalFiles.append(gFile) continue if isValidGlobalSha1Suffix(gFile): # external file sha1Sum = readSha1SumFromSha1File(gFile) (result, path) = obtainKIDSBuildFileBySha1(gFile, sha1Sum, DEFAULT_CACHE_DIR) if not result: logger.error("Could not obtain global file for %s" % gFile) raise Exception("Error getting global file for %s" % gFile) globalFiles.append(path) if len(globalFiles) > 0: logger.info("global file lists %s" % globalFiles) return globalFiles