diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/command.py | 7 | ||||
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 27 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 25 |
3 files changed, 25 insertions, 34 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 59336bbee7..3abdd0c649 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -205,13 +205,6 @@ class CommandsSync: | |||
205 | """ | 205 | """ |
206 | return bb.utils.cpu_count() | 206 | return bb.utils.cpu_count() |
207 | 207 | ||
208 | def setConfFilter(self, command, params): | ||
209 | """ | ||
210 | Set the configuration file parsing filter | ||
211 | """ | ||
212 | filterfunc = params[0] | ||
213 | bb.parse.parse_py.ConfHandler.confFilters.append(filterfunc) | ||
214 | |||
215 | def matchFile(self, command, params): | 208 | def matchFile(self, command, params): |
216 | fMatch = params[0] | 209 | fMatch = params[0] |
217 | return command.cooker.matchFile(fMatch) | 210 | return command.cooker.matchFile(fMatch) |
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 2a0cebab29..85066299d7 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -470,8 +470,6 @@ class Builder(gtk.Window): | |||
470 | self.handler.connect("recipe-populated", self.handler_recipe_populated_cb) | 470 | self.handler.connect("recipe-populated", self.handler_recipe_populated_cb) |
471 | self.handler.connect("package-populated", self.handler_package_populated_cb) | 471 | self.handler.connect("package-populated", self.handler_package_populated_cb) |
472 | 472 | ||
473 | self.handler.set_config_filter(hob_conf_filter) | ||
474 | |||
475 | self.initiate_new_build_async() | 473 | self.initiate_new_build_async() |
476 | 474 | ||
477 | def create_visual_elements(self): | 475 | def create_visual_elements(self): |
@@ -553,6 +551,7 @@ class Builder(gtk.Window): | |||
553 | self.handler.init_cooker() | 551 | self.handler.init_cooker() |
554 | self.handler.set_extra_inherit("image_types") | 552 | self.handler.set_extra_inherit("image_types") |
555 | self.generate_configuration() | 553 | self.generate_configuration() |
554 | self.load_template(TemplateMgr.convert_to_template_pathfilename("default", ".hob/")) | ||
556 | 555 | ||
557 | def update_config_async(self): | 556 | def update_config_async(self): |
558 | self.switch_page(self.MACHINE_SELECTION) | 557 | self.switch_page(self.MACHINE_SELECTION) |
@@ -661,8 +660,7 @@ class Builder(gtk.Window): | |||
661 | if not os.path.exists(layer+'/conf/layer.conf'): | 660 | if not os.path.exists(layer+'/conf/layer.conf'): |
662 | return False | 661 | return False |
663 | 662 | ||
664 | self.save_defaults() # remember layers and settings | 663 | self.set_user_config_extra() |
665 | self.update_config_async() | ||
666 | return True | 664 | return True |
667 | 665 | ||
668 | def save_template(self, path, defaults=False): | 666 | def save_template(self, path, defaults=False): |
@@ -766,6 +764,17 @@ class Builder(gtk.Window): | |||
766 | self.handler.set_git_proxy("", "") | 764 | self.handler.set_git_proxy("", "") |
767 | self.handler.set_cvs_proxy("", "") | 765 | self.handler.set_cvs_proxy("", "") |
768 | 766 | ||
767 | def set_user_config_extra(self): | ||
768 | self.handler.set_rootfs_size(self.configuration.image_rootfs_size) | ||
769 | self.handler.set_extra_size(self.configuration.image_extra_size) | ||
770 | self.handler.set_incompatible_license(self.configuration.incompat_license) | ||
771 | self.handler.set_sdk_machine(self.configuration.curr_sdk_machine) | ||
772 | self.handler.set_image_fstypes(self.configuration.image_fstypes) | ||
773 | self.handler.set_extra_config(self.configuration.extra_setting) | ||
774 | self.handler.set_extra_inherit("packageinfo") | ||
775 | self.handler.set_extra_inherit("image_types") | ||
776 | self.set_user_config_proxies() | ||
777 | |||
769 | def set_user_config(self): | 778 | def set_user_config(self): |
770 | self.handler.init_cooker() | 779 | self.handler.init_cooker() |
771 | # set bb layers | 780 | # set bb layers |
@@ -779,15 +788,7 @@ class Builder(gtk.Window): | |||
779 | self.handler.set_sstate_mirrors(self.configuration.sstatemirror) | 788 | self.handler.set_sstate_mirrors(self.configuration.sstatemirror) |
780 | self.handler.set_pmake(self.configuration.pmake) | 789 | self.handler.set_pmake(self.configuration.pmake) |
781 | self.handler.set_bbthreads(self.configuration.bbthread) | 790 | self.handler.set_bbthreads(self.configuration.bbthread) |
782 | self.handler.set_rootfs_size(self.configuration.image_rootfs_size) | 791 | self.set_user_config_extra() |
783 | self.handler.set_extra_size(self.configuration.image_extra_size) | ||
784 | self.handler.set_incompatible_license(self.configuration.incompat_license) | ||
785 | self.handler.set_sdk_machine(self.configuration.curr_sdk_machine) | ||
786 | self.handler.set_image_fstypes(self.configuration.image_fstypes) | ||
787 | self.handler.set_extra_config(self.configuration.extra_setting) | ||
788 | self.handler.set_extra_inherit("packageinfo") | ||
789 | self.handler.set_extra_inherit("image_types") | ||
790 | self.set_user_config_proxies() | ||
791 | 792 | ||
792 | def update_recipe_model(self, selected_image, selected_recipes): | 793 | def update_recipe_model(self, selected_image, selected_recipes): |
793 | self.recipe_model.set_selected_image(selected_image) | 794 | self.recipe_model.set_selected_image(selected_image) |
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 15d28d927a..c33fb74100 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
@@ -307,42 +307,42 @@ class HobHandler(gobject.GObject): | |||
307 | self.runCommand(["setVariable", "INHERIT", inherits]) | 307 | self.runCommand(["setVariable", "INHERIT", inherits]) |
308 | 308 | ||
309 | def set_bblayers(self, bblayers): | 309 | def set_bblayers(self, bblayers): |
310 | self.runCommand(["setVariable", "BBLAYERS_HOB", " ".join(bblayers)]) | 310 | self.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)]) |
311 | 311 | ||
312 | def set_machine(self, machine): | 312 | def set_machine(self, machine): |
313 | if machine: | 313 | if machine: |
314 | self.runCommand(["setVariable", "MACHINE_HOB", machine]) | 314 | self.runCommand(["setVariable", "MACHINE", machine]) |
315 | 315 | ||
316 | def set_sdk_machine(self, sdk_machine): | 316 | def set_sdk_machine(self, sdk_machine): |
317 | self.runCommand(["setVariable", "SDKMACHINE_HOB", sdk_machine]) | 317 | self.runCommand(["setVariable", "SDKMACHINE", sdk_machine]) |
318 | 318 | ||
319 | def set_image_fstypes(self, image_fstypes): | 319 | def set_image_fstypes(self, image_fstypes): |
320 | self.runCommand(["setVariable", "IMAGE_FSTYPES", image_fstypes]) | 320 | self.runCommand(["setVariable", "IMAGE_FSTYPES", image_fstypes]) |
321 | 321 | ||
322 | def set_distro(self, distro): | 322 | def set_distro(self, distro): |
323 | self.runCommand(["setVariable", "DISTRO_HOB", distro]) | 323 | self.runCommand(["setVariable", "DISTRO", distro]) |
324 | 324 | ||
325 | def set_package_format(self, format): | 325 | def set_package_format(self, format): |
326 | package_classes = "" | 326 | package_classes = "" |
327 | for pkgfmt in format.split(): | 327 | for pkgfmt in format.split(): |
328 | package_classes += ("package_%s" % pkgfmt + " ") | 328 | package_classes += ("package_%s" % pkgfmt + " ") |
329 | self.runCommand(["setVariable", "PACKAGE_CLASSES_HOB", package_classes]) | 329 | self.runCommand(["setVariable", "PACKAGE_CLASSES", package_classes]) |
330 | 330 | ||
331 | def set_bbthreads(self, threads): | 331 | def set_bbthreads(self, threads): |
332 | self.runCommand(["setVariable", "BB_NUMBER_THREADS_HOB", threads]) | 332 | self.runCommand(["setVariable", "BB_NUMBER_THREADS", threads]) |
333 | 333 | ||
334 | def set_pmake(self, threads): | 334 | def set_pmake(self, threads): |
335 | pmake = "-j %s" % threads | 335 | pmake = "-j %s" % threads |
336 | self.runCommand(["setVariable", "PARALLEL_MAKE_HOB", pmake]) | 336 | self.runCommand(["setVariable", "PARALLEL_MAKE", pmake]) |
337 | 337 | ||
338 | def set_dl_dir(self, directory): | 338 | def set_dl_dir(self, directory): |
339 | self.runCommand(["setVariable", "DL_DIR_HOB", directory]) | 339 | self.runCommand(["setVariable", "DL_DIR", directory]) |
340 | 340 | ||
341 | def set_sstate_dir(self, directory): | 341 | def set_sstate_dir(self, directory): |
342 | self.runCommand(["setVariable", "SSTATE_DIR_HOB", directory]) | 342 | self.runCommand(["setVariable", "SSTATE_DIR", directory]) |
343 | 343 | ||
344 | def set_sstate_mirrors(self, url): | 344 | def set_sstate_mirrors(self, url): |
345 | self.runCommand(["setVariable", "SSTATE_MIRRORS_HOB", url]) | 345 | self.runCommand(["setVariable", "SSTATE_MIRRORS", url]) |
346 | 346 | ||
347 | def set_extra_size(self, image_extra_size): | 347 | def set_extra_size(self, image_extra_size): |
348 | self.runCommand(["setVariable", "IMAGE_ROOTFS_EXTRA_SPACE", str(image_extra_size)]) | 348 | self.runCommand(["setVariable", "IMAGE_ROOTFS_EXTRA_SPACE", str(image_extra_size)]) |
@@ -351,16 +351,13 @@ class HobHandler(gobject.GObject): | |||
351 | self.runCommand(["setVariable", "IMAGE_ROOTFS_SIZE", str(image_rootfs_size)]) | 351 | self.runCommand(["setVariable", "IMAGE_ROOTFS_SIZE", str(image_rootfs_size)]) |
352 | 352 | ||
353 | def set_incompatible_license(self, incompat_license): | 353 | def set_incompatible_license(self, incompat_license): |
354 | self.runCommand(["setVariable", "INCOMPATIBLE_LICENSE_HOB", incompat_license]) | 354 | self.runCommand(["setVariable", "INCOMPATIBLE_LICENSE", incompat_license]) |
355 | 355 | ||
356 | def set_extra_config(self, extra_setting): | 356 | def set_extra_config(self, extra_setting): |
357 | for key in extra_setting.keys(): | 357 | for key in extra_setting.keys(): |
358 | value = extra_setting[key] | 358 | value = extra_setting[key] |
359 | self.runCommand(["setVariable", key, value]) | 359 | self.runCommand(["setVariable", key, value]) |
360 | 360 | ||
361 | def set_config_filter(self, config_filter): | ||
362 | self.runCommand(["setConfFilter", config_filter]) | ||
363 | |||
364 | def set_http_proxy(self, http_proxy): | 361 | def set_http_proxy(self, http_proxy): |
365 | self.runCommand(["setVariable", "http_proxy", http_proxy]) | 362 | self.runCommand(["setVariable", "http_proxy", http_proxy]) |
366 | 363 | ||