Cutting 4.11.0 Soon

Chris Johns chrisj at rtems.org
Wed Nov 18 22:15:12 UTC 2015


On 19/11/2015 8:39 AM, Pavel Pisa wrote:
> The patch is important for unpacking standard tar command generated
> archives used for example by some of Microwindows tests.

I do not think the patch is enough. For example on OS X:

$ rm -rf x && mkdir x && mkdir x/1 && touch x/1/1 touch x/2 && tar cf
t1.tar x
$ rm -rf x && mkdir x && mkdir x/2 && touch x/2/1 touch x/1 && tar cf
t2.tar x
$ rm -rf x && tar xf t1.tar && tar xf t2.tar
x/1: Can't remove already-existing dir
tar: Error exit delayed from previous errors.

and on FreeBSD:

$ rm -rf x && mkdir x && mkdir x/1 && touch x/1/1 touch x/2 && tar cf
t1.tar x
$ rm -rf x && mkdir x && mkdir x/2 && touch x/2/1 touch x/1 && tar cf
t2.tar x
$ rm -rf x && tar xf t1.tar && tar xf t2.tar
x/1: Can't replace existing directory with non-directory
tar: Error exit delayed from previous errors.

I think we need to add more checking and error if nodes are not the
same. I cannot see a way around this.

The current implementation is overly cautious and it has made me move
away a direction and untar a fresh image. In the end I think it is
better as stray files do not hang around. I would rather we handle the
special cases correctly or not at all.

I have updated the ticket with this information.

Chris


More information about the devel mailing list