buildDepgraph
def buildDepgraph( self ):
all_depends = self.status.all_depends //所有依赖的pn
pn_provides = self.status.pn_provides // 所有pn provider
localdata = data.createCopy(self.configuration.data)
bb.data.update_data(localdata)
def calc_bbfile_priority(filename): // 计算bbfile的优先级
for (regex, pri) in self.status.bbfile_config_priorities:
if regex.match(filename):
return pri
return 0
# Handle PREFERRED_PROVIDERS
for p in (bb.data.getVar('PREFERRED_PROVIDERS', localdata, 1) or "").split(): //得到PREFERRED_PROVIDES变量
(providee, provider) = p.split(':')被提供者:提供者
if providee in self.status.preferred and self.status.preferred[providee] != provider:
bb.msg.error(bb.msg.domain.Provider, "conflicting preferences for %s: both %s and %s specified" % (providee, provider, self.status.preferred[providee]))
self.status.preferred[providee] = provider //填充stuff
# Calculate priorities for each file
for p in self.status.pkg_fn.keys(): //计算每个bbfile的 优先级
self.status.bbfile_priority[p] = calc_bbfile_priority(p)