Thread (83 messages) flat view 83 messages, 6 authors, 2021-07-06

[Buildroot] [PATCH 01/15] package/pkg-generic.mk: detect files overwritten in TARGET_DIR and HOST_DIR

From: Nicolas Cavallari <hidden>
Date: 2021-06-22 09:57:42

On 22/06/2021 11:30, Thomas Petazzoni wrote:
On Tue, 22 Jun 2021 09:40:52 +0200
Herve Codina [off-list ref] wrote:
quoted
    Compared to the first version, this patch has an improved commit message and
    generates the md5sum snapshot using
      'find -L $(1) -type f -print0 | xargs -0 -r md5sum > $($(PKG)_DIR)/.files$(2).md5;'
But is this better ? Due to not cd-ing into the directory, you will
have full absolute paths in the .md5 file, and adding LC_ALL=C is quite
customary too. Ditto for using | xargs instead of -exec.
xargs will run only start one md5sum process if the command line size 
permits it, whereas "-exec md5sum {} ;" will start one md5sum per file.

An alternative is "-exec md5sum {} +", which is essentially xargs-like.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help