Skip to contentSkip to conversation

Fix for 8004

PATCH Applied Ed Bartosh 4 participants 12 messages Oct 1, 2015 – Oct 9, 2015

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

v2 cover Fix for 8004

Hi,

This patchset fixes bug 8004: importing a layer from the recipes page auto adds the 1st level dependencies but not the 2nd level.
Now dependent layers are discovered recursively and Toaster shows all of them in Compatible layers view when user clicks 'Add layer' button.

The patchset includes fixes for orm test suite and new test case for Layer_Version.get_alldeps API used in this bug fix.

Changes in v2: UI shows number of first level deps in compatible layers page.
(Reverted two patches from v1)

The following changes since commit 7b10ae122d46891c734e786358ea5f36760e8d5e:

toaster: Fix broken test case (2015-10-01 10:42:16 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ed/toaster/8004
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/8004

Ed Bartosh (5):
toaster: implement API to get full list of deps
toaster: use get_alldeps in layerdetails renderer
toaster: fix NameError
toaster: fix orm tests
toaster: test get_alldeps API

 bitbake/lib/toaster/orm/models.py       | 21 ++++++++++++-
 bitbake/lib/toaster/orm/tests.py        | 53 ++++++++++++++-------------------
 bitbake/lib/toaster/toastergui/views.py |  4 +--
 3 files changed, 45 insertions(+), 33 deletions(-)

--
Regards,
Ed

author
#1 lore raw

PATCH v2 1/5 toaster: implement API to get full list of deps

Implemented Layer_Version.get_alldeps API to recursively get full list of dependencies for the layer. Dependencies that are already in the project are filtered out from the result. Result list of Layer_Version objects is sorted by layer name for UI to look consistent.

This API is going to be used to show amount and list of dependencies for the layer in the list of compatible layers for the project.

---
 bitbake/lib/toaster/orm/models.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
bitbake/lib/toaster/orm/models.py +19 -0
index 5aed158..c5e256f 100644
@@ -1177,6 +1177,25 @@ class Layer_Version(models.Model):
     def get_detailspage_url(self, project_id):
         return reverse('layerdetails', args=(project_id, self.pk))
 
+    def get_alldeps(self, project_id):
+        """Get full list of unique layer dependencies."""
+        def gen_layerdeps(lver, project):
+            for ldep in lver.dependencies.all():
+                yield ldep.depends_on
+                # get next level of deps recursively calling gen_layerdeps
+                for subdep in gen_layerdeps(ldep.depends_on, project):
+                    yield subdep
+
+        project = Project.objects.get(pk=project_id)
+        result = []
+        projectlvers = [player.layercommit for player in project.projectlayer_set.all()]
+        for dep in gen_layerdeps(self, project):
+            # filter out duplicates and layers already belonging to the project
+            if dep not in result + projectlvers:
+                result.append(dep)
+
+        return sorted(result, key=lambda x: x.layer.name)
+
     def __unicode__(self):
         return "%d %s (VCS %s, Project %s)" % (self.pk, str(self.layer), self.get_vcs_reference(), self.build.project if self.build is not None else "No project")
 
Signature · 1 line
2.1.4
#2 lore raw

Re: [PATCH 1/5] toaster: implement API to get full list of deps

Quoted 35 lines · Ed Bartosh

Implemented Layer_Version.get_alldeps API to recursively get full list of dependencies for the layer. Dependencies that are already in the project are filtered out from the result. Result list of Layer_Version objects is sorted by layer name for UI to look consistent.

This API is going to be used to show amount and list of dependencies for the layer in the list of compatible layers for the project.

---
  bitbake/lib/toaster/orm/models.py | 19 +++++++++++++++++++
  1 file changed, 19 insertions(+)
bitbake/lib/toaster/orm/models.py +12 -0
index 5aed158..c5e256f 100644
@@ -1177,6 +1177,25 @@ class Layer_Version(models.Model):
      def get_detailspage_url(self, project_id):
          return reverse('layerdetails', args=(project_id, self.pk))
 
+    def get_alldeps(self, project_id):
+        """Get full list of unique layer dependencies."""
+        def gen_layerdeps(lver, project):
+            for ldep in lver.dependencies.all():
+                yield ldep.depends_on
+                # get next level of deps recursively calling gen_layerdeps
+                for subdep in gen_layerdeps(ldep.depends_on, project):
+                    yield subdep
+
+        project = Project.objects.get(pk=project_id)
+        result = []
+        projectlvers = [player.layercommit for player in project.projectlayer_set.all()]

bitbake/lib/toaster/orm/models.py class Layer_Version(models.Model): · line 1201

Quoted 10 lines
bitbake/lib/toaster/orm/models.py +7 -0
+        for dep in gen_layerdeps(self, project):
+            # filter out duplicates and layers already belonging to the project
+            if dep not in result + projectlvers:
+                result.append(dep)
+
+        return sorted(result, key=lambda x: x.layer.name)
+
      def __unicode__(self):
          return "%d %s (VCS %s, Project %s)" % (self.pk, str(self.layer), self.get_vcs_reference(), self.build.project if self.build is not None else "No project")
 

Sorry for too late review, spotted a regression.

This will cause a regression in the layerdetails page, the API should not be filtering out any layer dependencies that are already added to the project.

- This is already done in the client side logic which is why the context has projectlayers in it
- The layerdetails page is supposed to list the dependencies for the layer regardless as to whether they have been added or not.

(btw you can do something like this self.dependencies.exclude(depends_on__in=prj.get_project_layer_versions()) if you want a list of the layers it depends on but are not added, rather than iterate through these and create a new list)

As it's been submitted would you be able to write a patch on top to fix this.

Michael

#3 lore raw

Re: [PATCH 1/5] toaster: implement API to get full list of deps

Quoted 58 lines · Michael Wood
Quoted 46 lines · Ed Bartosh

Implemented Layer_Version.get_alldeps API to recursively get full list of dependencies for the layer. Dependencies that are already in the project are filtered out from the result. Result list of Layer_Version objects is sorted by layer name for UI to look consistent.

This API is going to be used to show amount and list of dependencies for the layer in the list of compatible layers for the project.

---
  bitbake/lib/toaster/orm/models.py | 19 +++++++++++++++++++
  1 file changed, 19 insertions(+)
bitbake/lib/toaster/orm/models.py +5 -0
index 5aed158..c5e256f 100644
@@ -1177,6 +1177,25 @@ class Layer_Version(models.Model):
      def get_detailspage_url(self, project_id):
          return reverse('layerdetails', args=(project_id, self.pk))
  +    def get_alldeps(self, project_id):
+        """Get full list of unique layer dependencies."""
+        def gen_layerdeps(lver, project):
+            for ldep in lver.dependencies.all():
+                yield ldep.depends_on
+                # get next level of deps recursively calling 

gen_layerdeps

bitbake/lib/toaster/orm/models.py +6 -0
+                for subdep in gen_layerdeps(ldep.depends_on, project):
+                    yield subdep
+
+        project = Project.objects.get(pk=project_id)
+        result = []
+        projectlvers = [player.layercommit for player in 

project.projectlayer_set.all()]

bitbake/lib/toaster/orm/models.py +2 -0
+        for dep in gen_layerdeps(self, project):
+            # filter out duplicates and layers already belonging to 

the project

bitbake/lib/toaster/orm/models.py +5 -0
+            if dep not in result + projectlvers:
+                result.append(dep)
+
+        return sorted(result, key=lambda x: x.layer.name)
+
      def __unicode__(self):
          return "%d %s (VCS %s, Project %s)" % (self.pk, 
Quoted 1 line

str(self.layer), self.get_vcs_reference(), self.build.project if self.build is not None else "No project")

Sorry for too late review, spotted a regression.

This will cause a regression in the layerdetails page, the API should not be filtering out any layer dependencies that are already added to the project.

- This is already done in the client side logic which is why the context has projectlayers in it
- The layerdetails page is supposed to list the dependencies for the layer regardless as to whether they have been added or not.

Quoted 5 lines

(btw you can do something like this self.dependencies.exclude(depends_on__in=prj.get_project_layer_versions()) if you want a list of the layers it depends on but are not added, rather than iterate through these and create a new list)

As it's been submitted would you be able to write a patch on top to fix this.

Michael

Ah so I might be wrong here, later on in the thread Belen mentioned:

Quoted 2 lines · Belen

So both the 'compatible layers' table and the layer details page should show the fist-level dependencies for a layer

Which contradicts the bug I was looking at https://bugzilla.yoctoproject.org/show_bug.cgi?id=8042
I'll push that bug to you Belen so you can decide what to do.

Thanks,

Michael

author
#4 lore raw

PATCH v2 2/5 toaster: use get_alldeps in layerdetails renderer

In reply to Ed Bartosh

Used Layer_Version.get_alldeps api in layerdetails template renderer to get list of layer dependencies.

[YOCTO 8004]

---
 bitbake/lib/toaster/toastergui/views.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/views.py +2 -2
index 9f16e8f..3168cfa 100755
@@ -2760,8 +2760,8 @@ if True:
 
         context = { 'project' : project,
                    'layerversion' : layer_version,
-                   'layerdeps' : { "list": [
-                     [{"id": y.id, "name": y.layer.name} for y in x.depends_on.get_equivalents_wpriority(project)][0] for x in layer_version.dependencies.all()]},
+                   'layerdeps' : {"list": [{"id": dep.id, "name": dep.layer.name} \
+                                              for dep in layer_version.get_alldeps(project.id)]},
                    'projectlayers': map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=project))
                   }
 
Signature · 1 line
2.1.4
author
#5 lore raw

PATCH v2 3/5 toaster: fix NameError

In reply to Ed Bartosh

Fixed exception: NameError: global name 'DoesNotExist' is not defined

---
 bitbake/lib/toaster/orm/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/orm/models.py +1 -1
index c5e256f..5bc7c6b 100644
@@ -900,7 +900,7 @@ class LayerIndexLayerSource(LayerSource):
                     oe_core_l.save()
                     continue
 
-                except DoesNotExist:
+                except Layer.DoesNotExist:
                     pass
 
             l, created = Layer.objects.get_or_create(layer_source = self, name = li['name'])
Signature · 1 line
2.1.4
author
#6 lore raw

PATCH v2 4/5 toaster: fix orm tests

In reply to Ed Bartosh

Cleaned up and fixed orm tests. Removed test_build_layerversion as it's not needed due to changed compatible_layer_versions API.

---
 bitbake/lib/toaster/orm/tests.py | 33 ++++-----------------------------
 1 file changed, 4 insertions(+), 29 deletions(-)
bitbake/lib/toaster/orm/tests.py +4 -29
index 783aea8..c30f99a 100644
@@ -25,10 +25,9 @@ from django.test import TestCase, TransactionTestCase
 from orm.models import LocalLayerSource, LayerIndexLayerSource, ImportedLayerSource, LayerSource
 from orm.models import Branch
 
-from orm.models import Project, Build, Layer, Layer_Version, Branch, ProjectLayer
+from orm.models import Project, Layer, Layer_Version, Branch, ProjectLayer
 from orm.models import Release, ReleaseLayerSourcePriority, BitbakeVersion
 
-from django.utils import timezone
 from django.db import IntegrityError
 
 import os
@@ -153,35 +152,11 @@ class LayerVersionEquivalenceTestCase(TestCase):
         equivqs = self.lver.get_equivalents_wpriority(self.project)
         self.assertEqual(list(equivqs), [lver2, self.lver])
 
-    def test_build_layerversion(self):
+    def test_compatible_layer_versions(self):
         """
-        Any layer version coming from the build should show up
-        before any layer version coming from upstream
-        """
-        build = Build.objects.create(project=self.project,
-                                     started_on=timezone.now(),
-                                     completed_on=timezone.now())
-        lvb = Layer_Version.objects.create(layer=self.layer, build=build,
-                                           commit="deadbeef")
-
-        # a build layerversion must be in the equivalence
-        # list for the original layerversion
-        equivqs = self.lver.get_equivalents_wpriority(self.project)
-        self.assertTrue(len(equivqs) == 2)
-        self.assertTrue(equivqs[0] == self.lver)
-        self.assertTrue(equivqs[1] == lvb)
-
-        # getting the build layerversion equivalent list must
-        # return the same list as the original layer
-        bequivqs = lvb.get_equivalents_wpriority(self.project)
-
-        self.assertEqual(list(equivqs), list(bequivqs))
-
-    def test_compatible_layerversions(self):
-        """
-        When we have a 2 layer versions, compatible_layerversions()
+        When we have a 2 layer versions, get_all_compatible_layerversions()
         should return a queryset with both.
         """
-        compat_lv = self.project.compatible_layerversions()
+        compat_lv = self.project.get_all_compatible_layer_versions()
         self.assertEqual(list(compat_lv), [self.lver, self.lver2])
 
Signature · 1 line
2.1.4
author
#7 lore raw

PATCH v2 5/5 toaster: test get_alldeps API

In reply to Ed Bartosh

Added test case to test Layer_Version.get_alldeps API.

---
 bitbake/lib/toaster/orm/tests.py | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
bitbake/lib/toaster/orm/tests.py +19 -1
index c30f99a..719266e 100644
@@ -23,7 +23,7 @@
 
 from django.test import TestCase, TransactionTestCase
 from orm.models import LocalLayerSource, LayerIndexLayerSource, ImportedLayerSource, LayerSource
-from orm.models import Branch
+from orm.models import Branch, LayerVersionDependency
 
 from orm.models import Project, Layer, Layer_Version, Branch, ProjectLayer
 from orm.models import Release, ReleaseLayerSourcePriority, BitbakeVersion
@@ -160,3 +160,21 @@ class LayerVersionEquivalenceTestCase(TestCase):
         compat_lv = self.project.get_all_compatible_layer_versions()
         self.assertEqual(list(compat_lv), [self.lver, self.lver2])
 
+    def test_layerversion_get_alldeps(self):
+        """Test Layer_Version.get_alldeps API."""
+        lvers = {}
+        for i in range(10):
+            name = "layer%d" % i
+            lvers[name] = Layer_Version.objects.create(layer=Layer.objects.create(name=name),
+                                                       project=self.project)
+            if i:
+                LayerVersionDependency.objects.create(layer_version=lvers["layer%d" % (i - 1)],
+                                                      depends_on=lvers[name])
+                # Check dinamically added deps
+                self.assertEqual(lvers['layer0'].get_alldeps(self.project.id),
+                                 [lvers['layer%d' % n] for n in range(1, i+1)])
+
+        # Check chain of deps created in previous loop
+        for i in range(10):
+            self.assertEqual(lvers['layer%d' % i].get_alldeps(self.project.id),
+                             [lvers['layer%d' % n] for n in range(i+1, 10)])
Signature · 1 line
2.1.4
#8 lore raw
In reply to Ed Bartosh
Quoted 11 lines · On 01/10/2015 14:56, "[email protected] on behalf of Ed…

Hi,

This patchset fixes bug 8004: importing a layer from the recipes page auto adds the 1st level dependencies but not the 2nd level. Now dependent layers are discovered recursively and Toaster shows all of them
in Compatible layers view when user clicks 'Add layer' button.

The patchset includes fixes for orm test suite and new test case for Layer_Version.get_alldeps API used in this bug fix.

Quoted 6 lines

Changes in v2: UI shows number of first level deps in compatible layers page.
(Reverted two patches from v1)

The following changes since commit
7b10ae122d46891c734e786358ea5f36760e8d5e:

I am bit confused. Now the number of dependencies shown in the 'compatible layers' table matches the dependencies shown in the modal dialog. But I don't think this is the correct behaviour: the information in the table should match the information in the layer details page. Those 2 places (the table and the layer details page) show the 'objective' information about the layer. The modal dialog, on the other hand, takes into account the state of the project configuration, and shows you which layers you still need to add in order to satisfy the layer dependencies.

So both the 'compatible layers' table and the layer details page should show the fist-level dependencies for a layer. Sorry if I wasn't clear before :/

Thanks!

Belén

Quoted 30 lines

toaster: Fix broken test case (2015-10-01 10:42:16 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ed/toaster/8004
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/8004

Ed Bartosh (5):
toaster: implement API to get full list of deps
toaster: use get_alldeps in layerdetails renderer
toaster: fix NameError
toaster: fix orm tests
toaster: test get_alldeps API

bitbake/lib/toaster/orm/models.py | 21 ++++++++++++-
bitbake/lib/toaster/orm/tests.py | 53
++++++++++++++-------------------
bitbake/lib/toaster/toastergui/views.py | 4 +--

3 files changed, 45 insertions(+), 33 deletions(-)

--
Regards,
Ed

Signature · 4 lines
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster
#9 lore raw

Hi,
I'm confused as it looks to me like ed's 8004 patch is behaving as you outlined above;
To reproduce:
1) new proj off master
2) goto layers
3) search meta-shr
4) it shows 4 dependencies in the table which is the number of 1st level deps it has (see
http://layers.openembedded.org/layerindex/branch/master/layer/meta-shr/
)
5) click add for meta-shr. the dialog box pops up with the 4 missing dependencies. Note, the dialog box does not have openembedded-core which is already in the project and it adds the 2nd level dependency for meta-systemd.
6) once meta-shr has been added there are a total of 8 layers in the proj.
7) the meta-shr layer details page show 4 (1st level) deps which match the ones in the compatible layers table.

This seems correct to me, am I missing something?
-b

Quoted 77 lines · Belen
Quoted 11 lines · On 01/10/2015 14:56, "[email protected] on behalf of Ed…

Hi,

This patchset fixes bug 8004: importing a layer from the recipes page auto adds the 1st level dependencies but not the 2nd level. Now dependent layers are discovered recursively and Toaster shows all of them
in Compatible layers view when user clicks 'Add layer' button.

The patchset includes fixes for orm test suite and new test case for Layer_Version.get_alldeps API used in this bug fix.

Quoted 6 lines

Changes in v2: UI shows number of first level deps in compatible layers page.
(Reverted two patches from v1)

The following changes since commit
7b10ae122d46891c734e786358ea5f36760e8d5e:

I am bit confused. Now the number of dependencies shown in the 'compatible layers' table matches the dependencies shown in the modal dialog. But I don't think this is the correct behaviour: the information in the table should match the information in the layer details page. Those 2 places (the table and the layer details page) show the 'objective' information about the layer. The modal dialog, on the other hand, takes into account the state of the project configuration, and shows you which layers you still need to add in order to satisfy the layer dependencies.

So both the 'compatible layers' table and the layer details page should show the fist-level dependencies for a layer. Sorry if I wasn't clear before :/

Thanks!

Belén

Quoted 25 lines

toaster: Fix broken test case (2015-10-01 10:42:16 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ed/toaster/8004
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/8004

Ed Bartosh (5):
toaster: implement API to get full list of deps
toaster: use get_alldeps in layerdetails renderer
toaster: fix NameError
toaster: fix orm tests
toaster: test get_alldeps API

bitbake/lib/toaster/orm/models.py | 21 ++++++++++++-
bitbake/lib/toaster/orm/tests.py | 53
++++++++++++++-------------------
bitbake/lib/toaster/toastergui/views.py | 4 +--

3 files changed, 45 insertions(+), 33 deletions(-)

--
Regards,
Ed

Quoted 5 lines

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

#10 lore raw
Quoted 20 lines · Brian Avery

Hi,
I'm confused as it looks to me like ed's 8004 patch is behaving as you outlined above;
To reproduce:
1) new proj off master
2) goto layers
3) search meta-shr
4) it shows 4 dependencies in the table which is the number of 1st level deps it has (see
http://layers.openembedded.org/layerindex/branch/master/layer/meta-shr/
)
5) click add for meta-shr. the dialog box pops up with the 4 missing dependencies. Note, the dialog box does not have openembedded-core which is already in the project and it adds the 2nd level dependency for meta-systemd.
6) once meta-shr has been added there are a total of 8 layers in the proj.
7) the meta-shr layer details page show 4 (1st level) deps which match the ones in the compatible layers table.

Quoted 1 line

This seems correct to me, am I missing something?

No: I was missing something. This behaves correctly.

Sorry for the confusion.

Cheers

Belén

Quoted 83 lines

-b

Quoted 79 lines · Belen
Quoted 11 lines · On 01/10/2015 14:56, "[email protected] on behalf of Ed…

Hi,

This patchset fixes bug 8004: importing a layer from the recipes page auto adds the 1st level dependencies but not the 2nd level. Now dependent layers are discovered recursively and Toaster shows all of them
in Compatible layers view when user clicks 'Add layer' button.

The patchset includes fixes for orm test suite and new test case for Layer_Version.get_alldeps API used in this bug fix.

Quoted 6 lines

Changes in v2: UI shows number of first level deps in compatible layers page.
(Reverted two patches from v1)

The following changes since commit
7b10ae122d46891c734e786358ea5f36760e8d5e:

I am bit confused. Now the number of dependencies shown in the 'compatible
layers' table matches the dependencies shown in the modal dialog. But I don't think this is the correct behaviour: the information in the table should match the information in the layer details page. Those 2 places (the table and the layer details page) show the 'objective' information about the layer. The modal dialog, on the other hand, takes into account the state of the project configuration, and shows you which layers you still need to add in order to satisfy the layer dependencies.

So both the 'compatible layers' table and the layer details page should show the fist-level dependencies for a layer. Sorry if I wasn't clear before :/

Thanks!

Belén

Quoted 26 lines

toaster: Fix broken test case (2015-10-01 10:42:16 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ed/toaster/8004

http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/8004

Ed Bartosh (5):
toaster: implement API to get full list of deps
toaster: use get_alldeps in layerdetails renderer
toaster: fix NameError
toaster: fix orm tests
toaster: test get_alldeps API

bitbake/lib/toaster/orm/models.py | 21 ++++++++++++-
bitbake/lib/toaster/orm/tests.py | 53
++++++++++++++-------------------
bitbake/lib/toaster/toastergui/views.py | 4 +--

3 files changed, 45 insertions(+), 33 deletions(-)

--
Regards,
Ed

Quoted 5 lines

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Applied
#11 lore raw

pushed to bitbake-devel
pushed to toaster-next

-b

Quoted 120 lines · Belen
Quoted 20 lines · Brian Avery

Hi,
I'm confused as it looks to me like ed's 8004 patch is behaving as you outlined above;
To reproduce:
1) new proj off master
2) goto layers
3) search meta-shr
4) it shows 4 dependencies in the table which is the number of 1st level deps it has (see
http://layers.openembedded.org/layerindex/branch/master/layer/meta-shr/
)
5) click add for meta-shr. the dialog box pops up with the 4 missing dependencies. Note, the dialog box does not have openembedded-core which is already in the project and it adds the 2nd level dependency for meta-systemd.
6) once meta-shr has been added there are a total of 8 layers in the proj.
7) the meta-shr layer details page show 4 (1st level) deps which match the ones in the compatible layers table.

Quoted 1 line

This seems correct to me, am I missing something?

No: I was missing something. This behaves correctly.

Sorry for the confusion.

Cheers

Belén

Quoted 83 lines

-b

Quoted 79 lines · Belen
Quoted 11 lines · On 01/10/2015 14:56, "[email protected] on behalf of Ed…

Hi,

This patchset fixes bug 8004: importing a layer from the recipes page auto adds the 1st level dependencies but not the 2nd level. Now dependent layers are discovered recursively and Toaster shows all of them
in Compatible layers view when user clicks 'Add layer' button.

The patchset includes fixes for orm test suite and new test case for Layer_Version.get_alldeps API used in this bug fix.

Quoted 6 lines

Changes in v2: UI shows number of first level deps in compatible layers page.
(Reverted two patches from v1)

The following changes since commit
7b10ae122d46891c734e786358ea5f36760e8d5e:

I am bit confused. Now the number of dependencies shown in the 'compatible
layers' table matches the dependencies shown in the modal dialog. But I don't think this is the correct behaviour: the information in the table should match the information in the layer details page. Those 2 places (the table and the layer details page) show the 'objective' information about the layer. The modal dialog, on the other hand, takes into account the state of the project configuration, and shows you which layers you still need to add in order to satisfy the layer dependencies.

So both the 'compatible layers' table and the layer details page should show the fist-level dependencies for a layer. Sorry if I wasn't clear before :/

Thanks!

Belén

Quoted 26 lines

toaster: Fix broken test case (2015-10-01 10:42:16 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ed/toaster/8004

http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/8004

Ed Bartosh (5):
toaster: implement API to get full list of deps
toaster: use get_alldeps in layerdetails renderer
toaster: fix NameError
toaster: fix orm tests
toaster: test get_alldeps API

bitbake/lib/toaster/orm/models.py | 21 ++++++++++++-
bitbake/lib/toaster/orm/tests.py | 53
++++++++++++++-------------------
bitbake/lib/toaster/toastergui/views.py | 4 +--

3 files changed, 45 insertions(+), 33 deletions(-)

--
Regards,
Ed

Quoted 5 lines

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster