* [review request V3] toaster: add rev dep column to image detail pages
@ 2016-03-31 18:56 Dave Lerner
2016-03-31 18:56 ` [review-request v3] [Patch 1/1] " Dave Lerner
0 siblings, 1 reply; 5+ messages in thread
From: Dave Lerner @ 2016-03-31 18:56 UTC (permalink / raw)
To: toaster, belen.barros.pena, elliot.smith
Comment: Version 3 has
commit message format & typo corrections,
rebased to toaster-next as of 31Mar16,
retested,
pushed to the contrib branch below.
Poky Contrib Branch: dlerner/9163-revdep-columns-for-customimage-pages
Target Branches: toaster-next master
Defect: 9163
Summary: toaster: add rev dep column to image detail pages
Commit
------
7ce5e52 toaster: add rev dep column to image detail pages
bitbake/lib/toaster/orm/models.py | 7 +++++++
bitbake/lib/toaster/toastergui/tables.py | 6 ++++++
.../templates/snippets/pkg_revdependencies_popover.html | 15 +++++++++++++++
3 files changed, 28 insertions(+)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [review-request v3] [Patch 1/1] toaster: add rev dep column to image detail pages
2016-03-31 18:56 [review request V3] toaster: add rev dep column to image detail pages Dave Lerner
@ 2016-03-31 18:56 ` Dave Lerner
2016-04-04 8:30 ` Smith, Elliot
0 siblings, 1 reply; 5+ messages in thread
From: Dave Lerner @ 2016-03-31 18:56 UTC (permalink / raw)
To: toaster, belen.barros.pena, elliot.smith
Add a column to the custom image pages that shows the reverse
dependencies in a format matching the dependencies column:
- either blank or a button showing the count of reverse dependencies,
- when the button is clicked, a popover appears showing the list
of reverse dependencies, with each package's size, and the total
size of all of the reverse dependencies.
The implementation adds a packages table method to retreive the reverse
dependency total size, and adds a separate 'popover' html template. Both
of these changes follow the pattern for the dependencies column.
[YOCTO #9163]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
---
bitbake/lib/toaster/orm/models.py | 7 +++++++
bitbake/lib/toaster/toastergui/tables.py | 6 ++++++
.../templates/snippets/pkg_revdependencies_popover.html | 15 +++++++++++++++
3 files changed, 28 insertions(+)
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 6ae6316..cfab7b7 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -813,6 +813,13 @@ class Package_DependencyManager(models.Manager):
"""
return self.all().aggregate(Sum('depends_on__size'))
+ def get_total_revdeps_size(self):
+ """ Returns the total file size of all the packages that depend on
+ this package.
+ """
+ return self.all().aggregate(Sum('package_id__size'))
+
+
def all_depends(self):
""" Returns just the depends packages and not any other dep_type """
return self.filter(Q(dep_type=Package_Dependency.TYPE_RDEPENDS) |
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 67a6592..c677ec5 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -725,6 +725,12 @@ class PackagesTable(ToasterTable):
static_data_template='\
{% include "snippets/pkg_dependencies_popover.html" %}')
+ self.add_column(title="Reverse dependencies",
+ static_data_name="reverse_dependencies",
+ static_data_template='\
+ {% include "snippets/pkg_revdependencies_popover.html" %}',
+ hidden=True)
+
self.add_column(title="Recipe",
field_name="recipe__name",
orderable=True,
diff --git a/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
new file mode 100644
index 0000000..04fd2d3
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
@@ -0,0 +1,15 @@
+{# Popover that displays the reverse dependencies and sizes of a package 'data' used in the Packages table #}
+{% with data.package_dependencies_target.all_depends.count as dep_count %}
+{% load projecttags %}
+{% if dep_count %}
+ <a data-content="<ul class='unstyled'>
+ {% for dep in data.package_dependencies_target.all_depends|dictsort:'package.name' %}
+ <li>{{dep.package.name}} {% if dep.package.size > 0 %}({{dep.package.size|filtered_filesizeformat}}){% endif %}</li>
+ {% endfor %}
+ </ul>" title="" class="btn" data-original-title="
+ <strong>{{data.name}}</strong> reverse dependencies - <strong>{{data.package_dependencies_target.get_total_revdeps_size.package_id__size__sum|filtered_filesizeformat}}</strong>">
+ {{dep_count}}
+</a>
+{% endif %}
+{% endwith %}
+
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [review-request v3] [Patch 1/1] toaster: add rev dep column to image detail pages
2016-03-31 18:56 ` [review-request v3] [Patch 1/1] " Dave Lerner
@ 2016-04-04 8:30 ` Smith, Elliot
2016-04-04 13:55 ` Lerner, Dave
0 siblings, 1 reply; 5+ messages in thread
From: Smith, Elliot @ 2016-04-04 8:30 UTC (permalink / raw)
To: Dave Lerner; +Cc: Brian Avery, Belen Barros Pena (Intel), toaster
[-- Attachment #1: Type: text/plain, Size: 4585 bytes --]
Hello Dave.
I've had a look at this, but have noticed an issue where there are some
repeats of packages in the reverse dependencies list (and in the
dependencies list). Several other team members have seen the same thing.
Consequently, I'm not sure whether to put your patches in for now. I've
cc'd Brian for his opinion.
However, I am confident that this issue has nothing to do with your
patches. I just didn't want to muddy the issue further in case anyone is
already dealing with this.
Elliot
On 31 March 2016 at 19:56, Dave Lerner <dave.lerner@windriver.com> wrote:
> Add a column to the custom image pages that shows the reverse
> dependencies in a format matching the dependencies column:
> - either blank or a button showing the count of reverse dependencies,
> - when the button is clicked, a popover appears showing the list
> of reverse dependencies, with each package's size, and the total
> size of all of the reverse dependencies.
>
> The implementation adds a packages table method to retreive the reverse
> dependency total size, and adds a separate 'popover' html template. Both
> of these changes follow the pattern for the dependencies column.
>
> [YOCTO #9163]
>
> Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
> ---
> bitbake/lib/toaster/orm/models.py | 7 +++++++
> bitbake/lib/toaster/toastergui/tables.py | 6 ++++++
> .../templates/snippets/pkg_revdependencies_popover.html | 15
> +++++++++++++++
> 3 files changed, 28 insertions(+)
>
> diff --git a/bitbake/lib/toaster/orm/models.py
> b/bitbake/lib/toaster/orm/models.py
> index 6ae6316..cfab7b7 100644
> --- a/bitbake/lib/toaster/orm/models.py
> +++ b/bitbake/lib/toaster/orm/models.py
> @@ -813,6 +813,13 @@ class Package_DependencyManager(models.Manager):
> """
> return self.all().aggregate(Sum('depends_on__size'))
>
> + def get_total_revdeps_size(self):
> + """ Returns the total file size of all the packages that depend on
> + this package.
> + """
> + return self.all().aggregate(Sum('package_id__size'))
> +
> +
> def all_depends(self):
> """ Returns just the depends packages and not any other dep_type
> """
> return self.filter(Q(dep_type=Package_Dependency.TYPE_RDEPENDS) |
> diff --git a/bitbake/lib/toaster/toastergui/tables.py
> b/bitbake/lib/toaster/toastergui/tables.py
> index 67a6592..c677ec5 100644
> --- a/bitbake/lib/toaster/toastergui/tables.py
> +++ b/bitbake/lib/toaster/toastergui/tables.py
> @@ -725,6 +725,12 @@ class PackagesTable(ToasterTable):
> static_data_template='\
> {% include
> "snippets/pkg_dependencies_popover.html" %}')
>
> + self.add_column(title="Reverse dependencies",
> + static_data_name="reverse_dependencies",
> + static_data_template='\
> + {% include
> "snippets/pkg_revdependencies_popover.html" %}',
> + hidden=True)
> +
> self.add_column(title="Recipe",
> field_name="recipe__name",
> orderable=True,
> diff --git
> a/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
> b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
> new file mode 100644
> index 0000000..04fd2d3
> --- /dev/null
> +++
> b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
> @@ -0,0 +1,15 @@
> +{# Popover that displays the reverse dependencies and sizes of a package
> 'data' used in the Packages table #}
> +{% with data.package_dependencies_target.all_depends.count as dep_count %}
> +{% load projecttags %}
> +{% if dep_count %}
> + <a data-content="<ul class='unstyled'>
> + {% for dep in data.package_dependencies_target.all_depends|dictsort:'
> package.name' %}
> + <li>{{dep.package.name}} {% if dep.package.size > 0
> %}({{dep.package.size|filtered_filesizeformat}}){% endif %}</li>
> + {% endfor %}
> + </ul>" title="" class="btn" data-original-title="
> + <strong>{{data.name}}</strong> reverse dependencies -
> <strong>{{data.package_dependencies_target.get_total_revdeps_size.package_id__size__sum|filtered_filesizeformat}}</strong>">
> + {{dep_count}}
> +</a>
> +{% endif %}
> +{% endwith %}
> +
> --
> 2.7.4
>
>
--
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
[-- Attachment #2: Type: text/html, Size: 6041 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [review-request v3] [Patch 1/1] toaster: add rev dep column to image detail pages
2016-04-04 8:30 ` Smith, Elliot
@ 2016-04-04 13:55 ` Lerner, Dave
2016-04-06 13:45 ` Smith, Elliot
0 siblings, 1 reply; 5+ messages in thread
From: Lerner, Dave @ 2016-04-04 13:55 UTC (permalink / raw)
To: SMITH, ELLIOT
Cc: AVERY, BRIAN, Belen Barros Pena (Intel), toaster@yoctoproject.org
Actually I have not seen this duplication with rev dep list, but I did see this with the normal dependency list a few times, that is until I spent some effort trying to reproduce the conditions cleanly, 2 projects, 2 custom-images; but I wasn't able to after a rebase. Note again, this was for the dependency, not the reverse dependency list.
I will be trying to duplicate the 'duplication' symptoms today, dep or rev-dep. Feel free to hold off submitting to give me more time to try and find the steps, and then the root-cause. I will try a systematic approach and publish the positive or negative findings later today.
Dave
> -----Original Message-----
> From: Smith, Elliot [mailto:elliot.smith@intel.com]
> Sent: Monday, April 04, 2016 3:31 AM
> To: Lerner, Dave
> Cc: toaster@yoctoproject.org; Belen Barros Pena (Intel); AVERY, BRIAN
> Subject: Re: [Toaster] [review-request v3] [Patch 1/1] toaster: add rev dep column to
> image detail pages
>
> Hello Dave.
>
> I've had a look at this, but have noticed an issue where there are some repeats of
> packages in the reverse dependencies list (and in the dependencies list). Several other
> team members have seen the same thing.
>
> Consequently, I'm not sure whether to put your patches in for now. I've cc'd Brian for
> his opinion.
>
> However, I am confident that this issue has nothing to do with your patches. I just
> didn't want to muddy the issue further in case anyone is already dealing with this.
>
> Elliot
>
> On 31 March 2016 at 19:56, Dave Lerner <dave.lerner@windriver.com> wrote:
>
>
> Add a column to the custom image pages that shows the reverse
> dependencies in a format matching the dependencies column:
> - either blank or a button showing the count of reverse dependencies,
> - when the button is clicked, a popover appears showing the list
> of reverse dependencies, with each package's size, and the total
> size of all of the reverse dependencies.
>
> The implementation adds a packages table method to retreive the reverse
> dependency total size, and adds a separate 'popover' html template. Both
> of these changes follow the pattern for the dependencies column.
>
> [YOCTO #9163]
>
> Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
> ---
> bitbake/lib/toaster/orm/models.py | 7 +++++++
> bitbake/lib/toaster/toastergui/tables.py | 6 ++++++
> .../templates/snippets/pkg_revdependencies_popover.html | 15 +++++++++++++++
> 3 files changed, 28 insertions(+)
>
> diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
> index 6ae6316..cfab7b7 100644
> --- a/bitbake/lib/toaster/orm/models.py
> +++ b/bitbake/lib/toaster/orm/models.py
> @@ -813,6 +813,13 @@ class Package_DependencyManager(models.Manager):
> """
> return self.all().aggregate(Sum('depends_on__size'))
>
> + def get_total_revdeps_size(self):
> + """ Returns the total file size of all the packages that depend on
> + this package.
> + """
> + return self.all().aggregate(Sum('package_id__size'))
> +
> +
> def all_depends(self):
> """ Returns just the depends packages and not any other dep_type """
> return self.filter(Q(dep_type=Package_Dependency.TYPE_RDEPENDS) |
> diff --git a/bitbake/lib/toaster/toastergui/tables.py
> b/bitbake/lib/toaster/toastergui/tables.py
> index 67a6592..c677ec5 100644
> --- a/bitbake/lib/toaster/toastergui/tables.py
> +++ b/bitbake/lib/toaster/toastergui/tables.py
> @@ -725,6 +725,12 @@ class PackagesTable(ToasterTable):
> static_data_template='\
> {% include "snippets/pkg_dependencies_popover.html" %}')
>
> + self.add_column(title="Reverse dependencies",
> + static_data_name="reverse_dependencies",
> + static_data_template='\
> + {% include "snippets/pkg_revdependencies_popover.html"
> %}',
> + hidden=True)
> +
> self.add_column(title="Recipe",
> field_name="recipe__name",
> orderable=True,
> diff --git
> a/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
> b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
> new file mode 100644
> index 0000000..04fd2d3
> --- /dev/null
> +++
> b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
> @@ -0,0 +1,15 @@
> +{# Popover that displays the reverse dependencies and sizes of a package 'data'
> used in the Packages table #}
> +{% with data.package_dependencies_target.all_depends.count as dep_count %}
> +{% load projecttags %}
> +{% if dep_count %}
> + <a data-content="<ul class='unstyled'>
> + {% for dep in
> data.package_dependencies_target.all_depends|dictsort:'package.name' %}
> + <li>{{dep.package.name}} {% if dep.package.size > 0
> %}({{dep.package.size|filtered_filesizeformat}}){% endif %}</li>
> + {% endfor %}
> + </ul>" title="" class="btn" data-original-title="
> + <strong>{{data.name}}</strong> reverse dependencies -
> <strong>{{data.package_dependencies_target.get_total_revdeps_size.package_id__size__sum|
> filtered_filesizeformat}}</strong>">
> + {{dep_count}}
> +</a>
> +{% endif %}
> +{% endwith %}
> +
> --
> 2.7.4
>
>
>
>
>
>
> --
>
> Elliot Smith
> Software Engineer
> Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [review-request v3] [Patch 1/1] toaster: add rev dep column to image detail pages
2016-04-04 13:55 ` Lerner, Dave
@ 2016-04-06 13:45 ` Smith, Elliot
0 siblings, 0 replies; 5+ messages in thread
From: Smith, Elliot @ 2016-04-06 13:45 UTC (permalink / raw)
To: Lerner, David M (Wind River)
Cc: Avery, Brian, Belen Barros Pena (Intel), toaster@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 6792 bytes --]
Tested again. I still sometimes see the duplicates, but haven't narrowed
down why.
I am convinced the duplication is not due to this patch, so I submitted it
upstream to bitbake-devel and added it to toaster-next.
Elliot
On 4 April 2016 at 14:55, Lerner, David M (Wind River) <
dave.lerner@windriver.com> wrote:
> Actually I have not seen this duplication with rev dep list, but I did see
> this with the normal dependency list a few times, that is until I spent
> some effort trying to reproduce the conditions cleanly, 2 projects, 2
> custom-images; but I wasn't able to after a rebase. Note again, this was
> for the dependency, not the reverse dependency list.
>
> I will be trying to duplicate the 'duplication' symptoms today, dep or
> rev-dep. Feel free to hold off submitting to give me more time to try and
> find the steps, and then the root-cause. I will try a systematic approach
> and publish the positive or negative findings later today.
> Dave
>
> > -----Original Message-----
> > From: Smith, Elliot [mailto:elliot.smith@intel.com]
> > Sent: Monday, April 04, 2016 3:31 AM
> > To: Lerner, Dave
> > Cc: toaster@yoctoproject.org; Belen Barros Pena (Intel); AVERY, BRIAN
> > Subject: Re: [Toaster] [review-request v3] [Patch 1/1] toaster: add rev
> dep column to
> > image detail pages
> >
> > Hello Dave.
> >
> > I've had a look at this, but have noticed an issue where there are some
> repeats of
> > packages in the reverse dependencies list (and in the dependencies
> list). Several other
> > team members have seen the same thing.
> >
> > Consequently, I'm not sure whether to put your patches in for now. I've
> cc'd Brian for
> > his opinion.
> >
> > However, I am confident that this issue has nothing to do with your
> patches. I just
> > didn't want to muddy the issue further in case anyone is already dealing
> with this.
> >
> > Elliot
> >
> > On 31 March 2016 at 19:56, Dave Lerner <dave.lerner@windriver.com>
> wrote:
> >
> >
> > Add a column to the custom image pages that shows the reverse
> > dependencies in a format matching the dependencies column:
> > - either blank or a button showing the count of reverse
> dependencies,
> > - when the button is clicked, a popover appears showing the list
> > of reverse dependencies, with each package's size, and the
> total
> > size of all of the reverse dependencies.
> >
> > The implementation adds a packages table method to retreive the
> reverse
> > dependency total size, and adds a separate 'popover' html
> template. Both
> > of these changes follow the pattern for the dependencies column.
> >
> > [YOCTO #9163]
> >
> > Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
> > ---
> > bitbake/lib/toaster/orm/models.py | 7
> +++++++
> > bitbake/lib/toaster/toastergui/tables.py | 6
> ++++++
> > .../templates/snippets/pkg_revdependencies_popover.html | 15
> +++++++++++++++
> > 3 files changed, 28 insertions(+)
> >
> > diff --git a/bitbake/lib/toaster/orm/models.py
> b/bitbake/lib/toaster/orm/models.py
> > index 6ae6316..cfab7b7 100644
> > --- a/bitbake/lib/toaster/orm/models.py
> > +++ b/bitbake/lib/toaster/orm/models.py
> > @@ -813,6 +813,13 @@ class
> Package_DependencyManager(models.Manager):
> > """
> > return self.all().aggregate(Sum('depends_on__size'))
> >
> > + def get_total_revdeps_size(self):
> > + """ Returns the total file size of all the packages that
> depend on
> > + this package.
> > + """
> > + return self.all().aggregate(Sum('package_id__size'))
> > +
> > +
> > def all_depends(self):
> > """ Returns just the depends packages and not any other
> dep_type """
> > return
> self.filter(Q(dep_type=Package_Dependency.TYPE_RDEPENDS) |
> > diff --git a/bitbake/lib/toaster/toastergui/tables.py
> > b/bitbake/lib/toaster/toastergui/tables.py
> > index 67a6592..c677ec5 100644
> > --- a/bitbake/lib/toaster/toastergui/tables.py
> > +++ b/bitbake/lib/toaster/toastergui/tables.py
> > @@ -725,6 +725,12 @@ class PackagesTable(ToasterTable):
> > static_data_template='\
> > {% include
> "snippets/pkg_dependencies_popover.html" %}')
> >
> > + self.add_column(title="Reverse dependencies",
> > + static_data_name="reverse_dependencies",
> > + static_data_template='\
> > + {% include
> "snippets/pkg_revdependencies_popover.html"
> > %}',
> > + hidden=True)
> > +
> > self.add_column(title="Recipe",
> > field_name="recipe__name",
> > orderable=True,
> > diff --git
> >
> a/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
> >
> b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
> > new file mode 100644
> > index 0000000..04fd2d3
> > --- /dev/null
> > +++
> >
> b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
> > @@ -0,0 +1,15 @@
> > +{# Popover that displays the reverse dependencies and sizes of a
> package 'data'
> > used in the Packages table #}
> > +{% with data.package_dependencies_target.all_depends.count as
> dep_count %}
> > +{% load projecttags %}
> > +{% if dep_count %}
> > + <a data-content="<ul class='unstyled'>
> > + {% for dep in
> > data.package_dependencies_target.all_depends|dictsort:'package.name' %}
> > + <li>{{dep.package.name}} {% if dep.package.size > 0
> > %}({{dep.package.size|filtered_filesizeformat}}){% endif %}</li>
> > + {% endfor %}
> > + </ul>" title="" class="btn" data-original-title="
> > + <strong>{{data.name}}</strong> reverse dependencies -
> >
> <strong>{{data.package_dependencies_target.get_total_revdeps_size.package_id__size__sum|
> > filtered_filesizeformat}}</strong>">
> > + {{dep_count}}
> > +</a>
> > +{% endif %}
> > +{% endwith %}
> > +
> > --
> > 2.7.4
> >
> >
> >
> >
> >
> >
> > --
> >
> > Elliot Smith
> > Software Engineer
> > Intel Open Source Technology Centre
>
--
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
[-- Attachment #2: Type: text/html, Size: 9102 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-06 13:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-31 18:56 [review request V3] toaster: add rev dep column to image detail pages Dave Lerner
2016-03-31 18:56 ` [review-request v3] [Patch 1/1] " Dave Lerner
2016-04-04 8:30 ` Smith, Elliot
2016-04-04 13:55 ` Lerner, Dave
2016-04-06 13:45 ` Smith, Elliot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.