summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/api.py
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2017-09-14 16:58:15 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-17 23:24:14 +0100
commitd5a109daeaa7a83bfa2c34c45dc01a1579d24893 (patch)
tree2cffd8915bef943bd9501dea1bfcfac8118baa67 /bitbake/lib/toaster/toastergui/api.py
parent6235469e40d55fba445d493edfa3a60403321061 (diff)
downloadpoky-d5a109daeaa7a83bfa2c34c45dc01a1579d24893.tar.gz
bitbake: toaster: reserve HEAD from imported layers
The HEAD reference in Toaster layers are reserved for the "Local Yocto Project" layers, stored at the top directory. Imported layers are not allowed to use this since they are managed differently - for example the 'remotes' will collide. Fix the add layer handler to not drop the data fields when it is a git repo. Explicitly inform the user when an internal Toaster error is returned via AJAX, so that they know why clicking the layer add button did not do anything. [YOCTO #9924] (Bitbake rev: 04bd9c9341e8390a7923fa0122cd4cb0befa569f) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/api.py')
-rw-r--r--bitbake/lib/toaster/toastergui/api.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/api.py b/bitbake/lib/toaster/toastergui/api.py
index cb8f0f3127..ab6ba69e0e 100644
--- a/bitbake/lib/toaster/toastergui/api.py
+++ b/bitbake/lib/toaster/toastergui/api.py
@@ -293,14 +293,14 @@ class XhrLayer(View):
293 layer_source=LayerSource.TYPE_IMPORTED) 293 layer_source=LayerSource.TYPE_IMPORTED)
294 294
295 # Local layer 295 # Local layer
296 if 'local_source_dir' in layer_data: 296 if ('local_source_dir' in layer_data) and layer.local_source_dir:
297 layer.local_source_dir = layer_data['local_source_dir'] 297 layer.local_source_dir = layer_data['local_source_dir']
298 # git layer 298 # git layer
299 elif 'vcs_url' in layer_data: 299 elif 'vcs_url' in layer_data:
300 layer.vcs_url = layer_data['vcs_url'] 300 layer.vcs_url = layer_data['vcs_url']
301 layer_version.dirpath = layer_data['dir_path'] 301 layer_version.dirpath = layer_data['dir_path']
302 layer_version.commit = layer_data['get_ref'] 302 layer_version.commit = layer_data['git_ref']
303 layer_version.branch = layer_data['get_ref'] 303 layer_version.branch = layer_data['git_ref']
304 304
305 layer.save() 305 layer.save()
306 layer_version.save() 306 layer_version.save()