Skip to contentSkip to conversation

Make sure we show the same dependencies as the popover

PATCH New Michael Wood 3 participants 4 messages Mar 4, 2016 – Mar 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make sure we show the same dependencies as the popover

Sometimes when adding a package which is shown to have dependencies (tested with alsa-utils) the dependency dialog does not appear to show any dependencies, this is because of the multiple types of RDEPENDS and sometimes it is one or ther other. This patch does the same as the Package.all_depends method and returns you a list of dependencies regardless of whether they are RDEPENDS or TRDEPENDS. Future work on rationalising these fields needs to be done when we do some refactoring.

Michael Wood (1):
toaster: views api Package info return both kinds of RDEPENDS

 bitbake/lib/toaster/toastergui/views.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 toaster: views api Package info return both kinds of RDEPENDS

As we do with the popover snippet which shows dependencies inline in the table also show dependencies which have both TYPE_TRDEPENDS and TYPE_RDEPENDS.

Also remove obsolete comment

---
 bitbake/lib/toaster/toastergui/views.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
bitbake/lib/toaster/toastergui/views.py +4 -5
index f3b8d3c..bd11892 100755
@@ -2577,9 +2577,6 @@ if True:
             else:
                 all_current_packages = recipe.get_all_packages()
 
-                # TODO currently we ignore packgegroups as we don't have a
-                # way to deal with them yet.
-
                 # Dependencies for package which aren't satisfied by the
                 # current packages in the custom image recipe
                 deps = package.package_dependencies_source.annotate(
@@ -2587,8 +2584,10 @@ if True:
                     pk=F('depends_on__pk'),
                     size=F('depends_on__size'),
                 ).values("name", "pk", "size").filter(
-                    ~Q(pk__in=all_current_packages) &
-                    Q(dep_type=Package_Dependency.TYPE_TRDEPENDS)
+                    # There are two depends types we don't know why
+                    (Q(dep_type=Package_Dependency.TYPE_TRDEPENDS) |
+                    Q(dep_type=Package_Dependency.TYPE_RDEPENDS)) &
+                    ~Q(pk__in=all_current_packages)
                 )
 
                 # Reverse dependencies which are needed by packages that are
Signature · 1 line
2.5.0
#2 lore raw

Re: [PATCH] toaster: views api Package info return both kinds of RDEPENDS

Quoted 3 lines · On 04/03/2016 16:45, "[email protected] on behalf of Michael…

As we do with the popover snippet which shows dependencies inline in the table also show dependencies which have both TYPE_TRDEPENDS and TYPE_RDEPENDS.

This seems to work for me. Thanks!

Belén

Quoted 46 lines

Also remove obsolete comment

---
bitbake/lib/toaster/toastergui/views.py | 9 ++++-----

1 file changed, 4 insertions(+), 5 deletions(-)
bitbake/lib/toaster/toastergui/views.py +0 -1
index f3b8d3c..bd11892 100755
@@ -2577,9 +2577,6 @@ if True:
            else:
                all_current_packages = recipe.get_all_packages()
 
-                # TODO currently we ignore packgegroups as we don't have

a

bitbake/lib/toaster/toastergui/views.py +4 -4
-                # way to deal with them yet.
-
                # Dependencies for package which aren't satisfied by the
                # current packages in the custom image recipe
                deps = package.package_dependencies_source.annotate(
@@ -2587,8 +2584,10 @@ if True:
                    pk=F('depends_on__pk'),
                    size=F('depends_on__size'),
                ).values("name", "pk", "size").filter(
-                    ~Q(pk__in=all_current_packages) &
-                    Q(dep_type=Package_Dependency.TYPE_TRDEPENDS)
+                    # There are two depends types we don't know why
+                    (Q(dep_type=Package_Dependency.TYPE_TRDEPENDS) |
+                    Q(dep_type=Package_Dependency.TYPE_RDEPENDS)) &
+                    ~Q(pk__in=all_current_packages)
                )
 
                # Reverse dependencies which are needed by packages that

are

Signature · 7 lines
2.5.0

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

Re: [PATCH] toaster: views api Package info return both kinds of RDEPENDS

In reply to Michael Wood

Sent upstream, added to toaster-next.

Elliot

Quoted 49 lines · Michael Wood

As we do with the popover snippet which shows dependencies inline in the table also show dependencies which have both TYPE_TRDEPENDS and TYPE_RDEPENDS.

Also remove obsolete comment

---
 bitbake/lib/toaster/toastergui/views.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
bitbake/lib/toaster/toastergui/views.py +4 -5
index f3b8d3c..bd11892 100755
@@ -2577,9 +2577,6 @@ if True:
             else:
                 all_current_packages = recipe.get_all_packages()
 
-                # TODO currently we ignore packgegroups as we don't have a
-                # way to deal with them yet.
-
                 # Dependencies for package which aren't satisfied by the
                 # current packages in the custom image recipe
                 deps = package.package_dependencies_source.annotate(
@@ -2587,8 +2584,10 @@ if True:
                     pk=F('depends_on__pk'),
                     size=F('depends_on__size'),
                 ).values("name", "pk", "size").filter(
-                    ~Q(pk__in=all_current_packages) &
-                    Q(dep_type=Package_Dependency.TYPE_TRDEPENDS)
+                    # There are two depends types we don't know why
+                    (Q(dep_type=Package_Dependency.TYPE_TRDEPENDS) |
+                    Q(dep_type=Package_Dependency.TYPE_RDEPENDS)) &
+                    ~Q(pk__in=all_current_packages)
                 )
 
                 # Reverse dependencies which are needed by packages that

are
--
2.5.0

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

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre