2024-03-11 11:01:49

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH] lib/build_OID_registry: Don't mention the full path of the script in output

This change strips the full path of the script generating
lib/oid_registry_data.c to just lib/build_OID_registry. The motivation
for this change is Yocto emitting a build warning

File /usr/src/debug/linux-lxatac/6.7-r0/lib/oid_registry_data.c in package linux-lxatac-src contains reference to TMPDIR [buildpaths]

So this change brings us one step closer to make the build result
reproducible independent of the build path.

Signed-off-by: Uwe Kleine-König <[email protected]>
---
lib/build_OID_registry | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/build_OID_registry b/lib/build_OID_registry
index d7fc32ea8ac2..324ee6520ee2 100755
--- a/lib/build_OID_registry
+++ b/lib/build_OID_registry
@@ -35,7 +35,7 @@ close IN_FILE || die;
#
open C_FILE, ">$ARGV[1]" or die;
print C_FILE "/*\n";
-print C_FILE " * Automatically generated by ", $0, ". Do not edit\n";
+print C_FILE " * Automatically generated by ", $0 =~ s#^\Q$ENV{'abs_srctree'}/\E##r, ". Do not edit\n";
print C_FILE " */\n";

#

base-commit: 8ffc8b1bbd505e27e2c8439d326b6059c906c9dd
--
2.43.0