Re: [PATCH v2] convert-variables: Script for Inclusive Language variable renames

Richard Purdie

On Wed, 2022-02-16 at 16:32 -0800, Saul Wold wrote:
From: Saul Wold <Saul.Wold@...>

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 <saul.wold@...>
v2: renamed script, removed bitbake internal vars, added WHITELIST_ option

scripts/contrib/ | 110 +++++++++++++++++++++++++++
1 file changed, 110 insertions(+)
create mode 100755 scripts/contrib/

diff --git a/scripts/contrib/ b/scripts/contrib/
new file mode 100755
index 0000000000..a632fd4d5c
--- /dev/null
+++ b/scripts/contrib/
@@ -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 = {
+removed_list = [
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 "" 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.



Join { to automatically receive all group messages.