Skip to contentSkip to conversation

buildhistory_analysis.py: Check if RPROVIDES changed order

PATCH In review Amanda Brindle 2 participants 3 messages Mar 15, 2018 – Apr 2, 2018

lore
Share & tools
lore
#0 lore raw

cover buildhistory_analysis.py: Check if RPROVIDES changed order

The following changes since commit 0fd6d0dd0041929d60111868ca3575d9d9bf9ac3:

linux-yocto/4.12: backport bugfixes for x86 (2018-03-15 06:27:20 -0700)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib abrindle/buildhistory-diff4
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=abrindle/buildhistory-diff4

Amanda Brindle (1):
buildhistory_analysis.py: Check if RPROVIDES changed order

 meta/lib/oe/buildhistory_analysis.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 buildhistory_analysis.py: Check if RPROVIDES changed order

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]

---
 meta/lib/oe/buildhistory_analysis.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
meta/lib/oe/buildhistory_analysis.py +13 -1
index bf2a9d3..b0365ab 100644
@@ -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)
Signature · 1 line
2.7.4
#2 lore raw
In reply to Amanda Brindle
Quoted 6 lines · Amanda Brindle

The following changes since commit 0fd6d0dd0041929d60111868ca3575d9d9bf9ac3:

linux-yocto/4.12: backport bugfixes for x86 (2018-03-15 06:27:20 -0700)

are available in the git repository at:

Quoted 9 lines

git://git.yoctoproject.org/poky-contrib abrindle/buildhistory-diff4
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=abrindle/buildhistory-diff4

Amanda Brindle (1):
buildhistory_analysis.py: Check if RPROVIDES changed order

 meta/lib/oe/buildhistory_analysis.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Ack'd.

Sorry I lost track of this. Any chance this can make M4?

--S