diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-10 13:36:14 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-05 16:55:21 +0100 |
commit | 9b42537b41f25db4f57596ff24cf214576767cf1 (patch) | |
tree | 5af22b5fa30ed4822741b205e37bd3688f8d45f6 | |
parent | 19c3ae42ea15e40f345bf16fe58b26fe451cb7fc (diff) | |
download | bitbake-9b42537b41f25db4f57596ff24cf214576767cf1.tar.gz |
toaster: Fix IMAGE_INSTALL issues with _append vs :append
After the override syntax change, toaster isn't working correctly. This
is because it uses IMAGE_INSTALL_append instead of IMAGE_INSTALL:append.
This tweaks the code accordingly to fix this.
I have a suspicion that exiting toaster databases may struggle with
the change and there are some migration steps missing for the whole
overrides syntax change step.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/toaster/orm/fixtures/settings.xml | 2 | ||||
-rw-r--r-- | lib/toaster/orm/models.py | 2 | ||||
-rw-r--r-- | lib/toaster/toastergui/templates/projectconf.html | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/toaster/orm/fixtures/settings.xml b/lib/toaster/orm/fixtures/settings.xml index 78c0fdca7..ab3ea021f 100644 --- a/lib/toaster/orm/fixtures/settings.xml +++ b/lib/toaster/orm/fixtures/settings.xml @@ -19,7 +19,7 @@ <field type="CharField" name="value">${TOPDIR}/../sstate-cache</field> </object> <object model="orm.toastersetting" pk="6"> - <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL_append</field> + <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL:append</field> <field type="CharField" name="value"></field> </object> <object model="orm.toastersetting" pk="7"> diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py index 4c94b407d..6d772367d 100644 --- a/lib/toaster/orm/models.py +++ b/lib/toaster/orm/models.py @@ -1717,7 +1717,7 @@ class CustomImageRecipe(Recipe): def generate_recipe_file_contents(self): """Generate the contents for the recipe file.""" - # If we have no excluded packages we only need to _append + # If we have no excluded packages we only need to :append if self.excludes_set.count() == 0: packages_conf = "IMAGE_INSTALL:append = \" " diff --git a/lib/toaster/toastergui/templates/projectconf.html b/lib/toaster/toastergui/templates/projectconf.html index bd49f1f58..c74adf0a7 100644 --- a/lib/toaster/toastergui/templates/projectconf.html +++ b/lib/toaster/toastergui/templates/projectconf.html @@ -73,7 +73,7 @@ {% if image_install_append_defined %} <dt> - <span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL_append</span> + <span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL:append</span> <span class="glyphicon glyphicon-question-sign get-help" title="Specifies additional packages to install into an image. If your build creates more than one image, the packages will be installed in all of them"></span> </dt> <dd class="variable-list"> @@ -83,7 +83,7 @@ <form id="change-image_install-form" class="form-inline" style="display:none;"> <div class="row"> <div class="col-md-4"> - <span class="help-block">To set IMAGE_INSTALL_append to more than one package, type the package names separated by a space.</span> + <span class="help-block">To set IMAGE_INSTALL:append to more than one package, type the package names separated by a space.</span> </div> </div> <div class="form-group"> @@ -771,10 +771,10 @@ $(document).ready(function() { {% if image_install_append_defined %} - // init IMAGE_INSTALL_append trash icon + // init IMAGE_INSTALL:append trash icon setDeleteTooltip($('#delete-image_install-icon')); - // change IMAGE_INSTALL_append variable + // change IMAGE_INSTALL:append variable $('#change-image_install-icon').click(function() { // preset the edit value var current_val = $("span#image_install").text().trim(); @@ -814,7 +814,7 @@ $(document).ready(function() { $('#apply-change-image_install').click(function(){ // insure these non-empty values have single space prefix var value = " " + $('#new-image_install').val().trim(); - postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+value}); + postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+value}); $('#image_install').text(value); $('#image_install').removeClass('text-muted'); $("#change-image_install-form").slideUp(function () { @@ -826,10 +826,10 @@ $(document).ready(function() { }); }); - // delete IMAGE_INSTALL_append variable value + // delete IMAGE_INSTALL:append variable value $('#delete-image_install-icon').click(function(){ $(this).tooltip('hide'); - postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+''}); + postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+''}); $('#image_install').parent().fadeOut(1000, function(){ $('#image_install').addClass('text-muted'); $('#image_install').text('Not set'); @@ -1011,7 +1011,7 @@ $(document).ready(function() { $(".save").attr("disabled","disabled"); // Reload page if admin-removed core managed value is manually added back in - if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL_append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) { + if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL:append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) { // delayed reload to avoid race condition with postEditAjaxRequest do_reload=true; } |