@@ -808,7 +808,6 @@ class CacheData(object):
# Indirect Cache variables (set elsewhere)
self.ignored_dependencies = []
self.world_target = set()
- self.bbfile_priority = {}
def add_from_recipeinfo(self, fn, info_array):
for info in info_array:
@@ -406,14 +406,6 @@ class CommandsSync:
return command.cooker.recipecaches[mc].inherits
getRecipeInherits.readonly = True
- def getBbFilePriority(self, command, params):
- try:
- mc = params[0]
- except IndexError:
- mc = ''
- return command.cooker.recipecaches[mc].bbfile_priority
- getBbFilePriority.readonly = True
-
def getDefaultPreference(self, command, params):
try:
mc = params[0]
@@ -437,15 +429,7 @@ class CommandsSync:
mc = params[0]
except IndexError:
mc = ''
-
- # Return list sorted by reverse priority order
- import bb.cache
- def sortkey(x):
- vfn, _ = x
- realfn, _, item_mc = bb.cache.virtualfn2realfn(vfn)
- return -command.cooker.collections[item_mc].calc_bbfile_priority(realfn)[0], vfn
-
- skipdict = OrderedDict(sorted(command.cooker.skiplist_by_mc[mc].items(), key=sortkey))
+ skipdict = OrderedDict(sorted(command.cooker.skiplist_by_mc[mc].items()))
return list(skipdict.items())
getSkippedRecipes.readonly = True
@@ -1421,7 +1421,6 @@ You can also remove the BB_HASHSERVE_UPSTREAM setting, but this may result in si
# Tweak some variables
item = info_array[0].pn
self.recipecaches[mc].ignored_dependencies = set()
- self.recipecaches[mc].bbfile_priority[fn] = 1
self.configuration.limited_deps = True
# Remove external dependencies
@@ -1702,8 +1701,6 @@ You can also remove the BB_HASHSERVE_UPSTREAM setting, but this may result in si
raise bb.BBHandledException()
self.show_appends_with_no_recipes()
self.handlePrefProviders()
- for mc in self.multiconfigs:
- self.recipecaches[mc].bbfile_priority = self.collections[mc].collection_priorities(self.recipecaches[mc].pkg_fn, self.parser.mcfilelist[mc], self.data)
self.state = State.RUNNING
# Send an event listing all stamps reachable after parsing
@@ -1875,10 +1872,6 @@ class CookerCollectFiles(object):
files = (config.getVar( "BBFILES") or "").split()
- # Sort files by priority
- files.sort( key=lambda fileitem: self.calc_bbfile_priority(fileitem)[0] )
- config.setVar("BBFILES_PRIORITIZED", " ".join(files))
-
if not files:
files = self.get_bbfiles()
@@ -12,7 +12,6 @@ import os
import sys
import time
import atexit
-import re
from collections import OrderedDict, defaultdict
from functools import partial, wraps
from contextlib import contextmanager
@@ -300,8 +299,6 @@ class TinfoilCookerAdapter:
attrvalue = self.tinfoil.run_command('getRecipeVersions', self.mc) or {}
elif name == 'inherits':
attrvalue = self.tinfoil.run_command('getRecipeInherits', self.mc) or {}
- elif name == 'bbfile_priority':
- attrvalue = self.tinfoil.run_command('getBbFilePriority', self.mc) or {}
elif name == 'pkg_dp':
attrvalue = self.tinfoil.run_command('getDefaultPreference', self.mc) or {}
elif name == 'fn_provides':
@@ -339,13 +336,6 @@ class TinfoilCookerAdapter:
# Grab these only when they are requested since they aren't always used
if name in self._cache:
return self._cache[name]
- elif name == 'bbfile_config_priorities':
- ret = self.tinfoil.run_command('getLayerPriorities')
- bbfile_config_priorities = []
- for collection, pattern, regex, pri in ret:
- bbfile_config_priorities.append((collection, pattern, re.compile(regex), pri))
-
- attrvalue = bbfile_config_priorities
else:
raise AttributeError("%s instance has no attribute '%s'" % (self.__class__.__name__, name))
These are confusing and about to be removed with the layer changes. Prepare the way for that by removing the cached priority values. Remove the command and tinfoil APIs that access it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/cache.py | 1 - lib/bb/command.py | 18 +----------------- lib/bb/cooker.py | 7 ------- lib/bb/tinfoil.py | 10 ---------- 4 files changed, 1 insertion(+), 35 deletions(-)