History

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.

Daniel Mentz committed 4 years ago

Commit 1e8ca621 parent c77d06e1 file · +1 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/gen_kheaders.sh+1−1
@@ -74,7 +74,7 @@ fi · 73 unmodified lines
7474 # of tree builds having stale headers in srctree. Just silence CPIO for now.
7575 for f in $dir_list;
7676 do find "$f" -name "*.h";
77−done | cpio --quiet -pd $cpio_dir >/dev/null 2>&1
77+done | cpio --quiet -pdu $cpio_dir >/dev/null 2>&1
7878
7979 # Remove comments except SDPX lines
8080 find $cpio_dir -type f -print0 |

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t