summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobprefs.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-09-01 20:38:10 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-05 20:25:41 +0100
commitcffbab5c0671005072db3e8f577fa3ffb1e2cd68 (patch)
tree4cda95ea411c1904ef0f2e6c4fa7f2140be9b590 /bitbake/lib/bb/ui/crumbs/hobprefs.py
parentba91445de50ed4a4a947948631fdd36a0e3e145d (diff)
downloadpoky-cffbab5c0671005072db3e8f577fa3ffb1e2cd68.tar.gz
hob: use both pre and post files for hob configuration
We need to set various variables *before* parse begins, the simplest way to ensure this is to use a pre configuration file for the relevant configuration entries. This series adapts hob to use both pre and post files to store its configuration. Any variables which affect initial parse are set in the pre file and all others in the post file. Unfortunately this requires hob related code to have even more hard-coded data as to what is relevant but this is the simplest way to solve issues with variables and parse order at this time. Addresses [YOCTO #1281] (Bitbake rev: 02ab0e11d8dd42f5ca440b3d8d2073e23f55113a) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobprefs.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobprefs.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobprefs.py b/bitbake/lib/bb/ui/crumbs/hobprefs.py
index 3859b29a0f..14d6bc7b23 100644
--- a/bitbake/lib/bb/ui/crumbs/hobprefs.py
+++ b/bitbake/lib/bb/ui/crumbs/hobprefs.py
@@ -38,13 +38,13 @@ class HobPrefs(gtk.Dialog):
38 else: 38 else:
39 self.selected_image_types = handler.remove_image_output_type(ot) 39 self.selected_image_types = handler.remove_image_output_type(ot)
40 40
41 self.configurator.setLocalConfVar('IMAGE_FSTYPES', "%s" % " ".join(self.selected_image_types).lstrip(" ")) 41 self.configurator.setConfVar('IMAGE_FSTYPES', "%s" % " ".join(self.selected_image_types).lstrip(" "))
42 42
43 def sdk_machine_combo_changed_cb(self, combo, handler): 43 def sdk_machine_combo_changed_cb(self, combo, handler):
44 sdk_mach = combo.get_active_text() 44 sdk_mach = combo.get_active_text()
45 if sdk_mach != self.curr_sdk_mach: 45 if sdk_mach != self.curr_sdk_mach:
46 self.curr_sdk_mach = sdk_mach 46 self.curr_sdk_mach = sdk_mach
47 self.configurator.setLocalConfVar('SDKMACHINE', sdk_mach) 47 self.configurator.setConfVar('SDKMACHINE', sdk_mach)
48 handler.set_sdk_machine(sdk_mach) 48 handler.set_sdk_machine(sdk_mach)
49 49
50 def update_sdk_machines(self, handler, sdk_machines): 50 def update_sdk_machines(self, handler, sdk_machines):
@@ -67,7 +67,7 @@ class HobPrefs(gtk.Dialog):
67 distro = combo.get_active_text() 67 distro = combo.get_active_text()
68 if distro != self.curr_distro: 68 if distro != self.curr_distro:
69 self.curr_distro = distro 69 self.curr_distro = distro
70 self.configurator.setLocalConfVar('DISTRO', distro) 70 self.configurator.setConfVar('DISTRO', distro)
71 handler.set_distro(distro) 71 handler.set_distro(distro)
72 self.reload_required = True 72 self.reload_required = True
73 73
@@ -91,7 +91,7 @@ class HobPrefs(gtk.Dialog):
91 package_format = combo.get_active_text() 91 package_format = combo.get_active_text()
92 if package_format != self.curr_package_format: 92 if package_format != self.curr_package_format:
93 self.curr_package_format = package_format 93 self.curr_package_format = package_format
94 self.configurator.setLocalConfVar('PACKAGE_CLASSES', 'package_%s' % package_format) 94 self.configurator.setConfVar('PACKAGE_CLASSES', 'package_%s' % package_format)
95 handler.set_package_format(package_format) 95 handler.set_package_format(package_format)
96 self.reload_required = True 96 self.reload_required = True
97 97
@@ -113,7 +113,7 @@ class HobPrefs(gtk.Dialog):
113 113
114 def include_gplv3_cb(self, toggle): 114 def include_gplv3_cb(self, toggle):
115 excluded = toggle.get_active() 115 excluded = toggle.get_active()
116 orig_incompatible = self.configurator.getLocalConfVar('INCOMPATIBLE_LICENSE') 116 orig_incompatible = self.configurator.getConfVar('INCOMPATIBLE_LICENSE')
117 new_incompatible = "" 117 new_incompatible = ""
118 if excluded: 118 if excluded:
119 if not orig_incompatible: 119 if not orig_incompatible:
@@ -125,18 +125,18 @@ class HobPrefs(gtk.Dialog):
125 125
126 if new_incompatible != orig_incompatible: 126 if new_incompatible != orig_incompatible:
127 self.handler.set_incompatible_license(new_incompatible) 127 self.handler.set_incompatible_license(new_incompatible)
128 self.configurator.setLocalConfVar('INCOMPATIBLE_LICENSE', new_incompatible) 128 self.configurator.setConfVar('INCOMPATIBLE_LICENSE', new_incompatible)
129 self.reload_required = True 129 self.reload_required = True
130 130
131 def change_bb_threads_cb(self, spinner): 131 def change_bb_threads_cb(self, spinner):
132 val = spinner.get_value_as_int() 132 val = spinner.get_value_as_int()
133 self.handler.set_bbthreads(val) 133 self.handler.set_bbthreads(val)
134 self.configurator.setLocalConfVar('BB_NUMBER_THREADS', val) 134 self.configurator.setConfVar('BB_NUMBER_THREADS', val)
135 135
136 def change_make_threads_cb(self, spinner): 136 def change_make_threads_cb(self, spinner):
137 val = spinner.get_value_as_int() 137 val = spinner.get_value_as_int()
138 self.handler.set_pmake(val) 138 self.handler.set_pmake(val)
139 self.configurator.setLocalConfVar('PARALLEL_MAKE', "-j %s" % val) 139 self.configurator.setConfVar('PARALLEL_MAKE', "-j %s" % val)
140 140
141 def toggle_toolchain_cb(self, check): 141 def toggle_toolchain_cb(self, check):
142 enabled = check.get_active() 142 enabled = check.get_active()
@@ -144,7 +144,7 @@ class HobPrefs(gtk.Dialog):
144 if enabled: 144 if enabled:
145 toolchain = '1' 145 toolchain = '1'
146 self.handler.toggle_toolchain(enabled) 146 self.handler.toggle_toolchain(enabled)
147 self.configurator.setLocalConfVar('HOB_BUILD_TOOLCHAIN', toolchain) 147 self.configurator.setConfVar('HOB_BUILD_TOOLCHAIN', toolchain)
148 148
149 def toggle_headers_cb(self, check): 149 def toggle_headers_cb(self, check):
150 enabled = check.get_active() 150 enabled = check.get_active()
@@ -152,13 +152,13 @@ class HobPrefs(gtk.Dialog):
152 if enabled: 152 if enabled:
153 headers = '1' 153 headers = '1'
154 self.handler.toggle_toolchain_headers(enabled) 154 self.handler.toggle_toolchain_headers(enabled)
155 self.configurator.setLocalConfVar('HOB_BUILD_TOOLCHAIN_HEADERS', headers) 155 self.configurator.setConfVar('HOB_BUILD_TOOLCHAIN_HEADERS', headers)
156 156
157 def set_parent_window(self, parent): 157 def set_parent_window(self, parent):
158 self.set_transient_for(parent) 158 self.set_transient_for(parent)
159 159
160 def write_changes(self): 160 def write_changes(self):
161 self.configurator.writeLocalConf() 161 self.configurator.writeConf()
162 162
163 def prefs_response_cb(self, dialog, response): 163 def prefs_response_cb(self, dialog, response):
164 if self.reload_required: 164 if self.reload_required: