ANDROID: kheader: kheaders: Follow symlinks to source files

When the kernel is built inside a sandbox container, a forest of
symlinks to the source files may be created in the container. In this
case, the generated kheaders.tar.xz should follow these symlinks to
access the source files, instead of packing the symlinks themselves.

Bug: 276339429
Fixes: 0b41594564 ("FROMGIT: kheaders: use 'tar' instead of 'cpio' for copying files")
Link: https://lore.kernel.org/lkml/20230420010029.2702543-1-elsk@google.com/
Change-Id: Id8f3c958b0852a056f189a4e91acdded6e351606
Signed-off-by: Yifan Hong <elsk@google.com>
[cmllamas: split out flag addition into a separate commit]
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
Yifan Hong authored and Carlos Llamas committed 2025-04-04 20:13:31 +00:00
1 parent 8baccecfb7
commit a345ee7b53
1 file changed
+2 -2
+2 -2
View File
@@ -66,13 +66,13 @@ if [ "$building_out_of_srctree" ]; then
cd $srctree
for f in $dir_list
do find "$f" -name "*.h";
done | tar -c -f - -T - | tar -xf - -C "${tmpdir}"
done | tar -c --dereference -f - -T - | tar -xf - -C "${tmpdir}"
)
fi
for f in $dir_list;
do find "$f" -name "*.h";
done | tar -c -f - -T - | tar -xf - -C "${tmpdir}"
done | tar -c --dereference -f - -T - | tar -xf - -C "${tmpdir}"
# Always exclude include/generated/utsversion.h
# Otherwise, the contents of the tarball may vary depending on the build steps.