示例#1
0
 def __init__(self,
              kidsFile,
              kidsInstallName,
              seqNo=None,
              logFile=None,
              multiBuildList=None,
              duz=DEFAULT_INSTALL_DUZ,
              **kargs):
     assert os.path.exists(kidsFile), ("kids file does not exist %s" %
                                       kidsFile)
     self._origKidsFile = kidsFile
     if len(kidsFile) >= self.KIDS_FILE_PATH_MAX_LEN:
         destFilename = os.path.basename(kidsFile)
         tempDir = tempfile.gettempdir()
         if isValidExternalDataFileName(kidsFile):
             # if read directly from inplace, need to replace the name with hash
             destFilename = getSha1HashFromExternalDataFileName(kidsFile)
         while (len(tempDir) + len(destFilename) +
                1) >= self.KIDS_FILE_PATH_MAX_LEN:
             tempDir = os.path.split(tempDir)[0]
         dest = os.path.join(tempDir, destFilename)
         shutil.copy(kidsFile, dest)
         self._kidsFile = os.path.normpath(dest)
         logger.info("new kids file is %s" % self._kidsFile)
     else:
         self._kidsFile = os.path.normpath(kidsFile)
     self._kidsInstallName = kidsInstallName
     self._logFile = logFile
     self._duz = duz
     self._updatePackageLink = False
     self._multiBuildList = multiBuildList
     # store all the globals files associated with KIDS"
     self._globalFiles = None
     if "globals" in kargs:
         self._globalFiles = kargs['globals']
 def __init__(self, kidsFile, kidsInstallName, seqNo=None, logFile=None,
              multiBuildList = None, duz = DEFAULT_INSTALL_DUZ, **kargs):
   assert os.path.exists(kidsFile), ("kids file does not exist %s" % kidsFile)
   self._origKidsFile = kidsFile
   if len(kidsFile) >= self.KIDS_FILE_PATH_MAX_LEN:
     destFilename = os.path.basename(kidsFile)
     tempDir = tempfile.gettempdir()
     if isValidExternalDataFileName(kidsFile):
       # if read directly from inplace, need to replace the name with hash
       destFilename = getSha1HashFromExternalDataFileName(kidsFile)
     while (len(tempDir)+len(destFilename)+1) >= self.KIDS_FILE_PATH_MAX_LEN:
       tempDir = os.path.split(tempDir)[0]
     dest = os.path.join(tempDir, destFilename)
     shutil.copy(kidsFile, dest)
     self._kidsFile = os.path.normpath(dest)
     logger.info("new kids file is %s" % self._kidsFile)
   else:
     self._kidsFile = os.path.normpath(kidsFile)
   self._kidsInstallName = kidsInstallName
   self._logFile = logFile
   self._duz = duz
   self._updatePackageLink = False
   self._multiBuildList = multiBuildList
   # store all the globals files associated with KIDS"
   self._globalFiles = None
   if "globals" in kargs:
     self._globalFiles = kargs['globals']
   self._tgOutputDir = None
   if "printTG" in kargs:
     self._tgOutputDir = kargs['printTG']