[Buildroot] [PATCH] fs/tar: make --no-recursion effective
Baruch Siach
baruch at tkos.co.il
Wed Dec 28 09:32:21 UTC 2016
Hi Peter,
On Wed, Dec 28, 2016 at 10:21:26AM +0100, Peter Korsgaard wrote:
> >>>>> "Baruch" == Baruch Siach <baruch at tkos.co.il> writes:
>
> > The tar --no-recursion option is position sensitive. It only affects following
> > file listing options. Move --no-recursion before the -T option to make it
> > effective. This fixes duplication of entries in the generated rootfs.tar
> > archive.
>
> > Signed-off-by: Baruch Siach <baruch at tkos.co.il>
>
> I got a bit confused by this, as the manual explicitly shows the -T -
> --no-recursion sequence:
>
> https://www.gnu.org/software/tar/manual/html_section/tar_54.html
That part of the tar manual looks wrong. The "Position-Sensitive Options"[1]
section shows this example to illustrate the position sensitivity concept:
tar -cf a.tar --recursion /usr --no-recursion /var/*
[1] https://www.gnu.org/software/tar/manual/html_section/tar_22.html#SEC44
> But indeed, tar -tvf output/images/rootfs.tar | grep '/usr/$' had 2 hits
> before, and not after applying this patch - So committed, thanks!
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
More information about the buildroot
mailing list