diff options
author | David Reyna <David.Reyna@windriver.com> | 2017-08-20 21:02:54 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-23 12:07:42 +0100 |
commit | 254e2debe5705f4fe34307378a8c1457e4327d1c (patch) | |
tree | 7a993be76bff62bae6ec9f446db51340138dcde3 | |
parent | 9bfe460934dd9bafcfab7bdf8cbbf7ad968e9026 (diff) | |
download | poky-254e2debe5705f4fe34307378a8c1457e4327d1c.tar.gz |
bitbake: 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]
(Bitbake rev: ac29d4a9078494544a2627d8b6b021096b49cb34)
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py | 5 | ||||
-rw-r--r-- | bitbake/lib/toaster/orm/management/commands/lsupdates.py | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py index d11166ef53..582114ac97 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py | |||
@@ -75,7 +75,10 @@ class Command(BaseCommand): | |||
75 | call_command("loaddata", "settings") | 75 | call_command("loaddata", "settings") |
76 | template_conf = os.environ.get("TEMPLATECONF", "") | 76 | template_conf = os.environ.get("TEMPLATECONF", "") |
77 | 77 | ||
78 | if "poky" in template_conf: | 78 | if ToasterSetting.objects.filter(name='CUSTOM_XML_ONLY').count() > 0: |
79 | # only use the custom settings | ||
80 | pass | ||
81 | elif "poky" in template_conf: | ||
79 | print("Loading poky configuration") | 82 | print("Loading poky configuration") |
80 | call_command("loaddata", "poky") | 83 | call_command("loaddata", "poky") |
81 | else: | 84 | else: |
diff --git a/bitbake/lib/toaster/orm/management/commands/lsupdates.py b/bitbake/lib/toaster/orm/management/commands/lsupdates.py index 0b0d4ff8f9..fac5733a64 100644 --- a/bitbake/lib/toaster/orm/management/commands/lsupdates.py +++ b/bitbake/lib/toaster/orm/management/commands/lsupdates.py | |||
@@ -81,6 +81,8 @@ class Command(BaseCommand): | |||
81 | os.system('setterm -cursor off') | 81 | os.system('setterm -cursor off') |
82 | 82 | ||
83 | self.apiurl = DEFAULT_LAYERINDEX_SERVER | 83 | self.apiurl = DEFAULT_LAYERINDEX_SERVER |
84 | if ToasterSetting.objects.filter(name='CUSTOM_LAYERINDEX_SERVER').count() == 1: | ||
85 | self.apiurl = ToasterSetting.objects.get(name = 'CUSTOM_LAYERINDEX_SERVER').value | ||
84 | 86 | ||
85 | assert self.apiurl is not None | 87 | assert self.apiurl is not None |
86 | try: | 88 | try: |
@@ -92,7 +94,9 @@ class Command(BaseCommand): | |||
92 | 94 | ||
93 | proxy_settings = os.environ.get("http_proxy", None) | 95 | proxy_settings = os.environ.get("http_proxy", None) |
94 | 96 | ||
95 | def _get_json_response(apiurl=DEFAULT_LAYERINDEX_SERVER): | 97 | def _get_json_response(apiurl=None): |
98 | if None == apiurl: | ||
99 | apiurl=self.apiurl | ||
96 | http_progress = Spinner() | 100 | http_progress = Spinner() |
97 | http_progress.start() | 101 | http_progress.start() |
98 | 102 | ||