[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1827/8267] bitbake: toaster: add local directory to the db
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1827/8267] bitbake: toaster: add local directory to the db
- Date: Sat, 16 Dec 2017 22:22:22 +0000 (UTC)
commit 494eae3db0585f45007ad8950933d9a1802a2105
Author: Sujith H <sujith h gmail com>
Date: Tue Jul 26 09:38:17 2016 +0000
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>
bitbake/lib/toaster/toastergui/views.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 3411806..940ea25 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -1460,7 +1460,7 @@ if True:
freqtargets = tmp
layers = [{"id": x.layercommit.pk, "orderid": x.pk, "name" : x.layercommit.layer.name,
- "vcs_url": x.layercommit.layer.vcs_url, "vcs_reference" :
x.layercommit.get_vcs_reference(),
+ "vcs_url": x.layercommit.layer.vcs_url, "local_source_dir":
x.layercommit.layer.local_source_dir, "vcs_reference" : x.layercommit.get_vcs_reference(),
"url": x.layercommit.layer.layer_index_url, "layerdetailurl":
x.layercommit.get_detailspage_url(prj.pk),
"branch" : {"name" : x.layercommit.get_vcs_reference(),
"layersource" : x.layercommit.layer_source }
@@ -1671,7 +1671,7 @@ if True:
prj = Project.objects.get(pk=request.POST['project_id'])
# Strip trailing/leading whitespace from all values
- # put into a new dict because POST one is immutable
+ # put into a new dict because POST one is immutable.
post_data = dict()
for key,val in request.POST.items():
post_data[key] = val.strip()
@@ -1684,7 +1684,8 @@ if True:
if layer:
if layer_created:
- layer.vcs_url = post_data['vcs_url']
+ layer.vcs_url = post_data.get('vcs_url')
+ layer.local_source_dir = post_data.get('local_source_dir')
layer.up_date = timezone.now()
layer.save()
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]