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).

(From OE-Core rev: 39edf868deafe79ffd2ea57620af70840ec4c208)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Martin Jansa 2021-07-30 11:25:44 +02:00 committed by Richard Purdie
parent 82c1581e48
commit 1a1bb6ce51

View File

@ -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)