def buildAPackage(package, listBuildOptionPackages, pkgBuildOptionFile, buildThreads): listPackages=[] listPackages.append(package) pkgManager = PackageManager() if constants.rpmCheck: constants.setTestForceRPMS(listPackages[:]) pkgManager.buildPackages(listPackages, listBuildOptionPackages, pkgBuildOptionFile, buildThreads)
def buildPackagesForAllSpecs(logger, buildThreads, pkgInfoJsonFile, pkgBuildType): listPackages = SPECS.getData().getListPackages() if constants.rpmCheck: constants.setTestForceRPMS(copy.copy(listPackages)) pkgManager = PackageManager(pkgBuildType=pkgBuildType) pkgManager.buildPackages(listPackages, buildThreads, pkgBuildType) # Generating package info file which is required by installer logger.debug("Writing Package info to the file:" + pkgInfoJsonFile) pkgInfo = PackageInfo() pkgInfo.loadPackagesData() pkgInfo.writePkgListToFile(pkgInfoJsonFile)
def buildPackagesFromGivenJSONFile(inputJSONFile, buildOption, listBuildOptionPackages, pkgBuildOptionFile, logger, buildThreads): listPackages = get_all_package_names(inputJSONFile) listPackagesToBuild=[] for pkg in listPackages: p = pkg.encode('utf-8') listPackagesToBuild.append(str(p)) logger.info("List of packages to build:") logger.info(listPackagesToBuild) if constants.rpmCheck: constants.setTestForceRPMS(listPackagesToBuild[:]) pkgManager = PackageManager() pkgManager.buildPackages(listPackagesToBuild, listBuildOptionPackages, pkgBuildOptionFile, buildThreads)
def buildSpecifiedPackages(listPackages, buildThreads, pkgBuildType, pkgInfoJsonFile=None, logger=None): if constants.rpmCheck: constants.setTestForceRPMS(copy.copy(listPackages)) pkgManager = PackageManager(pkgBuildType=pkgBuildType) pkgManager.buildPackages(listPackages, buildThreads) if pkgInfoJsonFile is not None: # Generating package info file which is required by installer if logger is not None: logger.debug("Writing Package info to the file:" + pkgInfoJsonFile) pkgInfo = PackageInfo() pkgInfo.loadPackagesData() pkgInfo.writePkgListToFile(pkgInfoJsonFile)
def buildPackagesForAllSpecs(listBuildOptionPackages, pkgBuildOptionFile, logger, buildThreads, pkgInfoJsonFile): listPackages = constants.specData.getListPackages() logger.info("List of packages to build:") logger.info(listPackages) if constants.rpmCheck: constants.setTestForceRPMS(listPackages[:]) pkgManager = PackageManager() pkgManager.buildPackages(listPackages, listBuildOptionPackages, pkgBuildOptionFile, buildThreads) #Generating package info file which is required by installer logger.info("Writing Package info to the file:"+pkgInfoJsonFile) pkgInfo = PackageInfo() pkgInfo.loadPackagesData() pkgInfo.writePkgListToFile(pkgInfoJsonFile)
def buildPackagesInJson(logger, buildThreads, pkgInfoJsonFile, pkgJsonInput, pkgBuildType): listPackages = [] with open(pkgJsonInput) as jsonData: pkg_list_json = json.load(jsonData) listPackages = pkg_list_json["packages"] if constants.rpmCheck: constants.setTestForceRPMS(copy.copy(listPackages)) pkgManager = PackageManager(pkgBuildType=pkgBuildType) pkgManager.buildPackages(listPackages, buildThreads, pkgBuildType) # Generating package info file which is required by installer logger.debug("Writing Package info to the file:" + pkgInfoJsonFile) pkgInfo = PackageInfo() pkgInfo.loadPackagesData() pkgInfo.writePkgListToFile(pkgInfoJsonFile)
def buildAPackage(package, buildThreads, pkgBuildType): listPackages = [package] pkgManager = PackageManager(pkgBuildType=pkgBuildType) if constants.rpmCheck: constants.setTestForceRPMS(copy.copy(listPackages)) pkgManager.buildPackages(listPackages, buildThreads, pkgBuildType)