From bd92c420177bae39ef4d2a8ba7083fd905bf7335 Mon Sep 17 00:00:00 2001 From: Guru Das Srinagesh Date: Tue, 21 Feb 2023 12:10:54 -0800 Subject: [PATCH] merge_dtbs.py: Print only basenames of dtb* files When debugging issues with the script, it helps to not have in the script's output the fully qualified path names of the DTB and DTBO files being merged as they are very lengthy. Retain only the relevant parts of the filnames - the basenames for better readability. Change-Id: Ia18584fcf9ff173c4b22d4543c83c4091e15b8f8 Signed-off-by: Guru Das Srinagesh --- build/tools/merge_dtbs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/tools/merge_dtbs.py b/build/tools/merge_dtbs.py index 898be4cc..56e35b99 100755 --- a/build/tools/merge_dtbs.py +++ b/build/tools/merge_dtbs.py @@ -227,7 +227,7 @@ class DeviceTree(DeviceTreeInfo): super().__init__(msm_id, board_id, pmic_id) if not self.has_any_properties(): - print('WARNING! {} has no properties and may match with any other devicetree'.format(self.filename)) + print('WARNING! {} has no properties and may match with any other devicetree'.format(os.path.basename(self.filename))) def get_prop(self, node, property, prop_type='i', check_output=True): r = subprocess.run(["fdtget", "-t", prop_type, self.filename, node, property], @@ -252,7 +252,7 @@ class DeviceTree(DeviceTreeInfo): return out def __str__(self): - return "{} [{}]".format(super().__str__(), self.filename) + return "{} [{}]".format(super().__str__(), os.path.basename(self.filename)) class InnerMergedDeviceTree(DeviceTreeInfo): """ @@ -332,7 +332,7 @@ class InnerMergedDeviceTree(DeviceTreeInfo): return [part for part in parts if part not in ignored_parts] def __str__(self): - return "{} [{} + {{{}}}]".format(super().__str__(), self.base, " ".join(t.filename for t in self.techpacks)) + return "{} [{} + {{{}}}]".format(super().__str__(), os.path.basename(self.base), " ".join(os.path.basename(t.filename) for t in self.techpacks)) class MergedDeviceTree(object): def __init__(self, other):