From: Ross Burton Date: Fri, 7 Nov 2025 15:27:28 +0000 (+0000) Subject: lib/oe/buildhistory_analysis: add support for SDKs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61a00ed46352c55236afa867b5e80156ecdf2909;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git lib/oe/buildhistory_analysis: add support for SDKs Add support for SDKs to the buildhistory difference analysis, and show the difference in total size, package list, and file list. [ YOCTO #16057 ] Signed-off-by: Ross Burton Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py index 4edad01580c..2c5f9c6b169 100644 --- a/meta/lib/oe/buildhistory_analysis.py +++ b/meta/lib/oe/buildhistory_analysis.py @@ -26,14 +26,14 @@ import bb.tinfoil list_fields = ['DEPENDS', 'RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS', 'FILES', 'FILELIST', 'USER_CLASSES', 'IMAGE_CLASSES', 'IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS', 'PACKAGE_EXCLUDE'] list_order_fields = ['PACKAGES'] defaultval_map = {'PKG': 'PKG', 'PKGE': 'PE', 'PKGV': 'PV', 'PKGR': 'PR'} -numeric_fields = ['PKGSIZE', 'IMAGESIZE'] +numeric_fields = ['PKGSIZE', 'IMAGESIZE', 'SDKSIZE'] # Fields to monitor -monitor_fields = ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RREPLACES', 'RCONFLICTS', 'PACKAGES', 'FILELIST', 'PKGSIZE', 'IMAGESIZE', 'PKG'] +monitor_fields = ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RREPLACES', 'RCONFLICTS', 'PACKAGES', 'FILELIST', 'PKGSIZE', 'IMAGESIZE', 'SDKSIZE', 'PKG'] ver_monitor_fields = ['PKGE', 'PKGV', 'PKGR'] # Percentage change to alert for numeric fields monitor_numeric_threshold = 10 # Image files to monitor (note that image-info.txt is handled separately) -img_monitor_files = ['installed-package-names.txt', 'files-in-image.txt'] +img_monitor_files = ['installed-package-names.txt', 'files-in-image.txt', 'files-in-sdk.txt'] colours = { 'colour_default': '', @@ -673,6 +673,31 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep chg = ChangeRecord(path, filename, d.a_blob.data_stream.read().decode('utf-8'), d.b_blob.data_stream.read().decode('utf-8'), True) changes.append(chg) + elif path.startswith('sdk/'): + filename = os.path.basename(d.a_blob.path) + if filename in img_monitor_files: + if filename == 'files-in-sdk.txt': + 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) + if filechanges: + chg = ChangeRecord(path, filename, None, None, True) + chg.filechanges = filechanges + changes.append(chg) + elif filename == 'installed-package-names.txt': + alines = d.a_blob.data_stream.read().decode('utf-8').splitlines() + blines = d.b_blob.data_stream.read().decode('utf-8').splitlines() + filechanges = compare_lists(alines,blines) + if filechanges: + chg = ChangeRecord(path, filename, None, None, True) + chg.filechanges = filechanges + changes.append(chg) + else: + chg = ChangeRecord(path, filename, d.a_blob.data_stream.read().decode('utf-8'), d.b_blob.data_stream.read().decode('utf-8'), True) + changes.append(chg) + elif filename == 'sdk-info.txt': + changes.extend(compare_dict_blobs(path, d.a_blob, d.b_blob, report_all, report_ver)) + # Look for added preinst/postinst/prerm/postrm # (without reporting newly added recipes) addedpkgs = []