summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-29 15:21:35 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-30 12:37:53 +0000
commitb1eb390bbcb995c0da70478e17f9170721c75341 (patch)
tree4d548d1afa5ead776c83aefc68ebd2fc54c573e7
parent4af737e2643f498d1ff4c387207bd8c4f3d405b8 (diff)
downloadopenembedded-core-contrib-b1eb390bbcb995c0da70478e17f9170721c75341.tar.gz
scripts/buildhistory_analysis: Avoid tracebacks from file comparision code
We're seeing tracebacks from buildhistory analysing the python 3.8 -> 3.9 upgrade due to the significant file renames. Avoid these by checking before removal as they can happen multiple times. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/buildhistory_analysis.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 2d6fa1779e..b1856846b6 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -373,8 +373,10 @@ def compare_file_lists(alines, blines, compare_ownership=True):
removals.remove(removal2)
continue
filechanges.append(FileChange(removal, FileChange.changetype_move, addition))
- additions.remove(addition)
- removals.remove(removal)
+ if addition in additions:
+ additions.remove(addition)
+ if removal in removals:
+ removals.remove(removal)
for rename in renames:
filechanges.append(FileChange(renames[rename], FileChange.changetype_move, rename))