ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: tar task problems
Date Wed, 24 Jan 2007 19:18:09 GMT
On Wed, 24 Jan 2007, Torsten Curdt <tcurdt@apache.org> wrote:

> AFAIU the only way of modifying TGZs and retain meta date like
> permissions and ownerships is to nest the TAR with the UNTAR (ZIP/
> UNZIP) process (as TarResource object getting passed through).

You are correct.  <zip> does have an update attribute, but tar
doesn't.

> While this seems to work fine for ZIP, the TAR task bails out with
> 
>  "Problem creating TAR: request to write '0' bytes exceeds size in
> header of '-1' bytes for entry ''"

Ouch.  It might be due to your specific tar archive, I think we do
have a unit test that re-tars a tar, but I could be wrong.

I'm not aware of any prior report of this bug, but then again a lot of
issues have been opened without me following close enough.

If you can provide a simple test tar.gz for us, writing an AntUnit
test would be trivial.

> Also I am wondering why mappers are not supported.
> 
>   <target name="tgz">
>       <tar destfile="${build}/release.tgz">
>           <fileset dir="src/site"/>
>           <tarfileset src="src/release.tgz"/>
>           <mapper type="..."/>
>       </tar>
>   </target>
> 
> By design or would a contribution be welcome? :)

Not by design, just because nobody added it.

If you wanted to contribute anything, a MappedResourceCollection like

<mappedresources>
  <tarfileset src="src/release.tgz"/>
  <mapper type="..."/>
</mappedresources>

might be worth a try as it would add mapping functionality to any task
accepting resource collections.

This approach wouldn't work in your case, though, since we'd lose
permission information (the task wouldn't know there is a tarfileset
decorated by the mapped collection).

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message