Skip to content
Snippets Groups Projects

Fixes for backwards compatibility

Merged Alberto Pianon requested to merge ap/srctracker-upd into srctracker
1 file
+ 15
3
Compare changes
  • Side-by-side
  • Inline
+ 15
3
@@ -153,6 +153,7 @@ def track_unpack(d):
workdir = d.getVar("WORKDIR")
layers = get_layers()
local_files = oe.recipeutils.get_recipe_local_files(d, patches=True, archives=True)
local_files = { k: os.path.abspath(v) for k, v in local_files.items() }
# TODO: how are local archives handled by do_unpack? do they get unpacked,
# too, or just copied? Do we have any examples to work on in this respect?
@@ -358,6 +359,7 @@ def track_patch(d, src_map, local_map):
workdir = d.getVar("WORKDIR")
bb.note(f"checking patches for {pn} sources in {d.getVar('S')}")
recipe_patched_files = oe.recipeutils.get_recipe_patched_files(d)
recipe_patched_files = { os.path.abspath(k): v for k, v in recipe_patched_files.items() }
patches = {}
for s in src_map:
if s["local_fullpath"] in recipe_patched_files:
@@ -368,6 +370,7 @@ def track_patch(d, src_map, local_map):
added_files = {}
deleted_files = {}
for patchfile, patched in recipe_patched_files.items():
patchfile = os.path.abspath(patchfile)
for patched_file, mode in patched:
if patched_file.startswith(workdir):
patched_file = os.path.relpath(patched_file, workdir)
@@ -473,7 +476,7 @@ def track_packages(d, src_map):
lines = o.split("\n")
for line in lines:
if not line.startswith("\t"):
main_srcfile = os.path.realpath(line)
main_srcfile = os.path.realpath(re.sub("^.+//", "/", line))
debugsrc[main_srcfile] = []
else:
included_srcfile = os.path.realpath(line.replace("\t", ""))
@@ -485,10 +488,19 @@ def track_packages(d, src_map):
if debugsrc:
for main_srcfile, included_srcfiles in debugsrc.items():
included_srcfiles.sort()
dbg_file = dbg_file[1:].replace(".debug/", "")
dbg_file = dbg_file[1:]
subst = {
"/\.debug/": "/",
"^/usr/lib/debug": "",
"\.debug$": "",
}
for pattern, repl in subst.items():
dbg_file = re.sub(pattern, repl, dbg_file)
dbg.update({dbg_file: debugsrc})
except Exception:
except subprocess.CalledProcessError:
pass
except Exception as e:
bb.note(f"ERROR: dwarfsrcfiles failed on {dbg_file} because of {e}")
package_map = []
for package_name in packages:
if package_name.endswith("-dbg"):
Loading