* [PATCH 0/3] Fixes for recent changes to cooker
@ 2013-05-22 14:25 Paul Eggleton
2013-05-22 14:25 ` [PATCH 1/3] bitbake-layers: fix for move of calc_bbfile_priority within cooker Paul Eggleton
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-05-22 14:25 UTC (permalink / raw)
To: bitbake-devel
The recent changes to the cooker structure have affected bitbake-layers,
the OE layer index update script and other users of tinfoil. These
changes bring tinfoil up-to-date and fix a couple of other issues.
(We may want to clean up the cookerdata params handling in the near
future so that we don't need TinfoilConfigParameters, but for now this
at least keeps things working.)
The following changes (against poky, but apply cleanly to bitbake master
with -p2) are available in the git repository at:
git://git.yoctoproject.org/poky-contrib paule/tinfoil-fixes
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/tinfoil-fixes
Paul Eggleton (3):
bitbake-layers: fix for move of calc_bbfile_priority within cooker
tinfoil: fix for changes to cooker config structure
cookerdata: rename _parse to parse_config_file
bitbake/bin/bitbake-layers | 2 +-
bitbake/lib/bb/cookerdata.py | 12 ++++++------
bitbake/lib/bb/tinfoil.py | 41 +++++++++++++++++++++--------------------
3 files changed, 28 insertions(+), 27 deletions(-)
--
1.8.1.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] bitbake-layers: fix for move of calc_bbfile_priority within cooker
2013-05-22 14:25 [PATCH 0/3] Fixes for recent changes to cooker Paul Eggleton
@ 2013-05-22 14:25 ` Paul Eggleton
2013-05-22 14:25 ` [PATCH 2/3] tinfoil: fix for changes to cooker config structure Paul Eggleton
2013-05-22 14:25 ` [PATCH 3/3] cookerdata: rename _parse to parse_config_file Paul Eggleton
2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-05-22 14:25 UTC (permalink / raw)
To: bitbake-devel
calc_bbfile_priority is now in CookerCollectFiles which can be accessed
on the collection attribute of a cooker instance.
Fixes [YOCTO #4513].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
bitbake/bin/bitbake-layers | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 0c4ac2d..86a17a5 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -233,7 +233,7 @@ Options:
# We are largely guessing about PN, PV and the preferred version here,
# but we have no choice since skipped recipes are not fully parsed
skiplist = self.bbhandler.cooker.skiplist.keys()
- skiplist.sort( key=lambda fileitem: self.bbhandler.cooker.calc_bbfile_priority(fileitem) )
+ skiplist.sort( key=lambda fileitem: self.bbhandler.cooker.collection.calc_bbfile_priority(fileitem) )
skiplist.reverse()
for fn in skiplist:
recipe_parts = os.path.splitext(os.path.basename(fn))[0].split('_')
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] tinfoil: fix for changes to cooker config structure
2013-05-22 14:25 [PATCH 0/3] Fixes for recent changes to cooker Paul Eggleton
2013-05-22 14:25 ` [PATCH 1/3] bitbake-layers: fix for move of calc_bbfile_priority within cooker Paul Eggleton
@ 2013-05-22 14:25 ` Paul Eggleton
2013-05-22 14:25 ` [PATCH 3/3] cookerdata: rename _parse to parse_config_file Paul Eggleton
2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-05-22 14:25 UTC (permalink / raw)
To: bitbake-devel
Fix the code here for recent changes to the initialisation of
configuration objects for cooker.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
bitbake/lib/bb/tinfoil.py | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 56ce54f..c05e146 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -25,7 +25,8 @@ import bb.cache
import bb.cooker
import bb.providers
import bb.utils
-from bb.cooker import state
+from bb.cooker import state, BBCooker
+from bb.cookerdata import CookerConfiguration, ConfigParameters
import bb.fetch2
class Tinfoil:
@@ -43,12 +44,11 @@ class Tinfoil:
console.setFormatter(format)
self.logger.addHandler(console)
- initialenv = os.environ.copy()
- bb.utils.clean_environment()
- self.config = TinfoilConfig(parse_only=True)
- self.cooker = bb.cooker.BBCooker(self.config,
- self.register_idle_function,
- initialenv)
+ self.config = CookerConfiguration()
+ configparams = TinfoilConfigParameters(parse_only=True)
+ self.config.setConfigParameters(configparams)
+ self.config.setServerRegIdleCallback(self.register_idle_function)
+ self.cooker = BBCooker(self.config)
self.config_data = self.cooker.configuration.data
bb.providers.logger.setLevel(logging.ERROR)
self.cooker_data = None
@@ -81,20 +81,21 @@ class Tinfoil:
else:
self.parseRecipes()
+class TinfoilConfigParameters(ConfigParameters):
-class TinfoilConfig(object):
def __init__(self, **options):
- self.pkgs_to_build = []
- self.debug_domains = []
- self.extra_assume_provided = []
- self.prefile = []
- self.postfile = []
- self.debug = 0
- self.__dict__.update(options)
+ self.initial_options = options
+ super(TinfoilConfigParameters, self).__init__()
- def __getattr__(self, attribute):
- try:
- return super(TinfoilConfig, self).__getattribute__(attribute)
- except AttributeError:
- return None
+ def parseCommandLine(self):
+ class DummyOptions:
+ def __init__(self, initial_options):
+ self.show_environment = False
+ self.pkgs_to_build = []
+ self.prefile = []
+ self.postfile = []
+ self.tracking = False
+ for key, val in initial_options.items():
+ setattr(self, key, val)
+ return DummyOptions(self.initial_options), None
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] cookerdata: rename _parse to parse_config_file
2013-05-22 14:25 [PATCH 0/3] Fixes for recent changes to cooker Paul Eggleton
2013-05-22 14:25 ` [PATCH 1/3] bitbake-layers: fix for move of calc_bbfile_priority within cooker Paul Eggleton
2013-05-22 14:25 ` [PATCH 2/3] tinfoil: fix for changes to cooker config structure Paul Eggleton
@ 2013-05-22 14:25 ` Paul Eggleton
2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-05-22 14:25 UTC (permalink / raw)
To: bitbake-devel
We use this externally in the OE layer index update script, so it
shouldn't really be named as an internal function.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
bitbake/lib/bb/cookerdata.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 70e22b4..c4a28c8 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -147,7 +147,7 @@ def catch_parse_error(func):
return wrapped
@catch_parse_error
-def _parse(fn, data, include=True):
+def parse_config_file(fn, data, include=True):
return bb.parse.handle(fn, data, include)
@catch_parse_error
@@ -211,12 +211,12 @@ class CookerDataBuilder(object):
# Parse files for loading *before* bitbake.conf and any includes
for f in prefiles:
- data = _parse(f, data)
+ data = parse_config_file(f, data)
layerconf = self._findLayerConf()
if layerconf:
parselog.debug(2, "Found bblayers.conf (%s)", layerconf)
- data = _parse(layerconf, data)
+ data = parse_config_file(layerconf, data)
layers = (data.getVar('BBLAYERS', True) or "").split()
@@ -224,7 +224,7 @@ class CookerDataBuilder(object):
for layer in layers:
parselog.debug(2, "Adding layer %s", layer)
data.setVar('LAYERDIR', layer)
- data = _parse(os.path.join(layer, "conf", "layer.conf"), data)
+ data = parse_config_file(os.path.join(layer, "conf", "layer.conf"), data)
data.expandVarref('LAYERDIR')
data.delVar('LAYERDIR')
@@ -232,11 +232,11 @@ class CookerDataBuilder(object):
if not data.getVar("BBPATH", True):
raise SystemExit("The BBPATH variable is not set")
- data = _parse(os.path.join("conf", "bitbake.conf"), data)
+ data = parse_config_file(os.path.join("conf", "bitbake.conf"), data)
# Parse files for loading *after* bitbake.conf and any includes
for p in postfiles:
- data = _parse(p, data)
+ data = parse_config_file(p, data)
# Handle any INHERITs and inherit the base class
bbclasses = ["base"] + (data.getVar('INHERIT', True) or "").split()
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-22 14:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 14:25 [PATCH 0/3] Fixes for recent changes to cooker Paul Eggleton
2013-05-22 14:25 ` [PATCH 1/3] bitbake-layers: fix for move of calc_bbfile_priority within cooker Paul Eggleton
2013-05-22 14:25 ` [PATCH 2/3] tinfoil: fix for changes to cooker config structure Paul Eggleton
2013-05-22 14:25 ` [PATCH 3/3] cookerdata: rename _parse to parse_config_file Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.