Instead of assuming order has changed if no package has been added or
removed, loop through packages to check if order has changed. This will
prevent the script from falsely reporting "changed order" if a version
has increased.

Fixes [YOCTO #12334]

Signed-off-by: Amanda Brindle <amanda.r.brin...@intel.com>
---
 meta/lib/oe/buildhistory_analysis.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/buildhistory_analysis.py 
b/meta/lib/oe/buildhistory_analysis.py
index bf2a9d3..b0365ab 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -117,6 +117,7 @@ class ChangeRecord:
 
         if self.fieldname in list_fields or self.fieldname in 
list_order_fields:
             renamed_dirs = []
+            changed_order = False
             if self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 
'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
                 (depvera, depverb) = compare_pkg_lists(self.oldvalue, 
self.newvalue)
                 aitems = pkglist_combine(depvera)
@@ -130,6 +131,14 @@ class ChangeRecord:
             removed = list(set(aitems) - set(bitems))
             added = list(set(bitems) - set(aitems))
 
+            if not removed and not added:
+                depvera = bb.utils.explode_dep_versions2(self.oldvalue, 
sort=False)
+                depverb = bb.utils.explode_dep_versions2(self.newvalue, 
sort=False)
+                for i, j in zip(depvera.items(), depverb.items()):
+                    if i[0] != j[0]:
+                        changed_order = True
+                        break
+
             lines = []
             if renamed_dirs:
                 for dfrom, dto in renamed_dirs:
@@ -145,7 +154,10 @@ class ChangeRecord:
             else:
                 lines.append('changed order')
 
-            out = '%s: %s' % (self.fieldname, ', '.join(lines))
+            if not (removed or added or changed_order):
+                out = ''
+            else:
+                out = '%s: %s' % (self.fieldname, ', '.join(lines))
 
         elif self.fieldname in numeric_fields:
             aval = int(self.oldvalue or 0)
-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to