Exemple #1
0
 def __parseAllKIDSInfoFilesList__(self):
     kidsParser = PatchInfoParser()
     for kidsInfoFile in self._kidsInfoFileList:
         patchInfo = kidsParser.parseKIDSInfoFile(kidsInfoFile)
         if not patchInfo:
             logger.debug("invalid kids info file %s" % kidsInfoFile)
             self._invalidInfoFileSet.add(kidsInfoFile)
             continue
         """ only add to list for info that is related to a Patch"""
         installName = patchInfo.installName
         if installName not in self._kidsInstallNameDict:
             logger.warn("no KIDS file related to %s (%s)" %
                         (installName, kidsInfoFile))
             if installName in self._missKidsBuildDict:
                 logger.warn("duplicated kids install name")
                 if kidsInfoFile != self._missKidsBuildDict[
                         installName].kidsInfoPath:
                     logger.warn("duplicated kids info file name %s" %
                                 kidsInfoFile)
                 continue
             self._missKidsBuildDict[installName] = patchInfo
             continue
         patchInfo.kidsFilePath = self._kidsInstallNameDict[installName]
         assert patchInfo.kidsFilePath
         """ update PatchInfo kidsSha1 and kidsSha1Path """
         if installName in self._kidsInstallNameSha1Dict:
             sha1Path = self._kidsInstallNameSha1Dict[installName]
             patchInfo.kidsSha1Path = sha1Path
             patchInfo.kidsSha1 = readSha1SumFromSha1File(sha1Path)
         if installName in self._patchInfoDict:
             logger.warn("duplicated installName %s, %s, %s" %
                         (installName, self._patchInfoDict[installName],
                          kidsInfoFile))
         """ merge the dependency if needed, also
       put extra dependency into optional set """
         if installName in self._kidsDepBuildDict:
             infoDepSet = set()
             kidsDepSet = set()
             if patchInfo.depKIDSBuild:
                 infoDepSet = patchInfo.depKIDSBuild
             if self._kidsDepBuildDict[installName]:
                 kidsDepSet = self._kidsDepBuildDict[installName]
             diffSet = kidsDepSet ^ infoDepSet
             if len(diffSet):
                 logger.info("Merging kids dependencies %s" % installName)
                 logger.debug("kids build set is %s" % kidsDepSet)
                 logger.debug("info build set is %s" % infoDepSet)
                 logger.warning("difference set: %s" % diffSet)
                 patchInfo.depKIDSBuild = infoDepSet | kidsDepSet
                 patchInfo.optionalDepSet = infoDepSet - kidsDepSet
             else:
                 patchInfo.depKIDSBuild = infoDepSet
         self._patchInfoDict[installName] = patchInfo
Exemple #2
0
 def __parseAllKIDSInfoFilesList__(self):
   kidsParser = PatchInfoParser()
   for kidsInfoFile in self._kidsInfoFileList:
     patchInfo = kidsParser.parseKIDSInfoFile(kidsInfoFile)
     if not patchInfo:
       logger.debug("invalid kids info file %s" % kidsInfoFile)
       self._invalidInfoFileSet.add(kidsInfoFile)
       continue
     """ only add to list for info that is related to a Patch"""
     installName = patchInfo.installName
     if installName not in self._kidsInstallNameDict:
       logger.warn("no KIDS file related to %s (%s)" % (installName, kidsInfoFile))
       if installName in self._missKidsBuildDict:
         logger.warn("duplicated kids install name")
         if kidsInfoFile != self._missKidsBuildDict[installName].kidsInfoPath:
           logger.warn("duplicated kids info file name %s" % kidsInfoFile)
         continue
       self._missKidsBuildDict[installName] = patchInfo
       continue
     patchInfo.kidsFilePath = self._kidsInstallNameDict[installName]
     assert patchInfo.kidsFilePath
     """ update PatchInfo kidsSha1 and kidsSha1Path """
     if installName in self._kidsInstallNameSha1Dict:
       sha1Path = self._kidsInstallNameSha1Dict[installName]
       patchInfo.kidsSha1Path = sha1Path
       patchInfo.kidsSha1 = readSha1SumFromSha1File(sha1Path)
     if installName in self._patchInfoDict:
       logger.warn("duplicated installName %s, %s, %s" %
                    (installName, self._patchInfoDict[installName],
                    kidsInfoFile))
     """ merge the dependency if needed, also
         put extra dependency into optional set """
     if installName in self._kidsDepBuildDict:
       infoDepSet = set()
       kidsDepSet = set()
       if patchInfo.depKIDSBuild:
         infoDepSet = patchInfo.depKIDSBuild
       if self._kidsDepBuildDict[installName]:
         kidsDepSet = self._kidsDepBuildDict[installName]
       diffSet = kidsDepSet ^ infoDepSet
       if len(diffSet):
         logger.info("Merging kids dependencies %s" % installName)
         logger.debug("kids build set is %s" % kidsDepSet)
         logger.debug("info build set is %s" % infoDepSet)
         logger.warning("difference set: %s" % diffSet)
         patchInfo.depKIDSBuild = infoDepSet | kidsDepSet
         patchInfo.optionalDepSet = infoDepSet - kidsDepSet
       else:
         patchInfo.depKIDSBuild = infoDepSet
     self._patchInfoDict[installName] = patchInfo
  def __updateCustomInstaller__(self):
    for pythonScript in self._pythonScriptList:
      installName = os.path.basename(pythonScript)
      installName = dirNameToInstallName(installName[:installName.rfind('.')])
      if installName in self._patchInfoDict:
        patchInfo = self._patchInfoDict[installName]
        patchInfo.hasCustomInstaller = True
        if patchInfo.customInstallerPath:
          logger.warning("Duplicated installer for %s: [%s:%s]" %
                         installName, patchInfo.customInstallerPath,
                         pythonScript)

        logger.info("%s: custom installer %s" % (pythonScript, installName))
        self._patchInfoDict[installName].customInstallerPath = pythonScript
Exemple #4
0
  def __updateCustomInstaller__(self):
    for pythonScript in self._pythonScriptList:
      installName = os.path.basename(pythonScript)
      installName = dirNameToInstallName(installName[:installName.rfind('.')])
      if installName in self._patchInfoDict:
        patchInfo = self._patchInfoDict[installName]
        patchInfo.hasCustomInstaller = True
        if patchInfo.customInstallerPath:
          logger.warning("Duplicated installer for %s: [%s:%s]" % (
                         installName, patchInfo.customInstallerPath,
                         pythonScript))

        logger.info("%s: custom installer %s" % (pythonScript, installName))
        self._patchInfoDict[installName].customInstallerPath = pythonScript