bitbake: Sync with 1.8 branch upstream for PREFERRED_PROVIDERS message improvements and BB_STAMP_WHITELIST functionality
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4411 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
parent
cd4e478699
commit
d6addd4969
|
@ -30,6 +30,9 @@ Changes in BitBake 1.8.x:
|
||||||
- Add proxy support to the CVS fetcher (from Cyril Chemparathy)
|
- Add proxy support to the CVS fetcher (from Cyril Chemparathy)
|
||||||
- Improve runfetchcmd so errors are seen and various GIT variables are exported
|
- Improve runfetchcmd so errors are seen and various GIT variables are exported
|
||||||
- Add ability to fetchers to check URL validity without downloading
|
- Add ability to fetchers to check URL validity without downloading
|
||||||
|
- Improve runtime PREFERRED_PROVIDERS warning message
|
||||||
|
- Add BB_STAMP_WHITELIST option which contains a list of stamps to ignore when
|
||||||
|
checking stamp dependencies and using a BB_STAMP_POLICY of "whitelist"
|
||||||
|
|
||||||
Changes in BitBake 1.8.10:
|
Changes in BitBake 1.8.10:
|
||||||
- Psyco is available only for x86 - do not use it on other architectures.
|
- Psyco is available only for x86 - do not use it on other architectures.
|
||||||
|
|
|
@ -283,13 +283,16 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache):
|
||||||
|
|
||||||
# Should use dataCache.preferred here?
|
# Should use dataCache.preferred here?
|
||||||
preferred = []
|
preferred = []
|
||||||
|
preferred_vars = []
|
||||||
for p in eligible:
|
for p in eligible:
|
||||||
pn = dataCache.pkg_fn[p]
|
pn = dataCache.pkg_fn[p]
|
||||||
provides = dataCache.pn_provides[pn]
|
provides = dataCache.pn_provides[pn]
|
||||||
for provide in provides:
|
for provide in provides:
|
||||||
prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, cfgData, 1)
|
prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, cfgData, 1)
|
||||||
if prefervar == pn:
|
if prefervar == pn:
|
||||||
bb.msg.note(2, bb.msg.domain.Provider, "selecting %s to satisfy runtime %s due to PREFERRED_PROVIDERS" % (pn, item))
|
var = "PREFERRED_PROVIDERS_%s = %s" % (provide, prefervar)
|
||||||
|
bb.msg.note(2, bb.msg.domain.Provider, "selecting %s to satisfy runtime %s due to %s" % (pn, item, var))
|
||||||
|
preferred_vars.append(var)
|
||||||
eligible.remove(p)
|
eligible.remove(p)
|
||||||
eligible = [p] + eligible
|
eligible = [p] + eligible
|
||||||
preferred.append(p)
|
preferred.append(p)
|
||||||
|
@ -297,6 +300,9 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache):
|
||||||
|
|
||||||
numberPreferred = len(preferred)
|
numberPreferred = len(preferred)
|
||||||
|
|
||||||
|
if numberPreferred > 1:
|
||||||
|
bb.msg.error(bb.msg.domain.Provider, "Conflicting PREFERRED_PROVIDERS entries were found which resulted in an attempt to select multiple providers (%s) for runtime dependecy %s\nThe entries resulting in this conflict were: %s" % (preferred, item, preferred_vars))
|
||||||
|
|
||||||
bb.msg.debug(1, bb.msg.domain.Provider, "sorted providers for %s are: %s" % (item, eligible))
|
bb.msg.debug(1, bb.msg.domain.Provider, "sorted providers for %s are: %s" % (item, eligible))
|
||||||
|
|
||||||
return eligible, numberPreferred
|
return eligible, numberPreferred
|
||||||
|
|
|
@ -150,6 +150,7 @@ class RunQueue:
|
||||||
self.multi_provider_whitelist = (bb.data.getVar("MULTI_PROVIDER_WHITELIST", cfgData, 1) or "").split()
|
self.multi_provider_whitelist = (bb.data.getVar("MULTI_PROVIDER_WHITELIST", cfgData, 1) or "").split()
|
||||||
self.scheduler = bb.data.getVar("BB_SCHEDULER", cfgData, 1) or "speed"
|
self.scheduler = bb.data.getVar("BB_SCHEDULER", cfgData, 1) or "speed"
|
||||||
self.stamppolicy = bb.data.getVar("BB_STAMP_POLICY", cfgData, 1) or "perfile"
|
self.stamppolicy = bb.data.getVar("BB_STAMP_POLICY", cfgData, 1) or "perfile"
|
||||||
|
self.stampwhitelist = bb.data.getVar("BB_STAMP_WHITELIST", cfgData, 1) or []
|
||||||
|
|
||||||
def reset_runqueue(self):
|
def reset_runqueue(self):
|
||||||
|
|
||||||
|
@ -667,6 +668,18 @@ class RunQueue:
|
||||||
#if error:
|
#if error:
|
||||||
# bb.msg.fatal(bb.msg.domain.RunQueue, "Corrupted metadata configuration detected, aborting...")
|
# bb.msg.fatal(bb.msg.domain.RunQueue, "Corrupted metadata configuration detected, aborting...")
|
||||||
|
|
||||||
|
|
||||||
|
# Create a whitelist usable by the stamp checks
|
||||||
|
stampfnwhitelist = []
|
||||||
|
for entry in self.stampwhitelist.split():
|
||||||
|
entryid = self.taskData.getbuild_id(entry)
|
||||||
|
if entryid not in self.taskData.build_targets:
|
||||||
|
continue
|
||||||
|
fnid = self.taskData.build_targets[entryid][0]
|
||||||
|
fn = self.taskData.fn_index[fnid]
|
||||||
|
stampfnwhitelist.append(fn)
|
||||||
|
self.stampfnwhitelist = stampfnwhitelist
|
||||||
|
|
||||||
#self.dump_data(taskData)
|
#self.dump_data(taskData)
|
||||||
|
|
||||||
def check_stamps(self):
|
def check_stamps(self):
|
||||||
|
@ -679,6 +692,9 @@ class RunQueue:
|
||||||
fulldeptree = False
|
fulldeptree = False
|
||||||
else:
|
else:
|
||||||
fulldeptree = True
|
fulldeptree = True
|
||||||
|
stampwhitelist = []
|
||||||
|
if self.stamppolicy == "whitelist":
|
||||||
|
stampwhitelist = self.self.stampfnwhitelist
|
||||||
|
|
||||||
for task in range(len(self.runq_fnid)):
|
for task in range(len(self.runq_fnid)):
|
||||||
unchecked[task] = ""
|
unchecked[task] = ""
|
||||||
|
@ -730,7 +746,7 @@ class RunQueue:
|
||||||
fn2 = self.taskData.fn_index[self.runq_fnid[dep]]
|
fn2 = self.taskData.fn_index[self.runq_fnid[dep]]
|
||||||
taskname2 = self.runq_task[dep]
|
taskname2 = self.runq_task[dep]
|
||||||
stampfile2 = "%s.%s" % (self.dataCache.stamp[fn2], taskname2)
|
stampfile2 = "%s.%s" % (self.dataCache.stamp[fn2], taskname2)
|
||||||
if fulldeptree or fn == fn2:
|
if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist):
|
||||||
if dep in notcurrent:
|
if dep in notcurrent:
|
||||||
iscurrent = False
|
iscurrent = False
|
||||||
else:
|
else:
|
||||||
|
@ -766,6 +782,9 @@ class RunQueue:
|
||||||
fulldeptree = False
|
fulldeptree = False
|
||||||
else:
|
else:
|
||||||
fulldeptree = True
|
fulldeptree = True
|
||||||
|
stampwhitelist = []
|
||||||
|
if self.stamppolicy == "whitelist":
|
||||||
|
stampwhitelist = self.stampfnwhitelist
|
||||||
|
|
||||||
fn = self.taskData.fn_index[self.runq_fnid[task]]
|
fn = self.taskData.fn_index[self.runq_fnid[task]]
|
||||||
taskname = self.runq_task[task]
|
taskname = self.runq_task[task]
|
||||||
|
@ -785,7 +804,7 @@ class RunQueue:
|
||||||
fn2 = self.taskData.fn_index[self.runq_fnid[dep]]
|
fn2 = self.taskData.fn_index[self.runq_fnid[dep]]
|
||||||
taskname2 = self.runq_task[dep]
|
taskname2 = self.runq_task[dep]
|
||||||
stampfile2 = "%s.%s" % (self.dataCache.stamp[fn2], taskname2)
|
stampfile2 = "%s.%s" % (self.dataCache.stamp[fn2], taskname2)
|
||||||
if fulldeptree or fn == fn2:
|
if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist):
|
||||||
try:
|
try:
|
||||||
t2 = os.stat(stampfile2)[stat.ST_MTIME]
|
t2 = os.stat(stampfile2)[stat.ST_MTIME]
|
||||||
if t1 < t2:
|
if t1 < t2:
|
||||||
|
|
Loading…
Reference in New Issue