All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support
@ 2017-04-05 13:36 Patrick Ohly
  2017-04-05 13:36 ` [PATCH 1/3] yocto-compat-layer: fix also other command invocations Patrick Ohly
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Patrick Ohly @ 2017-04-05 13:36 UTC (permalink / raw)
  To: openembedded-core; +Cc: paul.eggleton

I started applying yocto-compat-layer to some real BSP layers and ran
into some usability issues with the tool.

I also didn't want to do the root cause analysis manually, so I
automated the dependency analysis and the running of
bitbake-diffsigs.

This patch series is based on Mark's "yocto-compat-layer.py updates"
series. The last commit depends on Paul's "bitbake-diffsigs: add an
option to find and compare specific signatures" patch from
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=paule/sigstuff&id=5bb69edfb4bbaa7373061daeb4f233a7e2f43a43

Regarding the BSP example that I ended up using: it actually was one
of the better BSP layers and only had one problem in a "bitbake world"
build instead of several as in other BSP layers. Nevertheless I
obscured the name to protect the (not so) guilty in the commit
messages ;-}

The two changes that show up in test_signatures look harmless at first
glance, but probably would need to be done differently to avoid a
false positive when doing the signature check.

Patrick Ohly (3):
  yocto-compat-layer: fix also other command invocations
  yocto-compat-layer: limit report of signature changes
  yocto-compat-layer: include bitbake-diffsigs output

 scripts/lib/compatlayer/__init__.py     | 55 +++++++++++++---
 scripts/lib/compatlayer/cases/common.py | 87 ++++++++++++++++----------
 2 files changed, 103 insertions(+), 39 deletions(-)

base-commit: f6b68a87a11a84c7baf7784fc71e07c6595d598b
-- 
git-series 0.9.1


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

* [PATCH 1/3] yocto-compat-layer: fix also other command invocations
  2017-04-05 13:36 [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support Patrick Ohly
@ 2017-04-05 13:36 ` Patrick Ohly
  2017-04-05 13:36 ` [PATCH 2/3] yocto-compat-layer: limit report of signature changes Patrick Ohly
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Patrick Ohly @ 2017-04-05 13:36 UTC (permalink / raw)
  To: openembedded-core; +Cc: paul.eggleton

In commit 5b9ac62ab535d, one place was fixed where a command was
invoked such that failures caused double stack traces and stderr was
lost. The same problem also occurs elsewhere, triggered for example by
a layer with parsing problems.

Now a new utility method is used instead of repeating the code.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/lib/compatlayer/__init__.py     | 23 ++++++++++++++++-------
 scripts/lib/compatlayer/cases/common.py | 25 +++++--------------------
 2 files changed, 21 insertions(+), 27 deletions(-)

diff --git a/scripts/lib/compatlayer/__init__.py b/scripts/lib/compatlayer/__init__.py
index 86f86eb..9eb862d 100644
--- a/scripts/lib/compatlayer/__init__.py
+++ b/scripts/lib/compatlayer/__init__.py
@@ -4,6 +4,7 @@
 # Released under the MIT license (see COPYING.MIT)
 
 import os
+import subprocess
 from enum import Enum
 
 class LayerType(Enum):
@@ -199,8 +200,20 @@ def add_layer(bblayersconf, layer, layers, logger):
 
     return True
 
+def check_command(error_msg, cmd):
+    '''
+    Run a command under a shell, capture stdout and stderr in a single stream,
+    throw an error when command returns non-zero exit code. Returns the output.
+    '''
+
+    p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+    output, _ = p.communicate()
+    if p.returncode:
+        msg = "%s\nCommand: %s\nOutput:\n%s" % (error_msg, cmd, output.decode('utf-8'))
+        raise RuntimeError(msg)
+    return output
+
 def get_signatures(builddir, failsafe=False):
-    import subprocess
     import re
 
     # some recipes needs to be excluded like meta-world-pkgdata
@@ -214,12 +227,8 @@ def get_signatures(builddir, failsafe=False):
     if failsafe:
         cmd += '-k '
     cmd += '-S none world'
-    p = subprocess.Popen(cmd, shell=True,
-                         stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-    output, _ = p.communicate()
-    if p.returncode:
-        msg = "Generating signatures failed. This might be due to some parse error and/or general layer incompatibilities.\nCommand: %s\nOutput:\n%s" % (cmd, output.decode('utf-8'))
-        raise RuntimeError(msg)
+    check_command('Generating signatures failed. This might be due to some parse error and/or general layer incompatibilities.',
+                  cmd)
     sigs_file = os.path.join(builddir, 'locked-sigs.inc')
 
     sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$")
diff --git a/scripts/lib/compatlayer/cases/common.py b/scripts/lib/compatlayer/cases/common.py
index 4d328ec..9cc682e 100644
--- a/scripts/lib/compatlayer/cases/common.py
+++ b/scripts/lib/compatlayer/cases/common.py
@@ -2,9 +2,8 @@
 # Released under the MIT license (see COPYING.MIT)
 
 import os
-import subprocess
 import unittest
-from compatlayer import get_signatures, LayerType
+from compatlayer import get_signatures, LayerType, check_command
 from compatlayer.case import OECompatLayerTestCase
 
 class CommonCompatLayer(OECompatLayerTestCase):
@@ -20,26 +19,12 @@ class CommonCompatLayer(OECompatLayerTestCase):
                 msg="Layer contains README file but is empty.")
 
     def test_parse(self):
-        try:
-            output = subprocess.check_output('bitbake -p', shell=True,
-                    stderr=subprocess.PIPE)
-        except subprocess.CalledProcessError as e:
-            import traceback
-            exc = traceback.format_exc()
-            msg = 'Layer %s failed to parse.\n%s\n%s\n' % (self.tc.layer['name'],
-                    exc, e.output.decode('utf-8'))
-            raise RuntimeError(msg)
+        check_command('Layer %s failed to parse.' % self.tc.layer['name'],
+                      'bitbake -p')
 
     def test_show_environment(self):
-        try:
-            output = subprocess.check_output('bitbake -e', shell=True,
-                    stderr=subprocess.PIPE)
-        except subprocess.CalledProcessError as e:
-            import traceback
-            exc = traceback.format_exc()
-            msg = 'Layer %s failed to show environment.\n%s\n%s\n' % \
-                    (self.tc.layer['name'], exc, e.output.decode('utf-8'))
-            raise RuntimeError(msg)
+        check_command('Layer %s failed to show environment.' % self.tc.layer['name'],
+                      'bitbake -e')
 
     def test_signatures(self):
         if self.tc.layer['type'] == LayerType.SOFTWARE:
-- 
git-series 0.9.1


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

* [PATCH 2/3] yocto-compat-layer: limit report of signature changes
  2017-04-05 13:36 [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support Patrick Ohly
  2017-04-05 13:36 ` [PATCH 1/3] yocto-compat-layer: fix also other command invocations Patrick Ohly
@ 2017-04-05 13:36 ` Patrick Ohly
  2017-04-06 20:38   ` Paul Eggleton
  2017-04-05 13:36 ` [PATCH 3/3] yocto-compat-layer: include bitbake-diffsigs output Patrick Ohly
  2017-04-06 16:25 ` [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support Aníbal Limón
  3 siblings, 1 reply; 9+ messages in thread
From: Patrick Ohly @ 2017-04-05 13:36 UTC (permalink / raw)
  To: openembedded-core; +Cc: paul.eggleton

Typically a single change cascades through the entire task dependency
chain. Developers had to figure that out themselves, based on hard to
read and interpret output (not sorted, no indention, no explanations):

   $ yocto-compat-layer.py -n meta-xxxx
   ...
   AssertionError: True is not false : Layer meta-xxxx changed signatures.
   webkitgtk:do_install changed fe2edc9082bc0da98f9cb1391c52f565 -> b3a44684c5cd9aacd3f7c6ed88eefab5
   gstreamer1.0-plugins-good:do_configure changed 3b2f8211be3fe08422bf6087f3af16d1 -> 7d80e42fa1f4f01ff4dfe2ea4477d382
   pulseaudio:do_package_qa changed 5d0a58ada66ff17f5576555302ac319a -> 0e13bcb96143d1ae54c451bc3de0aa30
   epiphany:do_prepare_recipe_sysroot changed 29e1b277dbcb005bd54950594c50d91b -> d3c45527b37677a0668ce483c6db3052
   ...
   gst-player:do_packagedata changed 9ce6efdd357dd74919bc4957458b1e95 -> d0c083ce629f37adfc9c4ba9eff81f83
   gstreamer1.0-plugins-base:do_install changed 1161cd867d15bea63e5dd5d9abf0519c -> 5bf2b652a2d77fee3eedb35af2f201a0
   gstreamer1.0-rtsp-server:do_packagedata changed 6781dc3070f80b843ed1970d74dd323e -> 454620c2e3b9fea87e525d14b6ed0344
   alsa-plugins:do_packagedata changed 1808c3f737cb805b169d004e948ea19c -> 480124b7fa5eab1f73bf96440d725231

Now the tool automates the problem analysis: it retrieves the depgraph
using the tinfoil API and only reports those tasks with modified
signatures whose dependencies have not changed, i.e. those tasks which
definitely introduce a change.

From the previous example, that just leaves two tasks that need to be
checked:

   AssertionError: False is not true : Layer meta-xxxx changed 120 signatures, initial differences (first hash without, second with layer):
      gstreamer1.0-plugins-base:do_fetch: 76973f19f2e30d282152bdd7e4efe5bb -> e6e7c6fa9f2bd59d7d8d107f7c6ca1ac
      pulseaudio:do_install: 668eb1e30af129df9806b0aa0d7c10cd -> 1196bdb88eef56eeee4613bb06b9387e

This pruning might be a bit too aggressive in the sense that tasks
which inherit a change and then add more changes themselves won't be
reported initially. They will be found when fixing the reported tasks
and re-running the check.

For a developer it seems better to have something listed which
definitely is a problem and needs fixing instead of everything,
including the tasks which don't need fixes.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/lib/compatlayer/__init__.py     | 32 +++++++++++++++-
 scripts/lib/compatlayer/cases/common.py | 54 +++++++++++++++++++-------
 2 files changed, 73 insertions(+), 13 deletions(-)

diff --git a/scripts/lib/compatlayer/__init__.py b/scripts/lib/compatlayer/__init__.py
index 9eb862d..b46527a 100644
--- a/scripts/lib/compatlayer/__init__.py
+++ b/scripts/lib/compatlayer/__init__.py
@@ -7,6 +7,8 @@ import os
 import subprocess
 from enum import Enum
 
+import bb.tinfoil
+
 class LayerType(Enum):
     BSP = 0
     DISTRO = 1
@@ -252,3 +254,33 @@ def get_signatures(builddir, failsafe=False):
         raise RuntimeError('Can\'t load signatures from %s' % sigs_file)
 
     return sigs
+
+def get_depgraph(targets=['world']):
+    '''
+    Returns the dependency graph for the given target(s).
+    The dependency graph is taken directly from DepTreeEvent.
+    '''
+    depgraph = None
+    with bb.tinfoil.Tinfoil() as tinfoil:
+        tinfoil.prepare(config_only=False)
+        tinfoil.set_event_mask(['bb.event.NoProvider', 'bb.event.DepTreeGenerated', 'bb.command.CommandCompleted'])
+        if not tinfoil.run_command('generateDepTreeEvent', targets, 'do_build'):
+            raise RuntimeError('starting generateDepTreeEvent failed')
+        while True:
+            event = tinfoil.wait_event(timeout=1000)
+            if event:
+                if isinstance(event, bb.command.CommandFailed):
+                    raise RuntimeError('Generating dependency information failed: %s' % event.error)
+                elif isinstance(event, bb.command.CommandCompleted):
+                    break
+                elif isinstance(event, bb.event.NoProvider):
+                    if event._reasons:
+                        raise RuntimeError('Nothing provides %s: %s' % (event._item, event._reasons))
+                    else:
+                        raise RuntimeError('Nothing provides %s.' % (event._item))
+                elif isinstance(event, bb.event.DepTreeGenerated):
+                    depgraph = event._depgraph
+
+    if depgraph is None:
+        raise RuntimeError('Could not retrieve the depgraph.')
+    return depgraph
diff --git a/scripts/lib/compatlayer/cases/common.py b/scripts/lib/compatlayer/cases/common.py
index 9cc682e..b91da9b 100644
--- a/scripts/lib/compatlayer/cases/common.py
+++ b/scripts/lib/compatlayer/cases/common.py
@@ -3,7 +3,7 @@
 
 import os
 import unittest
-from compatlayer import get_signatures, LayerType, check_command
+from compatlayer import get_signatures, LayerType, check_command, get_depgraph
 from compatlayer.case import OECompatLayerTestCase
 
 class CommonCompatLayer(OECompatLayerTestCase):
@@ -31,21 +31,49 @@ class CommonCompatLayer(OECompatLayerTestCase):
             raise unittest.SkipTest("Layer %s isn't BSP or DISTRO one." \
                      % self.tc.layer['name'])
 
+        # task -> (old signature, new signature)
         sig_diff = {}
-
         curr_sigs = get_signatures(self.td['builddir'], failsafe=True)
         for task in self.td['sigs']:
-            if task not in curr_sigs:
-                continue
-
-            if self.td['sigs'][task] != curr_sigs[task]:
-                sig_diff[task] = '%s -> %s' % \
-                        (self.td['sigs'][task], curr_sigs[task])
+            if task in curr_sigs and \
+               self.td['sigs'][task] != curr_sigs[task]:
+                sig_diff[task] = (self.td['sigs'][task], curr_sigs[task])
 
-        detail = ''
         if sig_diff:
-            for task in sig_diff:
-                detail += "%s changed %s\n" % (task, sig_diff[task])
-        self.assertFalse(bool(sig_diff), "Layer %s changed signatures.\n%s" % \
-                (self.tc.layer['name'], detail))
+            # Beware, depgraph uses task=<pn>.<taskname> whereas get_signatures()
+            # uses <pn>:<taskname>. Need to convert sometimes. The output follows
+            # the convention from get_signatures() because that seems closer to
+            # normal bitbake output.
+            def sig2graph(task):
+                pn, taskname = task.rsplit(':', 1)
+                return pn + '.' + taskname
+            def graph2sig(task):
+                pn, taskname = task.rsplit('.', 1)
+                return pn + ':' + taskname
+            depgraph = get_depgraph()
+            depends = depgraph['tdepends']
+
+            # If a task A has a changed signature, but none of its
+            # dependencies, then we need to report it because it is
+            # the one which introduces a change. Any task depending on
+            # A (directly or indirectly) will also have a changed
+            # signature, but we don't need to report it. It might have
+            # its own changes, which will become apparent once the
+            # issues that we do report are fixed and the test gets run
+            # again.
+            sig_diff_filtered = []
+            for task, (old_sig, new_sig) in sig_diff.items():
+                deps_tainted = False
+                for dep in depends.get(sig2graph(task), ()):
+                    if graph2sig(dep) in sig_diff:
+                        deps_tainted = True
+                        break
+                if not deps_tainted:
+                    sig_diff_filtered.append((task, old_sig, new_sig))
 
+            msg = []
+            msg.append('Layer %s changed %d signatures, initial differences (first hash without, second with layer):' %
+                       (self.tc.layer['name'], len(sig_diff)))
+            for diff in sorted(sig_diff_filtered):
+                msg.append('   %s: %s -> %s' % diff)
+            self.assertTrue(False, '\n'.join(msg))
-- 
git-series 0.9.1


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

* [PATCH 3/3] yocto-compat-layer: include bitbake-diffsigs output
  2017-04-05 13:36 [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support Patrick Ohly
  2017-04-05 13:36 ` [PATCH 1/3] yocto-compat-layer: fix also other command invocations Patrick Ohly
  2017-04-05 13:36 ` [PATCH 2/3] yocto-compat-layer: limit report of signature changes Patrick Ohly
@ 2017-04-05 13:36 ` Patrick Ohly
  2017-04-05 15:26   ` Leonardo Sandoval
  2017-04-06 16:25 ` [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support Aníbal Limón
  3 siblings, 1 reply; 9+ messages in thread
From: Patrick Ohly @ 2017-04-05 13:36 UTC (permalink / raw)
  To: openembedded-core; +Cc: paul.eggleton

After filtering out potential false positives, it becomes feasible to
include the output of bitbake-diffsigs for those tasks which
definitely have a change.

Depends on bitbake-diffsigs with the "--signature" parameter.

Enhanced output now is:

   AssertionError: False is not true : Layer meta-xxxx changed 120 signatures, initial differences (first hash without, second with layer):
      gstreamer1.0-plugins-base:do_fetch: 76973f19f2e30d282152bdd7e4efe5bb -> e6e7c6fa9f2bd59d7d8d107f7c6ca1ac
         Task dependencies changed from:
         ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
         to:
         ['GST_IMX_PATCHES_TO_APPEND', 'PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
         basehash changed from d679d30bd1ea41c56e57419b57587f3c to 090a79b45f5fa26d10f9d34e2ed7a1e6
            List of dependencies for variable SRC_URI changed from '{'PV', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]'}' to '{'GST_IMX_PATCHES_TO_APPEND', 'PV', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]'}'
         changed items: {'GST_IMX_PATCHES_TO_APPEND'}
         Dependency on variable GST_IMX_PATCHES_TO_APPEND was added
         Variable SRC_URI value changed:
         "     http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz     file://get-caps-from-src-pad-when-query-caps.patch     file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch     file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch     file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch     file://make-gio_unix_2_0-dependency-configurable.patch     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch     file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch     file://0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch     file://0003-riff-add-missing-include-directories-when-calling-in.patch     file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch [--] {+${GST_IMX_PATCHES_TO_APPEND}+}"

      pulseaudio:do_install: 6bb6fe23e11a6d5fef9c3a25e73e4f9c -> 3f54ea75673a792e307197cfa6ef2694
         basehash changed from ac4efcfa783bd04a5a98a2c38719aedd to 37679d99623a37c8df955da3a01415a5
         Variable do_install value changed:
         @@ -1,3 +1,7 @@
              autotools_do_install
           	install -d ${D}${sysconfdir}/default/volatiles
          	install -m 0644 ${WORKDIR}/volatiles.04_pulse  ${D}${sysconfdir}/default/volatiles/volatiles.04_pulse
         +    if [ -e "${WORKDIR}/daemon.conf" ] && [ -e "${WORKDIR}/default.pa" ]; then
         +        install -m 0644 ${WORKDIR}/daemon.conf ${D}${sysconfdir}/pulse/daemon.conf
         +        install -m 0644 ${WORKDIR}/default.pa ${D}${sysconfdir}/pulse/default.pa
         +    fi

[YOCTO #11161]

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/lib/compatlayer/cases/common.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/lib/compatlayer/cases/common.py b/scripts/lib/compatlayer/cases/common.py
index b91da9b..d909d5b 100644
--- a/scripts/lib/compatlayer/cases/common.py
+++ b/scripts/lib/compatlayer/cases/common.py
@@ -76,4 +76,14 @@ class CommonCompatLayer(OECompatLayerTestCase):
                        (self.tc.layer['name'], len(sig_diff)))
             for diff in sorted(sig_diff_filtered):
                 msg.append('   %s: %s -> %s' % diff)
+                try:
+                    recipe, taskname = diff[0].rsplit(':', 1)
+                    output = check_command('Determining signature difference failed.',
+                                           'bitbake-diffsigs --task %s %s --signature %s %s' %
+                                           (recipe, taskname, diff[1], diff[2])).decode('utf-8')
+                except RuntimeError as error:
+                    output = str(error)
+                if output:
+                    msg.extend(['      ' + line for line in output.splitlines()])
+                    msg.append('')
             self.assertTrue(False, '\n'.join(msg))
-- 
git-series 0.9.1


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

* Re: [PATCH 3/3] yocto-compat-layer: include bitbake-diffsigs output
  2017-04-05 13:36 ` [PATCH 3/3] yocto-compat-layer: include bitbake-diffsigs output Patrick Ohly
@ 2017-04-05 15:26   ` Leonardo Sandoval
  2017-04-05 18:10     ` Patrick Ohly
  0 siblings, 1 reply; 9+ messages in thread
From: Leonardo Sandoval @ 2017-04-05 15:26 UTC (permalink / raw)
  To: Patrick Ohly; +Cc: paul.eggleton, openembedded-core

On Wed, 2017-04-05 at 15:36 +0200, Patrick Ohly wrote:
> After filtering out potential false positives, it becomes feasible to
> include the output of bitbake-diffsigs for those tasks which
> definitely have a change.
> 
> Depends on bitbake-diffsigs with the "--signature" parameter.
> 
> Enhanced output now is:
> 
>    AssertionError: False is not true : Layer meta-xxxx changed 120 signatures, initial differences (first hash without, second with layer):
>       gstreamer1.0-plugins-base:do_fetch: 76973f19f2e30d282152bdd7e4efe5bb -> e6e7c6fa9f2bd59d7d8d107f7c6ca1ac
>          Task dependencies changed from:
>          ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
>          to:
>          ['GST_IMX_PATCHES_TO_APPEND', 'PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
>          basehash changed from d679d30bd1ea41c56e57419b57587f3c to 090a79b45f5fa26d10f9d34e2ed7a1e6
>             List of dependencies for variable SRC_URI changed from '{'PV', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]'}' to '{'GST_IMX_PATCHES_TO_APPEND', 'PV', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]'}'
>          changed items: {'GST_IMX_PATCHES_TO_APPEND'}
>          Dependency on variable GST_IMX_PATCHES_TO_APPEND was added
>          Variable SRC_URI value changed:
>          "     http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz     file://get-caps-from-src-pad-when-query-caps.patch     file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch     file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch     file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch     file://make-gio_unix_2_0-dependency-configurable.patch     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch     file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch     file://0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch     file://0003-riff-add-missing-include-directories-when-calling-in.patch     file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch [--] {+${GST_IMX_PATCHES_TO_APPEND}+}"
> 
>       pulseaudio:do_install: 6bb6fe23e11a6d5fef9c3a25e73e4f9c -> 3f54ea75673a792e307197cfa6ef2694
>          basehash changed from ac4efcfa783bd04a5a98a2c38719aedd to 37679d99623a37c8df955da3a01415a5
>          Variable do_install value changed:
>          @@ -1,3 +1,7 @@
>               autotools_do_install
>            	install -d ${D}${sysconfdir}/default/volatiles
>           	install -m 0644 ${WORKDIR}/volatiles.04_pulse  ${D}${sysconfdir}/default/volatiles/volatiles.04_pulse
>          +    if [ -e "${WORKDIR}/daemon.conf" ] && [ -e "${WORKDIR}/default.pa" ]; then
>          +        install -m 0644 ${WORKDIR}/daemon.conf ${D}${sysconfdir}/pulse/daemon.conf
>          +        install -m 0644 ${WORKDIR}/default.pa ${D}${sysconfdir}/pulse/default.pa
>          +    fi
> 
> [YOCTO #11161]
> 
> Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
> ---
>  scripts/lib/compatlayer/cases/common.py | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/scripts/lib/compatlayer/cases/common.py b/scripts/lib/compatlayer/cases/common.py
> index b91da9b..d909d5b 100644
> --- a/scripts/lib/compatlayer/cases/common.py
> +++ b/scripts/lib/compatlayer/cases/common.py
> @@ -76,4 +76,14 @@ class CommonCompatLayer(OECompatLayerTestCase):
>                         (self.tc.layer['name'], len(sig_diff)))
>              for diff in sorted(sig_diff_filtered):
>                  msg.append('   %s: %s -> %s' % diff)
> +                try:
> +                    recipe, taskname = diff[0].rsplit(':', 1)
> +                    output = check_command('Determining signature difference failed.',
> +                                           'bitbake-diffsigs --task %s %s --signature %s %s' %
> +                                           (recipe, taskname, diff[1], diff[2])).decode('utf-8')
> +                except RuntimeError as error:
> +                    output = str(error)

Patrick, just a minor comment:  there is no need for the 'if' check,
because the try and the except bodies set the output variable. 

Leo

> +                if output:
> +                    msg.extend(['      ' + line for line in output.splitlines()])
> +                    msg.append('')
>              self.assertTrue(False, '\n'.join(msg))
> -- 
> git-series 0.9.1




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

* Re: [PATCH 3/3] yocto-compat-layer: include bitbake-diffsigs output
  2017-04-05 15:26   ` Leonardo Sandoval
@ 2017-04-05 18:10     ` Patrick Ohly
  0 siblings, 0 replies; 9+ messages in thread
From: Patrick Ohly @ 2017-04-05 18:10 UTC (permalink / raw)
  To: Leonardo Sandoval; +Cc: paul.eggleton, openembedded-core

On Wed, 2017-04-05 at 10:26 -0500, Leonardo Sandoval wrote:
> > diff --git a/scripts/lib/compatlayer/cases/common.py b/scripts/lib/compatlayer/cases/common.py
> > index b91da9b..d909d5b 100644
> > --- a/scripts/lib/compatlayer/cases/common.py
> > +++ b/scripts/lib/compatlayer/cases/common.py
> > @@ -76,4 +76,14 @@ class CommonCompatLayer(OECompatLayerTestCase):
> >                         (self.tc.layer['name'], len(sig_diff)))
> >              for diff in sorted(sig_diff_filtered):
> >                  msg.append('   %s: %s -> %s' % diff)
> > +                try:
> > +                    recipe, taskname = diff[0].rsplit(':', 1)
> > +                    output = check_command('Determining signature difference failed.',
> > +                                           'bitbake-diffsigs --task %s %s --signature %s %s' %
> > +                                           (recipe, taskname, diff[1], diff[2])).decode('utf-8')
> > +                except RuntimeError as error:
> > +                    output = str(error)
> 
> Patrick, just a minor comment:  there is no need for the 'if' check,
> because the try and the except bodies set the output variable.

I added that for the case that the command prints nothing (output ==
''). It's unlikely, but I prefer explicit, easy checking over making
assumptions.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





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

* Re: [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support
  2017-04-05 13:36 [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support Patrick Ohly
                   ` (2 preceding siblings ...)
  2017-04-05 13:36 ` [PATCH 3/3] yocto-compat-layer: include bitbake-diffsigs output Patrick Ohly
@ 2017-04-06 16:25 ` Aníbal Limón
  3 siblings, 0 replies; 9+ messages in thread
From: Aníbal Limón @ 2017-04-06 16:25 UTC (permalink / raw)
  To: Patrick Ohly, openembedded-core; +Cc: paul.eggleton

[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]

Acked-by: Aníbal Limón <anibal.limon@linux.intel.com>

On 04/05/2017 08:36 AM, Patrick Ohly wrote:
> I started applying yocto-compat-layer to some real BSP layers and ran
> into some usability issues with the tool.
> 
> I also didn't want to do the root cause analysis manually, so I
> automated the dependency analysis and the running of
> bitbake-diffsigs.
> 
> This patch series is based on Mark's "yocto-compat-layer.py updates"
> series. The last commit depends on Paul's "bitbake-diffsigs: add an
> option to find and compare specific signatures" patch from
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=paule/sigstuff&id=5bb69edfb4bbaa7373061daeb4f233a7e2f43a43
> 
> Regarding the BSP example that I ended up using: it actually was one
> of the better BSP layers and only had one problem in a "bitbake world"
> build instead of several as in other BSP layers. Nevertheless I
> obscured the name to protect the (not so) guilty in the commit
> messages ;-}
> 
> The two changes that show up in test_signatures look harmless at first
> glance, but probably would need to be done differently to avoid a
> false positive when doing the signature check.
> 
> Patrick Ohly (3):
>   yocto-compat-layer: fix also other command invocations
>   yocto-compat-layer: limit report of signature changes
>   yocto-compat-layer: include bitbake-diffsigs output
> 
>  scripts/lib/compatlayer/__init__.py     | 55 +++++++++++++---
>  scripts/lib/compatlayer/cases/common.py | 87 ++++++++++++++++----------
>  2 files changed, 103 insertions(+), 39 deletions(-)
> 
> base-commit: f6b68a87a11a84c7baf7784fc71e07c6595d598b
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 2/3] yocto-compat-layer: limit report of signature changes
  2017-04-05 13:36 ` [PATCH 2/3] yocto-compat-layer: limit report of signature changes Patrick Ohly
@ 2017-04-06 20:38   ` Paul Eggleton
  2017-04-07  6:41     ` Patrick Ohly
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggleton @ 2017-04-06 20:38 UTC (permalink / raw)
  To: Patrick Ohly, anibal.limon; +Cc: openembedded-core

On Thursday, 6 April 2017 1:36:05 AM NZST you wrote:
>    AssertionError: False is not true : Layer meta-xxxx changed 120
> signatures, initial differences (first hash without, second with layer):

BTW, rather than self.assertTrue(False, ... ) you can just use self.fail(...) 
and then you avoid this ugly "False is not True" bit.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [PATCH 2/3] yocto-compat-layer: limit report of signature changes
  2017-04-06 20:38   ` Paul Eggleton
@ 2017-04-07  6:41     ` Patrick Ohly
  0 siblings, 0 replies; 9+ messages in thread
From: Patrick Ohly @ 2017-04-07  6:41 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On Fri, 2017-04-07 at 08:38 +1200, Paul Eggleton wrote:
> On Thursday, 6 April 2017 1:36:05 AM NZST you wrote:
> >    AssertionError: False is not true : Layer meta-xxxx changed 120
> > signatures, initial differences (first hash without, second with layer):
> 
> BTW, rather than self.assertTrue(False, ... ) you can just use self.fail(...) 
> and then you avoid this ugly "False is not True" bit.

I suspected that there must be something like that when changing the
message, but then was too lazy to look it up - thanks for pointing it
out ;-}

I'll change that in a V2.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





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

end of thread, other threads:[~2017-04-07  6:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-05 13:36 [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support Patrick Ohly
2017-04-05 13:36 ` [PATCH 1/3] yocto-compat-layer: fix also other command invocations Patrick Ohly
2017-04-05 13:36 ` [PATCH 2/3] yocto-compat-layer: limit report of signature changes Patrick Ohly
2017-04-06 20:38   ` Paul Eggleton
2017-04-07  6:41     ` Patrick Ohly
2017-04-05 13:36 ` [PATCH 3/3] yocto-compat-layer: include bitbake-diffsigs output Patrick Ohly
2017-04-05 15:26   ` Leonardo Sandoval
2017-04-05 18:10     ` Patrick Ohly
2017-04-06 16:25 ` [PATCH 0/3] yocto-compat-layer: various enhancements + bitbake-diffsigs support Aníbal Limón

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.