summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAmanda Brindle <amanda.r.brindle@intel.com>2018-03-15 14:06:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-03 23:53:19 +0100
commit4cbd560eca64325fe2b61642b5868ca2d0fa7dd4 (patch)
tree382be743b8b907362edb496443b47080cf0c2e7f /meta
parent5b68f72e590546958a742f64f3501f1abaa22267 (diff)
downloadpoky-4cbd560eca64325fe2b61642b5868ca2d0fa7dd4.tar.gz
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] (From OE-Core rev: 77d701c5fb5961bd818810a4d4cb3a9bd2432fae) Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/buildhistory_analysis.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index bf2a9d30e8..b0365abced 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -117,6 +117,7 @@ class ChangeRecord:
117 117
118 if self.fieldname in list_fields or self.fieldname in list_order_fields: 118 if self.fieldname in list_fields or self.fieldname in list_order_fields:
119 renamed_dirs = [] 119 renamed_dirs = []
120 changed_order = False
120 if self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']: 121 if self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
121 (depvera, depverb) = compare_pkg_lists(self.oldvalue, self.newvalue) 122 (depvera, depverb) = compare_pkg_lists(self.oldvalue, self.newvalue)
122 aitems = pkglist_combine(depvera) 123 aitems = pkglist_combine(depvera)
@@ -130,6 +131,14 @@ class ChangeRecord:
130 removed = list(set(aitems) - set(bitems)) 131 removed = list(set(aitems) - set(bitems))
131 added = list(set(bitems) - set(aitems)) 132 added = list(set(bitems) - set(aitems))
132 133
134 if not removed and not added:
135 depvera = bb.utils.explode_dep_versions2(self.oldvalue, sort=False)
136 depverb = bb.utils.explode_dep_versions2(self.newvalue, sort=False)
137 for i, j in zip(depvera.items(), depverb.items()):
138 if i[0] != j[0]:
139 changed_order = True
140 break
141
133 lines = [] 142 lines = []
134 if renamed_dirs: 143 if renamed_dirs:
135 for dfrom, dto in renamed_dirs: 144 for dfrom, dto in renamed_dirs:
@@ -145,7 +154,10 @@ class ChangeRecord:
145 else: 154 else:
146 lines.append('changed order') 155 lines.append('changed order')
147 156
148 out = '%s: %s' % (self.fieldname, ', '.join(lines)) 157 if not (removed or added or changed_order):
158 out = ''
159 else:
160 out = '%s: %s' % (self.fieldname, ', '.join(lines))
149 161
150 elif self.fieldname in numeric_fields: 162 elif self.fieldname in numeric_fields:
151 aval = int(self.oldvalue or 0) 163 aval = int(self.oldvalue or 0)