From 8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 7 Nov 2025 13:31:53 +0000 Subject: The poky repository master branch is no longer being updated. You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie --- scripts/contrib/convert-variable-renames.py | 116 ---------------------------- 1 file changed, 116 deletions(-) delete mode 100755 scripts/contrib/convert-variable-renames.py (limited to 'scripts/contrib/convert-variable-renames.py') diff --git a/scripts/contrib/convert-variable-renames.py b/scripts/contrib/convert-variable-renames.py deleted file mode 100755 index eded90ca61..0000000000 --- a/scripts/contrib/convert-variable-renames.py +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env python3 -# -# Conversion script to rename variables to versions with improved terminology. -# Also highlights potentially problematic language and removed variables. -# -# Copyright (C) 2021 Richard Purdie -# Copyright (C) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: GPL-2.0-only -# - -import re -import os -import sys -import tempfile -import shutil -import mimetypes - -if len(sys.argv) < 2: - print("Please specify a directory to run the conversion script against.") - sys.exit(1) - -renames = { -"BB_ENV_WHITELIST" : "BB_ENV_PASSTHROUGH", -"BB_ENV_EXTRAWHITE" : "BB_ENV_PASSTHROUGH_ADDITIONS", -"BB_HASHCONFIG_WHITELIST" : "BB_HASHCONFIG_IGNORE_VARS", -"BB_SETSCENE_ENFORCE_WHITELIST" : "BB_SETSCENE_ENFORCE_IGNORE_TASKS", -"BB_HASHBASE_WHITELIST" : "BB_BASEHASH_IGNORE_VARS", -"BB_HASHTASK_WHITELIST" : "BB_TASKHASH_IGNORE_TASKS", -"CVE_CHECK_PN_WHITELIST" : "CVE_CHECK_SKIP_RECIPE", -"CVE_CHECK_WHITELIST" : "CVE_CHECK_IGNORE", -"MULTI_PROVIDER_WHITELIST" : "BB_MULTI_PROVIDER_ALLOWED", -"PNBLACKLIST" : "SKIP_RECIPE", -"SDK_LOCAL_CONF_BLACKLIST" : "ESDK_LOCALCONF_REMOVE", -"SDK_LOCAL_CONF_WHITELIST" : "ESDK_LOCALCONF_ALLOW", -"SDK_INHERIT_BLACKLIST" : "ESDK_CLASS_INHERIT_DISABLE", -"SSTATE_DUPWHITELIST" : "SSTATE_ALLOW_OVERLAP_FILES", -"SYSROOT_DIRS_BLACKLIST" : "SYSROOT_DIRS_IGNORE", -"UNKNOWN_CONFIGURE_WHITELIST" : "UNKNOWN_CONFIGURE_OPT_IGNORE", -"ICECC_USER_CLASS_BL" : "ICECC_CLASS_DISABLE", -"ICECC_SYSTEM_CLASS_BL" : "ICECC_CLASS_DISABLE", -"ICECC_USER_PACKAGE_WL" : "ICECC_RECIPE_ENABLE", -"ICECC_USER_PACKAGE_BL" : "ICECC_RECIPE_DISABLE", -"ICECC_SYSTEM_PACKAGE_BL" : "ICECC_RECIPE_DISABLE", -"LICENSE_FLAGS_WHITELIST" : "LICENSE_FLAGS_ACCEPTED", -} - -removed_list = [ -"BB_STAMP_WHITELIST", -"BB_STAMP_POLICY", -"INHERIT_BLACKLIST", -"TUNEABI_WHITELIST", -] - -context_check_list = [ -"blacklist", -"whitelist", -"abort", -] - -def processfile(fn): - - print("processing file '%s'" % fn) - try: - fh, abs_path = tempfile.mkstemp() - modified = False - with os.fdopen(fh, 'w') as new_file: - with open(fn, "r") as old_file: - lineno = 0 - for line in old_file: - lineno += 1 - if not line or "BB_RENAMED_VARIABLE" in line: - continue - # Do the renames - for old_name, new_name in renames.items(): - if old_name in line: - line = line.replace(old_name, new_name) - modified = True - # Find removed names - for removed_name in removed_list: - if removed_name in line: - print("%s needs further work at line %s because %s has been deprecated" % (fn, lineno, removed_name)) - for check_word in context_check_list: - if re.search(check_word, line, re.IGNORECASE): - print("%s needs further work at line %s since it contains %s"% (fn, lineno, check_word)) - new_file.write(line) - new_file.close() - if modified: - print("*** Modified file '%s'" % (fn)) - shutil.copymode(fn, abs_path) - os.remove(fn) - shutil.move(abs_path, fn) - except UnicodeDecodeError: - pass - -ourname = os.path.basename(sys.argv[0]) -ourversion = "0.1" - -if os.path.isfile(sys.argv[1]): - processfile(sys.argv[1]) - sys.exit(0) - -for targetdir in sys.argv[1:]: - print("processing directory '%s'" % targetdir) - for root, dirs, files in os.walk(targetdir): - for name in files: - if name == ourname: - continue - fn = os.path.join(root, name) - if os.path.islink(fn): - continue - if "ChangeLog" in fn or "/.git/" in fn or fn.endswith(".html") or fn.endswith(".patch") or fn.endswith(".m4") or fn.endswith(".diff") or fn.endswith(".orig"): - continue - processfile(fn) - -print("All files processed with version %s" % ourversion) -- cgit v1.2.3-54-g00ecf