summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-05-22 15:25:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-22 16:25:10 +0100
commita4bf49052ba9cedc646758d5beaab327f1145e69 (patch)
tree20cb0c11d8ed59d8f51d9bb5e83e37d5a8fde9a0 /bitbake
parent25905ae63728b42cf15f57bce653447543cb566e (diff)
downloadpoky-a4bf49052ba9cedc646758d5beaab327f1145e69.tar.gz
bitbake: tinfoil: fix for changes to cooker config structure
Fix the code here for recent changes to the initialisation of configuration objects for cooker. (Bitbake rev: 9d3ca9aa73a448b0594f03ac8e8317403ec0dc8d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/tinfoil.py41
1 files changed, 21 insertions, 20 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 56ce54f6b9..c05e1465f1 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -25,7 +25,8 @@ import bb.cache
25import bb.cooker 25import bb.cooker
26import bb.providers 26import bb.providers
27import bb.utils 27import bb.utils
28from bb.cooker import state 28from bb.cooker import state, BBCooker
29from bb.cookerdata import CookerConfiguration, ConfigParameters
29import bb.fetch2 30import bb.fetch2
30 31
31class Tinfoil: 32class Tinfoil:
@@ -43,12 +44,11 @@ class Tinfoil:
43 console.setFormatter(format) 44 console.setFormatter(format)
44 self.logger.addHandler(console) 45 self.logger.addHandler(console)
45 46
46 initialenv = os.environ.copy() 47 self.config = CookerConfiguration()
47 bb.utils.clean_environment() 48 configparams = TinfoilConfigParameters(parse_only=True)
48 self.config = TinfoilConfig(parse_only=True) 49 self.config.setConfigParameters(configparams)
49 self.cooker = bb.cooker.BBCooker(self.config, 50 self.config.setServerRegIdleCallback(self.register_idle_function)
50 self.register_idle_function, 51 self.cooker = BBCooker(self.config)
51 initialenv)
52 self.config_data = self.cooker.configuration.data 52 self.config_data = self.cooker.configuration.data
53 bb.providers.logger.setLevel(logging.ERROR) 53 bb.providers.logger.setLevel(logging.ERROR)
54 self.cooker_data = None 54 self.cooker_data = None
@@ -81,20 +81,21 @@ class Tinfoil:
81 else: 81 else:
82 self.parseRecipes() 82 self.parseRecipes()
83 83
84class TinfoilConfigParameters(ConfigParameters):
84 85
85class TinfoilConfig(object):
86 def __init__(self, **options): 86 def __init__(self, **options):
87 self.pkgs_to_build = [] 87 self.initial_options = options
88 self.debug_domains = [] 88 super(TinfoilConfigParameters, self).__init__()
89 self.extra_assume_provided = []
90 self.prefile = []
91 self.postfile = []
92 self.debug = 0
93 self.__dict__.update(options)
94 89
95 def __getattr__(self, attribute): 90 def parseCommandLine(self):
96 try: 91 class DummyOptions:
97 return super(TinfoilConfig, self).__getattribute__(attribute) 92 def __init__(self, initial_options):
98 except AttributeError: 93 self.show_environment = False
99 return None 94 self.pkgs_to_build = []
95 self.prefile = []
96 self.postfile = []
97 self.tracking = False
98 for key, val in initial_options.items():
99 setattr(self, key, val)
100 100
101 return DummyOptions(self.initial_options), None