[BusyBox] tar include/exclude interaction broken

Glenn McGrath bug1 at optushome.com.au
Fri Oct 12 23:33:23 UTC 2001


On Fri, 12 Oct 2001 13:13:05 -0600
Matt Kraai <kraai at alumni.carnegiemellon.edu> wrote:

> Howdy,
> 
> I've found a tar regression caused by the recent rewrite.  If an
> archive contains
> 
> foo/
> foo/bar
> 
> and the user asks for foo to be extracted, but not foo/bar,
> BusyBox tar extracts neither.  I've included a test case which
> demonstrates this in my latest test suite[1].  Could you please
> fix this?
> 
>

Im getting lost with what all the exclude/include stuff should do.

shouldnt this 

tar xf foo.tar foo -X (any list without foo mentioned)

be the same as 

tar xf foo.tar foo

or

tar xf foo.tar -T (list with just foo)

or

tar xf foo.tar -T (list with just foo) -X (any list without foo)

If exclude files are specified and no include files are, then it will
extract all files not in the include list.

If there are both exclude and include files then the exclude files are
removed from the include list and ionly the include files are extracted.


I do see one problem with busybox tar at the moment,

busybox tar xf foo.tar foo/ will extract the dir but busybox tar xf foo.tar
foo wont

Ill strip directory markers before comparison to fix this.


Glenn







More information about the busybox mailing list