[oe-commits] [bitbake] 03/06: toaster: support custom Layer Index URL and fixture override

git at git.openembedded.org git at git.openembedded.org
Tue Aug 22 19:00:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit ac29d4a9078494544a2627d8b6b021096b49cb34
Author: David Reyna <David.Reyna at windriver.com>
AuthorDate: Sun Aug 20 21:02:54 2017 -0700

    toaster: support custom Layer Index URL and fixture override
    
    Toaster needs to allow the custom fixture file to specific an
    alternate Layer Index URL for users that host their own Layer
    Index Server via the 'CUSTOM_LAYERINDEX_SERVER' in
    'custom.xml'.
    
    Toaster also needs to allow the ability to completely override
    the default fixture files, otherwise that content can leak into
    the custom environment (by default the custom fixture is an
    overlay that cannot remove existing values from the default
    fixture) via the 'CUSTOM_XML_ONLY' value in 'setting.xml'.
    
    [YOCTO #11938]
    
    Signed-off-by: David Reyna <David.Reyna at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/bldcontrol/management/commands/checksettings.py | 5 ++++-
 lib/toaster/orm/management/commands/lsupdates.py            | 6 +++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/bldcontrol/management/commands/checksettings.py b/lib/toaster/bldcontrol/management/commands/checksettings.py
index d11166e..582114a 100644
--- a/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -75,7 +75,10 @@ class Command(BaseCommand):
                         call_command("loaddata", "settings")
                         template_conf = os.environ.get("TEMPLATECONF", "")
 
-                        if "poky" in template_conf:
+                        if ToasterSetting.objects.filter(name='CUSTOM_XML_ONLY').count() > 0:
+                            # only use the custom settings
+                            pass
+                        elif "poky" in template_conf:
                             print("Loading poky configuration")
                             call_command("loaddata", "poky")
                         else:
diff --git a/lib/toaster/orm/management/commands/lsupdates.py b/lib/toaster/orm/management/commands/lsupdates.py
index 0b0d4ff..fac5733 100644
--- a/lib/toaster/orm/management/commands/lsupdates.py
+++ b/lib/toaster/orm/management/commands/lsupdates.py
@@ -81,6 +81,8 @@ class Command(BaseCommand):
         os.system('setterm -cursor off')
 
         self.apiurl = DEFAULT_LAYERINDEX_SERVER
+        if ToasterSetting.objects.filter(name='CUSTOM_LAYERINDEX_SERVER').count() == 1:
+            self.apiurl = ToasterSetting.objects.get(name = 'CUSTOM_LAYERINDEX_SERVER').value
 
         assert self.apiurl is not None
         try:
@@ -92,7 +94,9 @@ class Command(BaseCommand):
 
         proxy_settings = os.environ.get("http_proxy", None)
 
-        def _get_json_response(apiurl=DEFAULT_LAYERINDEX_SERVER):
+        def _get_json_response(apiurl=None):
+            if None == apiurl:
+                apiurl=self.apiurl
             http_progress = Spinner()
             http_progress.start()
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list