[Toybox] [PATCH] tar: add -I (--use-compress-program) support.

enh enh at google.com
Mon Aug 24 10:15:41 PDT 2020


On Sun, Aug 23, 2020 at 11:28 PM Rob Landley <rob at landley.net> wrote:

> On 8/22/20 2:45 PM, enh via Toybox wrote:
> > This also changes the other compression options (such as -j) so that we
> > pass no arguments for compression and just -d for decompression, which
> > is what -I does to its filter and which appears sufficient. (I think I
> > used -dc before just out of habit, since that's what I've been typing on
> > the command line for decades.)
>
> You added the -dc, the -f was there since the original submission in 2014.
> I'll
> assume it works ok without it for now, and wait for something to break. :)
>

yeah, the bit i missed was i made this change because that's what GNU tar
does and what the documented requirements for a command passed via -I are.
so i'm not expecting any trouble.

unfortunately, -I was just the easy request... they also want --transform.

this is the specific command:

tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \
    --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \

https://android.googlesource.com/kernel/common/+/refs/heads/android-mainline/scripts/Makefile.package#49

it's not clear to me just how complete that "sed expression" is. oh, looks
like it's just 's':
https://www.gnu.org/software/tar/manual/tar.html#SEC115 (but
with some weird extra flags rRsShH)


> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200824/7fbfa19b/attachment.htm>


More information about the Toybox mailing list