summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui
diff options
context:
space:
mode:
authorSujith H <sujith.h@gmail.com>2016-07-26 09:38:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-11 00:09:28 +0100
commit494eae3db0585f45007ad8950933d9a1802a2105 (patch)
treea6aac1a3fda74c2d3f6ed98e58b8e7eb1efabbbf /bitbake/lib/toaster/toastergui
parentb3fa98d4493cbc73562de988f483dab0b80eceaa (diff)
downloadpoky-494eae3db0585f45007ad8950933d9a1802a2105.tar.gz
bitbake: toaster: add local directory to the db
Adding local directory to the database. The local directory is added to vcs_url, field of db. [YOCO #9911] (Bitbake rev: 2c3d48e7cd21a999ef145081352774f1759cd5e4) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui')
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 34118060df..940ea255fd 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -1460,7 +1460,7 @@ if True:
1460 freqtargets = tmp 1460 freqtargets = tmp
1461 1461
1462 layers = [{"id": x.layercommit.pk, "orderid": x.pk, "name" : x.layercommit.layer.name, 1462 layers = [{"id": x.layercommit.pk, "orderid": x.pk, "name" : x.layercommit.layer.name,
1463 "vcs_url": x.layercommit.layer.vcs_url, "vcs_reference" : x.layercommit.get_vcs_reference(), 1463 "vcs_url": x.layercommit.layer.vcs_url, "local_source_dir": x.layercommit.layer.local_source_dir, "vcs_reference" : x.layercommit.get_vcs_reference(),
1464 "url": x.layercommit.layer.layer_index_url, "layerdetailurl": x.layercommit.get_detailspage_url(prj.pk), 1464 "url": x.layercommit.layer.layer_index_url, "layerdetailurl": x.layercommit.get_detailspage_url(prj.pk),
1465 "branch" : {"name" : x.layercommit.get_vcs_reference(), 1465 "branch" : {"name" : x.layercommit.get_vcs_reference(),
1466 "layersource" : x.layercommit.layer_source } 1466 "layersource" : x.layercommit.layer_source }
@@ -1671,7 +1671,7 @@ if True:
1671 prj = Project.objects.get(pk=request.POST['project_id']) 1671 prj = Project.objects.get(pk=request.POST['project_id'])
1672 1672
1673 # Strip trailing/leading whitespace from all values 1673 # Strip trailing/leading whitespace from all values
1674 # put into a new dict because POST one is immutable 1674 # put into a new dict because POST one is immutable.
1675 post_data = dict() 1675 post_data = dict()
1676 for key,val in request.POST.items(): 1676 for key,val in request.POST.items():
1677 post_data[key] = val.strip() 1677 post_data[key] = val.strip()
@@ -1684,7 +1684,8 @@ if True:
1684 1684
1685 if layer: 1685 if layer:
1686 if layer_created: 1686 if layer_created:
1687 layer.vcs_url = post_data['vcs_url'] 1687 layer.vcs_url = post_data.get('vcs_url')
1688 layer.local_source_dir = post_data.get('local_source_dir')
1688 layer.up_date = timezone.now() 1689 layer.up_date = timezone.now()
1689 layer.save() 1690 layer.save()
1690 else: 1691 else: