summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-07-04 11:36:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-05 12:00:20 +0100
commit1b7876b0608bff9e8fcd2c334d1634db21ef7325 (patch)
treea1e8457ce2c254e95fd30701e5e0241301ec93af
parent4fd9ee4670293632cc0ca1e64b8833eb6014435d (diff)
downloadpoky-1b7876b0608bff9e8fcd2c334d1634db21ef7325.tar.gz
buildhistory_analysis: ignore ownership for sysroot diffs
The sysroot isn't populated under pseudo, so ownership differences should be ignored. (From OE-Core rev: 01b816be4adff8f3992c1369810bdcf11a26fd6c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/buildhistory_analysis.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 8af76c6b3a..708e1b388e 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -282,7 +282,7 @@ def file_list_to_dict(lines):
282 return adict 282 return adict
283 283
284 284
285def compare_file_lists(alines, blines): 285def compare_file_lists(alines, blines, compare_ownership=True):
286 adict = file_list_to_dict(alines) 286 adict = file_list_to_dict(alines)
287 bdict = file_list_to_dict(blines) 287 bdict = file_list_to_dict(blines)
288 filechanges = [] 288 filechanges = []
@@ -294,16 +294,20 @@ def compare_file_lists(alines, blines):
294 newvalue = newsplitv[0][0] 294 newvalue = newsplitv[0][0]
295 if oldvalue != newvalue: 295 if oldvalue != newvalue:
296 filechanges.append(FileChange(path, FileChange.changetype_type, oldvalue, newvalue)) 296 filechanges.append(FileChange(path, FileChange.changetype_type, oldvalue, newvalue))
297
297 # Check permissions 298 # Check permissions
298 oldvalue = splitv[0][1:] 299 oldvalue = splitv[0][1:]
299 newvalue = newsplitv[0][1:] 300 newvalue = newsplitv[0][1:]
300 if oldvalue != newvalue: 301 if oldvalue != newvalue:
301 filechanges.append(FileChange(path, FileChange.changetype_perms, oldvalue, newvalue)) 302 filechanges.append(FileChange(path, FileChange.changetype_perms, oldvalue, newvalue))
302 # Check owner/group 303
303 oldvalue = '%s/%s' % (splitv[1], splitv[2]) 304 if compare_ownership:
304 newvalue = '%s/%s' % (newsplitv[1], newsplitv[2]) 305 # Check owner/group
305 if oldvalue != newvalue: 306 oldvalue = '%s/%s' % (splitv[1], splitv[2])
306 filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue)) 307 newvalue = '%s/%s' % (newsplitv[1], newsplitv[2])
308 if oldvalue != newvalue:
309 filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue))
310
307 # Check symlink target 311 # Check symlink target
308 if newsplitv[0][0] == 'l': 312 if newsplitv[0][0] == 'l':
309 if len(splitv) > 3: 313 if len(splitv) > 3:
@@ -574,7 +578,7 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
574 elif filename == 'sysroot': 578 elif filename == 'sysroot':
575 alines = d.a_blob.data_stream.read().decode('utf-8').splitlines() 579 alines = d.a_blob.data_stream.read().decode('utf-8').splitlines()
576 blines = d.b_blob.data_stream.read().decode('utf-8').splitlines() 580 blines = d.b_blob.data_stream.read().decode('utf-8').splitlines()
577 filechanges = compare_file_lists(alines,blines) 581 filechanges = compare_file_lists(alines,blines, compare_ownership=False)
578 if filechanges: 582 if filechanges:
579 chg = ChangeRecord(path, filename, None, None, True) 583 chg = ChangeRecord(path, filename, None, None, True)
580 chg.filechanges = filechanges 584 chg.filechanges = filechanges