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:30 +0100 |
| commit | 805c876a28f676fb606eb23ce49453b9a4c1c8ea (patch) | |
| tree | 0a7f5f02d3f5086f2f6549ddb24de7a4d08528b8 | |
| parent | 6c3f8d13fd7dc8c0ad12f606af76eb29242ac006 (diff) | |
| download | poky-805c876a28f676fb606eb23ce49453b9a4c1c8ea.tar.gz | |
bitbake: 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.
(Bitbake rev: e0a450db6d5a50fe7682f62936dfa082bd5de121)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | bitbake/lib/toaster/orm/fixtures/settings.xml | 2 | ||||
| -rw-r--r-- | bitbake/lib/toaster/orm/models.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/projectconf.html | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/bitbake/lib/toaster/orm/fixtures/settings.xml b/bitbake/lib/toaster/orm/fixtures/settings.xml index 78c0fdca7f..ab3ea021f5 100644 --- a/bitbake/lib/toaster/orm/fixtures/settings.xml +++ b/bitbake/lib/toaster/orm/fixtures/settings.xml | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | <field type="CharField" name="value">${TOPDIR}/../sstate-cache</field> | 19 | <field type="CharField" name="value">${TOPDIR}/../sstate-cache</field> |
| 20 | </object> | 20 | </object> |
| 21 | <object model="orm.toastersetting" pk="6"> | 21 | <object model="orm.toastersetting" pk="6"> |
| 22 | <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL_append</field> | 22 | <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL:append</field> |
| 23 | <field type="CharField" name="value"></field> | 23 | <field type="CharField" name="value"></field> |
| 24 | </object> | 24 | </object> |
| 25 | <object model="orm.toastersetting" pk="7"> | 25 | <object model="orm.toastersetting" pk="7"> |
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 7f7e922ade..f73951e213 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
| @@ -1717,7 +1717,7 @@ class CustomImageRecipe(Recipe): | |||
| 1717 | 1717 | ||
| 1718 | def generate_recipe_file_contents(self): | 1718 | def generate_recipe_file_contents(self): |
| 1719 | """Generate the contents for the recipe file.""" | 1719 | """Generate the contents for the recipe file.""" |
| 1720 | # If we have no excluded packages we only need to _append | 1720 | # If we have no excluded packages we only need to :append |
| 1721 | if self.excludes_set.count() == 0: | 1721 | if self.excludes_set.count() == 0: |
| 1722 | packages_conf = "IMAGE_INSTALL_append = \" " | 1722 | packages_conf = "IMAGE_INSTALL_append = \" " |
| 1723 | 1723 | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html index bd49f1f585..c74adf0a7e 100644 --- a/bitbake/lib/toaster/toastergui/templates/projectconf.html +++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html | |||
| @@ -73,7 +73,7 @@ | |||
| 73 | 73 | ||
| 74 | {% if image_install_append_defined %} | 74 | {% if image_install_append_defined %} |
| 75 | <dt> | 75 | <dt> |
| 76 | <span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL_append</span> | 76 | <span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL:append</span> |
| 77 | <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> | 77 | <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> |
| 78 | </dt> | 78 | </dt> |
| 79 | <dd class="variable-list"> | 79 | <dd class="variable-list"> |
| @@ -83,7 +83,7 @@ | |||
| 83 | <form id="change-image_install-form" class="form-inline" style="display:none;"> | 83 | <form id="change-image_install-form" class="form-inline" style="display:none;"> |
| 84 | <div class="row"> | 84 | <div class="row"> |
| 85 | <div class="col-md-4"> | 85 | <div class="col-md-4"> |
| 86 | <span class="help-block">To set IMAGE_INSTALL_append to more than one package, type the package names separated by a space.</span> | 86 | <span class="help-block">To set IMAGE_INSTALL:append to more than one package, type the package names separated by a space.</span> |
| 87 | </div> | 87 | </div> |
| 88 | </div> | 88 | </div> |
| 89 | <div class="form-group"> | 89 | <div class="form-group"> |
| @@ -771,10 +771,10 @@ $(document).ready(function() { | |||
| 771 | 771 | ||
| 772 | {% if image_install_append_defined %} | 772 | {% if image_install_append_defined %} |
| 773 | 773 | ||
| 774 | // init IMAGE_INSTALL_append trash icon | 774 | // init IMAGE_INSTALL:append trash icon |
| 775 | setDeleteTooltip($('#delete-image_install-icon')); | 775 | setDeleteTooltip($('#delete-image_install-icon')); |
| 776 | 776 | ||
| 777 | // change IMAGE_INSTALL_append variable | 777 | // change IMAGE_INSTALL:append variable |
| 778 | $('#change-image_install-icon').click(function() { | 778 | $('#change-image_install-icon').click(function() { |
| 779 | // preset the edit value | 779 | // preset the edit value |
| 780 | var current_val = $("span#image_install").text().trim(); | 780 | var current_val = $("span#image_install").text().trim(); |
| @@ -814,7 +814,7 @@ $(document).ready(function() { | |||
| 814 | $('#apply-change-image_install').click(function(){ | 814 | $('#apply-change-image_install').click(function(){ |
| 815 | // insure these non-empty values have single space prefix | 815 | // insure these non-empty values have single space prefix |
| 816 | var value = " " + $('#new-image_install').val().trim(); | 816 | var value = " " + $('#new-image_install').val().trim(); |
| 817 | postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+value}); | 817 | postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+value}); |
| 818 | $('#image_install').text(value); | 818 | $('#image_install').text(value); |
| 819 | $('#image_install').removeClass('text-muted'); | 819 | $('#image_install').removeClass('text-muted'); |
| 820 | $("#change-image_install-form").slideUp(function () { | 820 | $("#change-image_install-form").slideUp(function () { |
| @@ -826,10 +826,10 @@ $(document).ready(function() { | |||
| 826 | }); | 826 | }); |
| 827 | }); | 827 | }); |
| 828 | 828 | ||
| 829 | // delete IMAGE_INSTALL_append variable value | 829 | // delete IMAGE_INSTALL:append variable value |
| 830 | $('#delete-image_install-icon').click(function(){ | 830 | $('#delete-image_install-icon').click(function(){ |
| 831 | $(this).tooltip('hide'); | 831 | $(this).tooltip('hide'); |
| 832 | postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+''}); | 832 | postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+''}); |
| 833 | $('#image_install').parent().fadeOut(1000, function(){ | 833 | $('#image_install').parent().fadeOut(1000, function(){ |
| 834 | $('#image_install').addClass('text-muted'); | 834 | $('#image_install').addClass('text-muted'); |
| 835 | $('#image_install').text('Not set'); | 835 | $('#image_install').text('Not set'); |
| @@ -1011,7 +1011,7 @@ $(document).ready(function() { | |||
| 1011 | $(".save").attr("disabled","disabled"); | 1011 | $(".save").attr("disabled","disabled"); |
| 1012 | 1012 | ||
| 1013 | // Reload page if admin-removed core managed value is manually added back in | 1013 | // Reload page if admin-removed core managed value is manually added back in |
| 1014 | if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL_append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) { | 1014 | if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL:append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) { |
| 1015 | // delayed reload to avoid race condition with postEditAjaxRequest | 1015 | // delayed reload to avoid race condition with postEditAjaxRequest |
| 1016 | do_reload=true; | 1016 | do_reload=true; |
| 1017 | } | 1017 | } |
