]> git.baikalelectronics.ru Git - kernel.git/commit
kheaders: Have cpio unconditionally replace files
authorDaniel Mentz <danielmentz@google.com>
Wed, 13 Apr 2022 23:36:49 +0000 (16:36 -0700)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 7 May 2022 18:16:59 +0000 (03:16 +0900)
commit9efd38e0eff1e7bcabd993b463ee55201374bab4
tree38a427028e79a962d72b53c3984ca3e383b8c41c
parent34d0ed066c00cd26b5b72cce3fe36a46fa4d28d9
kheaders: Have cpio unconditionally replace files

For out-of-tree builds, this script invokes cpio twice to copy header
files from the srctree and subsequently from the objtree. According to a
comment in the script, there might be situations in which certain files
already exist in the destination directory when header files are copied
from the objtree:

"The second CPIO can complain if files already exist which can happen
with out of tree builds having stale headers in srctree. Just silence
CPIO for now."

GNU cpio might simply print a warning like "newer or same age version
exists", but toybox cpio exits with a non-zero exit code unless the
command line option "-u" is specified.

To improve compatibility with toybox cpio, add the command line option
"-u" to unconditionally replace existing files in the destination
directory.

Signed-off-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
kernel/gen_kheaders.sh