All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] toaster: cummulative 100119 patch
@ 2019-10-01 23:17 David Reyna
  2019-10-01 23:17 ` [PATCH 1/2] toaster: issues in import layer when clicking 'add layer' David Reyna
  2019-10-01 23:17 ` [PATCH 2/2] toaster: improve warnings when adding dependency to packages David Reyna
  0 siblings, 2 replies; 4+ messages in thread
From: David Reyna @ 2019-10-01 23:17 UTC (permalink / raw)
  To: bitbake-devel

From: David Reyna <David.Reyna@windriver.com>

Toaster cummulative patch October 01, 2019
  [YOCTO #13385] toaster: issues in import layer when clicking 'add layer'
  [YOCTO #13386]toaster: improve warnings when adding dependency to packages

The following changes since commit a73cbe649af5e988eddb4a35b81011cb482d7480:

  bitbake: siggen: Remove full path from unitaskhashes keys (2019-09-30 17:23:35 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib dreyna/submit/dreyna/toaster/toaster_cummulative_100119
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=dreyna/submit/dreyna/toaster/toaster_cummulative_100119

David Reyna (2):
  toaster: issues in import layer when clicking 'add layer'
  toaster: improve warnings when adding dependency to packages

 lib/bb/ui/buildinfohelper.py                    | 10 ++++++++++
 lib/toaster/toastergui/static/js/importlayer.js | 12 ++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] toaster: issues in import layer when clicking 'add layer'
  2019-10-01 23:17 [PATCH 0/2] toaster: cummulative 100119 patch David Reyna
@ 2019-10-01 23:17 ` David Reyna
  2019-10-01 23:17 ` [PATCH 2/2] toaster: improve warnings when adding dependency to packages David Reyna
  1 sibling, 0 replies; 4+ messages in thread
From: David Reyna @ 2019-10-01 23:17 UTC (permalink / raw)
  To: bitbake-devel

From: David Reyna <David.Reyna@windriver.com>

There were three issues in this one bug.
  1) The Add Layer button allows empty layers
  2) The internal XHR URL was wrong, which caused a hidden AJAX error
     and did not correctly complete the action nor disable the button
     after an add.
  3) There was a race condition between typing in the dependent layer
     select text box (which would normally disable the add button), and
     the typeahead pull-down selection (which would normally enable the
     add button). This forced the user to select the typedahead layer twice.

[YOCTO #13385]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 lib/toaster/toastergui/static/js/importlayer.js | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/toastergui/static/js/importlayer.js b/lib/toaster/toastergui/static/js/importlayer.js
index 2964839..8e2032d 100644
--- a/lib/toaster/toastergui/static/js/importlayer.js
+++ b/lib/toaster/toastergui/static/js/importlayer.js
@@ -17,11 +17,15 @@ function importLayerPageInit (ctx) {
   var currentLayerDepSelection;
   var validLayerName = /^(\w|-)+$/;
 
+  /* Catch 'disable' race condition between type-ahead started and "input change" */
+  var typeAheadStarted = 0;
+
   libtoaster.makeTypeahead(layerDepInput,
                            libtoaster.ctx.layersTypeAheadUrl,
                            { include_added: "true" }, function(item){
     currentLayerDepSelection = item;
     layerDepBtn.removeAttr("disabled");
+    typeAheadStarted = 1;
   });
 
   layerDepInput.on("typeahead:select", function(event, data){
@@ -34,7 +38,10 @@ function importLayerPageInit (ctx) {
   // disable the "Add layer" button when the layer input typeahead is empty
   // or not in the typeahead choices
   layerDepInput.on("input change", function(){
-    layerDepBtn.attr("disabled","disabled");
+    if (0 == typeAheadStarted) {
+      layerDepBtn.attr("disabled","disabled");
+    }
+    typeAheadStarted = 0;
   });
 
   /* We automatically add "openembedded-core" layer for convenience as a
@@ -50,6 +57,7 @@ function importLayerPageInit (ctx) {
   });
 
   layerDepBtn.click(function(){
+    typeAheadStarted = 0;
     if (currentLayerDepSelection == undefined)
       return;
 
@@ -77,7 +85,7 @@ function importLayerPageInit (ctx) {
 
     $("#layer-deps-list").append(newLayerDep);
 
-    libtoaster.getLayerDepsForProject(currentLayerDepSelection.layerdetailurl,
+    libtoaster.getLayerDepsForProject(currentLayerDepSelection.xhrLayerUrl,
                                       function (data){
         /* These are the dependencies of the layer added as a dependency */
         if (data.list.length > 0) {
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] toaster: improve warnings when adding dependency to packages
  2019-10-01 23:17 [PATCH 0/2] toaster: cummulative 100119 patch David Reyna
  2019-10-01 23:17 ` [PATCH 1/2] toaster: issues in import layer when clicking 'add layer' David Reyna
@ 2019-10-01 23:17 ` David Reyna
  2019-10-15 15:09   ` Reyna, David
  1 sibling, 1 reply; 4+ messages in thread
From: David Reyna @ 2019-10-01 23:17 UTC (permalink / raw)
  To: bitbake-devel

From: David Reyna <David.Reyna@windriver.com>

Some of the objects that bitbake reports to Toaster as dependencies to packages
are known objects that are not packages, for example library files and kernel
modules. In the Toaster logs, mark these as "Info" instead of "Warning".

[YOCTO #13386]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 lib/bb/ui/buildinfohelper.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index f2151c2..5cbca97 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -646,6 +646,9 @@ class ORMWrapper(object):
                 Target_Installed_Package.objects.create(target = target_obj, package = packagedict[p]['object'])
 
         packagedeps_objs = []
+        pattern_so = re.compile(r'.*\.so(\.\d*)?$')
+        pattern_lib = re.compile(r'.*\-suffix(\d*)?$')
+        pattern_ko = re.compile(r'^kernel-module-.*')
         for p in packagedict:
             for (px,deptype) in packagedict[p]['depends']:
                 if deptype == 'depends':
@@ -654,6 +657,13 @@ class ORMWrapper(object):
                     tdeptype = Package_Dependency.TYPE_TRECOMMENDS
 
                 try:
+                    # Skip known non-package objects like libraries and kernel modules
+                    if pattern_so.match(px) or pattern_lib.match(px):
+                        logger.info("Toaster does not add library file dependencies to packages (%s,%s)", p, px)
+                        continue
+                    if pattern_ko.match(px):
+                        logger.info("Toaster does not add kernel module dependencies to packages (%s,%s)", p, px)
+                        continue
                     packagedeps_objs.append(Package_Dependency(
                         package = packagedict[p]['object'],
                         depends_on = packagedict[px]['object'],
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] toaster: improve warnings when adding dependency to packages
  2019-10-01 23:17 ` [PATCH 2/2] toaster: improve warnings when adding dependency to packages David Reyna
@ 2019-10-15 15:09   ` Reyna, David
  0 siblings, 0 replies; 4+ messages in thread
From: Reyna, David @ 2019-10-15 15:09 UTC (permalink / raw)
  To: bitbake-devel@lists.openembedded.org,
	richard.purdie@linuxfoundation.org

Hi Richard,

This is the second of two patches that I sent. The first one got merged but this one did not.

- David

-----Original Message-----
From: bitbake-devel-bounces@lists.openembedded.org [mailto:bitbake-devel-bounces@lists.openembedded.org] On Behalf Of David Reyna
Sent: Tuesday, October 01, 2019 4:18 PM
To: bitbake-devel@lists.openembedded.org
Subject: [bitbake-devel] [PATCH 2/2] toaster: improve warnings when adding dependency to packages

From: David Reyna <David.Reyna@windriver.com>

Some of the objects that bitbake reports to Toaster as dependencies to packages
are known objects that are not packages, for example library files and kernel
modules. In the Toaster logs, mark these as "Info" instead of "Warning".

[YOCTO #13386]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 lib/bb/ui/buildinfohelper.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index f2151c2..5cbca97 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -646,6 +646,9 @@ class ORMWrapper(object):
                 Target_Installed_Package.objects.create(target = target_obj, package = packagedict[p]['object'])
 
         packagedeps_objs = []
+        pattern_so = re.compile(r'.*\.so(\.\d*)?$')
+        pattern_lib = re.compile(r'.*\-suffix(\d*)?$')
+        pattern_ko = re.compile(r'^kernel-module-.*')
         for p in packagedict:
             for (px,deptype) in packagedict[p]['depends']:
                 if deptype == 'depends':
@@ -654,6 +657,13 @@ class ORMWrapper(object):
                     tdeptype = Package_Dependency.TYPE_TRECOMMENDS
 
                 try:
+                    # Skip known non-package objects like libraries and kernel modules
+                    if pattern_so.match(px) or pattern_lib.match(px):
+                        logger.info("Toaster does not add library file dependencies to packages (%s,%s)", p, px)
+                        continue
+                    if pattern_ko.match(px):
+                        logger.info("Toaster does not add kernel module dependencies to packages (%s,%s)", p, px)
+                        continue
                     packagedeps_objs.append(Package_Dependency(
                         package = packagedict[p]['object'],
                         depends_on = packagedict[px]['object'],
-- 
1.9.1

-- 
_______________________________________________
bitbake-devel mailing list
bitbake-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/bitbake-devel


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-15 15:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-01 23:17 [PATCH 0/2] toaster: cummulative 100119 patch David Reyna
2019-10-01 23:17 ` [PATCH 1/2] toaster: issues in import layer when clicking 'add layer' David Reyna
2019-10-01 23:17 ` [PATCH 2/2] toaster: improve warnings when adding dependency to packages David Reyna
2019-10-15 15:09   ` Reyna, David

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.