[Buildroot] [PATCH 01/15] package/pkg-generic.mk: detect files overwritten in TARGET_DIR and HOST_DIR
Yann E. MORIN
yann.morin.1998 at free.fr
Tue Jun 22 10:24:33 UTC 2021
Nicolas, All,
On 2021-06-22 11:57 +0200, Nicolas Cavallari spake thusly:
> On 22/06/2021 11:30, Thomas Petazzoni wrote:
> >On Tue, 22 Jun 2021 09:40:52 +0200
> >Herve Codina <herve.codina at bootlin.com> wrote:
> >
> >> 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,
But is that even an issue? Those paths are only used for one per-package
directory; they do not follow files around into another package's ppd.
So, relative or absolute, we don't much care.
> >and adding LC_ALL=C is quite
> >customary too.
In this case, do we also even care or need it? I pretty sure the output
of find is not sorted at all; it most probably depend on the order of
dentries in the directory, and those have absolutely no ordering
guarantee...
Note that if you really want to use LC_ALL, passing it in front of 'find'
will not make LC_ALL available to anythin after the pipeline, so you'd
still have xargs (and md5sum) run without it...
> > 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.
Agreed. But I think this is exactly what Thomas suggested to use, right?
> An alternative is "-exec md5sum {} +", which is essentially xargs-like.
I once used that in the past, and it breaks on non-GNU find, because '+'
is a GNUism. So I think using xargs is still better.
Regards,
Yann E. MORIN.
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list