Skip to contentSkip to conversation

convert-overrides.py: show processed file and version of this script

PATCH New Martin Jansa 1 participant 2 messages Jul 30, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 convert-overrides.py: show processed file and version of this script

* on bigger layer this script takes couple minutes without showing any progress
* add a version to reference it in the conversion commit (to easily figure out if it's worth re-converting the layer).

---
 scripts/contrib/convert-overrides.py | 4 ++++
 1 file changed, 4 insertions(+)
scripts/contrib/convert-overrides.py +4 -0
index 499852bd26..68ae356083 100755
@@ -90,6 +90,7 @@ subs = {
 }
 
 def processfile(fn):
+    print("processing file '%s'" % fn)
     try:
         fh, abs_path = tempfile.mkstemp()
         with os.fdopen(fh, 'w') as new_file:
@@ -128,6 +129,7 @@ def processfile(fn):
         pass
 
 ourname = os.path.basename(sys.argv[0])
+ourversion = "0.9.0"
 
 for root, dirs, files in os.walk(targetdir):
    for name in files:
@@ -139,3 +141,5 @@ for root, dirs, files in os.walk(targetdir):
       if "/.git/" in fn or fn.endswith(".html") or fn.endswith(".patch") or fn.endswith(".m4") or fn.endswith(".diff"):
           continue
       processfile(fn)
+
+print("All files processed with version %s" % ourversion)
Signature · 1 line
2.30.2
#1 lore raw

PATCH 2/2 convert-overrides.py: remove base_dep_prepend and autotools_dep_prepend exception

* the functions were renamed in:
https://git.openembedded.org/openembedded-core/commit/?id=9d002acae720b0a8e96a6734424a142b86880461

---
 scripts/contrib/convert-overrides.py | 6 ------
 1 file changed, 6 deletions(-)
scripts/contrib/convert-overrides.py +0 -6
index 68ae356083..057758f1bb 100755
@@ -102,12 +102,6 @@ def processfile(fn):
                             skip = True
                             if "ptest_append" in line or "ptest_remove" in line or "ptest_prepend" in line:
                                 skip = False
-                    if "base_dep_prepend" in line and line.startswith("BASEDEPENDS_class"):
-                        line = line.replace("BASEDEPENDS_class", "BASEDEPENDS:class")
-                        skip = True
-                    if "autotools_dep_prepend" in line and line.startswith("DEPENDS_prepend"):
-                        line = line.replace("DEPENDS_prepend", "DEPENDS:prepend")
-                        skip = True
                     for sub in subs:
                         if sub in line:
                             line = line.replace(sub, subs[sub])
Signature · 1 line
2.30.2