aboutsummaryrefslogtreecommitdiffstats
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:14 +0100
commit01b816be4adff8f3992c1369810bdcf11a26fd6c (patch)
tree130b73020f88e4507ad81d8e051ed5066bb92603
parenta0a96db23686a38235fb0373e75e8b2951216c18 (diff)
buildhistory_analysis: ignore ownership for sysroot diffs
The sysroot isn't populated under pseudo, so ownership differences should be ignored. 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):
return adict
-def compare_file_lists(alines, blines):
+def compare_file_lists(alines, blines, compare_ownership=True):
adict = file_list_to_dict(alines)
bdict = file_list_to_dict(blines)
filechanges = []
@@ -294,16 +294,20 @@ def compare_file_lists(alines, blines):
newvalue = newsplitv[0][0]
if oldvalue != newvalue:
filechanges.append(FileChange(path, FileChange.changetype_type, oldvalue, newvalue))
+
# Check permissions
oldvalue = splitv[0][1:]
newvalue = newsplitv[0][1:]
if oldvalue != newvalue:
filechanges.append(FileChange(path, FileChange.changetype_perms, oldvalue, newvalue))
- # Check owner/group
- oldvalue = '%s/%s' % (splitv[1], splitv[2])
- newvalue = '%s/%s' % (newsplitv[1], newsplitv[2])
- if oldvalue != newvalue:
- filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue))
+
+ if compare_ownership:
+ # Check owner/group
+ oldvalue = '%s/%s' % (splitv[1], splitv[2])
+ newvalue = '%s/%s' % (newsplitv[1], newsplitv[2])
+ if oldvalue != newvalue:
+ filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue))
+
# Check symlink target
if newsplitv[0][0] == 'l':
if len(splitv) > 3:
@@ -574,7 +578,7 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
elif filename == 'sysroot':
alines = d.a_blob.data_stream.read().decode('utf-8').splitlines()
blines = d.b_blob.data_stream.read().decode('utf-8').splitlines()
- filechanges = compare_file_lists(alines,blines)
+ filechanges = compare_file_lists(alines,blines, compare_ownership=False)
if filechanges:
chg = ChangeRecord(path, filename, None, None, True)
chg.filechanges = filechanges