(self, mounted_sparsebundle, sb)
Detaches the sparsebundle and converts to installable disk image.
Detaches the sparsebundle and converts to installable disk image.
Detaches the sparsebundle and converts to installable disk image .
def ConvertSparseBundle(self, mounted_sparsebundle, sb):
    """Detaches the sparsebundle and converts to installable disk image."""
    print 'Detaching sparsebundle %s' % mounted_sparsebundle
    cmd = ['hdiutil', 'detach', '-force', mounted_sparsebundle]
    (unused_stdout, stderr, unused_rc) = RunProcess(cmd)
    if stderr:
      print 'Unable to detach sparsebundle %s: %s' % (mounted_sparsebundle, sb)
    else:
      if self.thirdparty_location.endswith('/'):
        from_location = os.path.basename(self.thirdparty_location[:-1])
      else:
        from_location = os.path.basename(self.thirdparty_location)
      image_name = '%s_%s.dmg' % (from_location, self.image_creation_time)
      image_file = os.path.join(self.cwd, BUILD, image_name)
      cmd = ['hdiutil', 'convert', sb, '-format', 'UDZO', '-o', image_file]
      (unused_stdout, stderr, unused_rc) = RunProcess(cmd)
      if stderr:
        print 'Image conversion went wrong: %s' % stderr
      else:
        print 'ASR imagescanning the new image'
        cmd = ['asr', 'imagescan', '-source', image_file]
        RunProcess(cmd)
        return image_file
def ConvertSparseBundle ( self , mounted_sparsebundle , sb ) : print 'Detaching sparsebundle %s' % mounted_sparsebundle cmd = [ 'hdiutil' , 'detach' , '-force' , mounted_sparsebundle ] ( unused_stdout , stderr , unused_rc ) = RunProcess ( cmd ) if stderr : print 'Unable to detach sparsebundle %s: %s' % ( mounted_sparsebundle , sb ) else : if self . thirdparty_location . endswith ( '/' ) : from_location = os . path . basename ( self . thirdparty_location [ : - 1 ] ) else : from_location = os . path . basename ( self . thirdparty_location ) image_name = '%s_%s.dmg' % ( from_location , self . image_creation_time ) image_file = os . path . join ( self . cwd , BUILD , image_name ) cmd = [ 'hdiutil' , 'convert' , sb , '-format' , 'UDZO' , '-o' , image_file ] ( unused_stdout , stderr , unused_rc ) = RunProcess ( cmd ) if stderr : print 'Image conversion went wrong: %s' % stderr else : print 'ASR imagescanning the new image' cmd = [ 'asr' , 'imagescan' , '-source' , image_file ] RunProcess ( cmd ) return image_file