[oe-commits] [openembedded-core] 10/20: buildhistory: remove duplicate renames
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 8 18:40:00 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit cff000c43d6e9a183911338951026dfbef88f838
Author: Anuj Mittal <anuj.mittal at intel.com>
AuthorDate: Mon Mar 5 16:07:58 2018 +0800
buildhistory: remove duplicate renames
In cases when a package like qemu might have files with same names
in multiple directories, the rename logic might go wrong and create
multiple rename pair for a single directory.
Make sure that we process each rename pair once. Also, don't print
FILELIST as part of PKGSIZE to ensure that it gets printed only once
when reporting package changes.
Fixes [YOCTO #12559]
Signed-off-by: Anuj Mittal <anuj.mittal at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/lib/oe/buildhistory_analysis.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 6c0bca8..bf2a9d3 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -36,7 +36,6 @@ related_fields = {}
related_fields['RDEPENDS'] = ['DEPENDS']
related_fields['RRECOMMENDS'] = ['DEPENDS']
related_fields['FILELIST'] = ['FILES']
-related_fields['PKGSIZE'] = ['FILELIST']
related_fields['files-in-image.txt'] = ['installed-package-names.txt', 'USER_CLASSES', 'IMAGE_CLASSES', 'ROOTFS_POSTPROCESS_COMMAND', 'IMAGE_POSTPROCESS_COMMAND']
related_fields['installed-package-names.txt'] = ['IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS', 'NO_RECOMMENDATIONS', 'PACKAGE_EXCLUDE']
@@ -99,7 +98,17 @@ class ChangeRecord:
for name in adirs - bdirs]
files_ba = [(name, sorted(os.path.basename(item) for item in bitems if os.path.dirname(item) == name)) \
for name in bdirs - adirs]
- renamed_dirs = [(dir1, dir2) for dir1, files1 in files_ab for dir2, files2 in files_ba if files1 == files2]
+ renamed_dirs = []
+ for dir1, files1 in files_ab:
+ rename = False
+ for dir2, files2 in files_ba:
+ if files1 == files2 and not rename:
+ renamed_dirs.append((dir1,dir2))
+ # Make sure that we don't use this (dir, files) pair again.
+ files_ba.remove((dir2,files2))
+ # If a dir has already been found to have a rename, stop and go no further.
+ rename = True
+
# remove files that belong to renamed dirs from aitems and bitems
for dir1, dir2 in renamed_dirs:
aitems = [item for item in aitems if os.path.dirname(item) not in (dir1, dir2)]
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list