无法以正确的方式访问bitbake poky 2.5中的BB.Cooper.generateTaskDepTreeData()

2024-06-25 23:11:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要从cooker.py运行BBCooker{},但是poky 2.5中的Tinfoil类发生了变化,Tinfoil.cooker不再是BBCooker对象

我尝试了以下Python代码:

class TinfoilExtended(bb.tinfoil.Tinfoil):
    def __init__(self, projpath=os.environ['BUILDDIR'], pkgs_to_build=('rfsw-image',)):
        bb.tinfoil.Tinfoil.__init__(self)
        os.chdir(projpath)
        self.prepare(config_only=False)
        self.config= bb.tinfoil.CookerConfiguration()
        configparams = bb.tinfoil.TinfoilConfigParameters('parse_only')
        self.config.setConfigParameters(configparams)
        self.config.setServerRegIdleCallback(self.register_idle_function)
        self.cooker_c = bb.cooker.BBCooker(self.config)
        self.cooker_c.parseConfiguration()
        self.depgraph = self.cooker_c.generateTaskDepTreeData(pkgs_to_build, task)

但这只会返回空数据

我目前使用:

self.depgraph = self.all_recipes()

并遍历配方,收集它们的名称、版本、路径和包,但这种方法非常慢。如果没有办法在poky2.5上运行generateTaskDepTreeData(),有比all_recipes()更快的方法吗


Tags: tobuildselfconfigonlyinitosbb