On Wed, 2022-02-16 at 16:32 -0800, Saul Wold wrote: > From: Saul Wold <[email protected]> > > This script searches for a list of variable that have been renamed > and converts them to their more descriptive names. It also searches > for a list of variables that have been removed or deprecated and > prints a message. > > It will print a message to inform the user that there are terms that > need to be updated in their files. Many of these changes are context > sensitive and may not be modified as they might be existing calls to > other libraries. This message is informational only. > > I have tested this on poky and meta-openembedded so far. > > (From OE-Core rev: 50fe7ba8dba05a9681c9095506f798796cfc2750) > > Signed-off-by: Saul Wold <[email protected]> > --- > v2: renamed script, removed bitbake internal vars, added WHITELIST_ option > > scripts/contrib/convert-variables.py | 110 +++++++++++++++++++++++++++ > 1 file changed, 110 insertions(+) > create mode 100755 scripts/contrib/convert-variables.py > > diff --git a/scripts/contrib/convert-variables.py > b/scripts/contrib/convert-variables.py > new file mode 100755 > index 0000000000..a632fd4d5c > --- /dev/null > +++ b/scripts/contrib/convert-variables.py > @@ -0,0 +1,110 @@ > +#!/usr/bin/env python3 > +# > +# Conversion script to rename variables with more descriptive terms > +# > +# > +# 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_LOCAL_CONF_ALLOW", > +"SDK_LOCAL_CONF_WHITELIST":"ESDK_LOCAL_CONF_REMOVE", > +"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", > +"WHITELIST_":"INCOMPATIBLE_LICENSE_ALLOWED_RECIPE_", > +} > + > +removed_list = [ > +"BB_STAMP_WHITELIST", > +"BB_STAMP_POLICY", > +"ICECC_USER_CLASS_BL", > +"ICECC_USER_PACKAGE_BL", > +"ICECC_USER_PACKAGE_WL", > +"INHERIT_BLACKLIST", > +"TUNEABI_WHITELIST", > +] > +
Thanks Saul. The key to making this a success is in the detail and I know you're doing your best with it but there are some things we need to get right. a) the script name or description at the top of it still doesn't sit right with me. "convert-variables" doesn't really tell me what it is for in a years time. I've tweaked the patch to "convert-variable-renames.py" locally which mentions the fact it is renaming things and I tweaked the description too. b) ESDK_LOCAL_CONF_ALLOW and ESDK_LOCAL_CONF_REMOVE are backwards above. The wiki also used LOCALCONF in one case and LOCAL_CONF in the other. I prefer LOCALCONF and that was what the original discussion said so I've fixed everything to match that. I've updated things in master-next. c) The WHITELIST_ change isn't what was discussed. That variable needs removing somehow, at least the license addition bit to it as it is horrible. A straight conversion is not appropriate. We can patch this into the conversion script when it is ready, IMO it isn't there yet. d) The subtleties of the ICECC_USER* translations have gotten lost in the system. The idea was to merge several variables together. The final piece of all this is communication. We need regular and clear communication with the community about what is happening, when things are merging, what work remains, the current work items and so on. I guess my next best thing to work on is going to be to communicate where things sit as I see them and what remains. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#161794): https://lists.openembedded.org/g/openembedded-core/message/161794 Mute This Topic: https://lists.openembedded.org/mt/89199536/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
