コード例 #1
0
ファイル: installer.py プロジェクト: muromec/qtopia-ezx
    def get_module_path_hash(self, target):
        ## retrieve the branch ID from the registry
        branch = bldreg.get_value('build', 'branch')

        ## find the BIF file for this branch
        branch_list = branchlist.BranchList()
        bif_file = branch_list.file(branch)
        if not bif_file:
            e = err.Error()
            e.Set("Cannot find bif file=\"%s\"." % (bif_file))
            raise err.error, e

        ## parse the BIF/XML file and get information for this build
        bif_data = bif.load_bif_data(bif_file, branch_list)

        ## feed the BIF information to a dependancy list, and set
        ## the dependancy list's targets
        depend = dependlist.DependList(bif_data, target)

        ## this takes it's best shot at returning a list of all the
        ## subdirectory names checked out by this target
        module_list = depend.distribution_list() + depend.checkout_list()
        
        base_path = ushell.posix_path(bldreg.get_value('build', 'path'))

        module_path_hash = {}
        for module in module_list:
            module_path_hash[module.id] = ushell.join(base_path, module.name)

        return module_path_hash
コード例 #2
0
    def get_module_path_hash(self, target):
        ## retrieve the branch ID from the registry
        branch = bldreg.get_value('build', 'branch')

        ## find the BIF file for this branch
        branch_list = branchlist.BranchList()
        bif_file = branch_list.file(branch)
        if not bif_file:
            e = err.Error()
            e.Set("Cannot find bif file=\"%s\"." % (bif_file))
            raise err.error, e

        ## parse the BIF/XML file and get information for this build
        bif_data = bif.load_bif_data(bif_file, branch_list)

        ## feed the BIF information to a dependancy list, and set
        ## the dependancy list's targets
        depend = dependlist.DependList(bif_data, target)

        ## this takes it's best shot at returning a list of all the
        ## subdirectory names checked out by this target
        module_list = depend.distribution_list() + depend.checkout_list()

        base_path = ushell.posix_path(bldreg.get_value('build', 'path'))

        module_path_hash = {}
        for module in module_list:
            module_path_hash[module.id] = ushell.join(base_path, module.name)

        return module_path_hash
コード例 #3
0
ファイル: installer.py プロジェクト: muromec/qtopia-ezx
    def __load_target_hash(self):
        try:
            key_list = bldreg.section_key_list('targets')
        except KeyError:
            return

        ## figure out the base absolute path
        base_path = ushell.posix_path(bldreg.get_value('build', 'path'))

        self.__target_hash = {}

        for key in key_list:
            target_path = ushell.join(
                base_path, ushell.posix_path(bldreg.get_value('targets', key)))
            
            self.__target_hash[key] = target_path
コード例 #4
0
    def __load_target_hash(self):
        try:
            key_list = bldreg.section_key_list('targets')
        except KeyError:
            return

        ## figure out the base absolute path
        base_path = ushell.posix_path(bldreg.get_value('build', 'path'))

        self.__target_hash = {}

        for key in key_list:
            target_path = ushell.join(
                base_path, ushell.posix_path(bldreg.get_value('targets', key)))

            self.__target_hash[key] = target_path