You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Maciej Zawadzki <mb...@urbancode.com> on 2001/12/07 02:19:48 UTC

Tar task weird behavior on Linux

Hello,

I am experiencing some weird behavior with the tar task on Linux.  When I
run an Ant script with the fragment below, the .gz file that is created
contains a .tar[1] file rather than a .tar file.  This only happens if I
execute the ant script on Linux, it works fine on Windows 2000.

        <!-- .tar.gz all the source code to the deploy directory -->
        <tar tarfile="${dist.dir}/${name}-${version}-src.tar"
            basedir="${src.dir}" />
        <gzip
zipfile="${deployDir}/${download.dir}/${name}-${version}-src.tar.gz"
            src="${dist.dir}/${name}-${version}-src.tar" />
        <delete file="${dist.dir}/${name}-${version}-src.tar"/>


I searched through the mail archives but could not find any reference to
this problem.  What do you guys think is causing this?

thanks,

--Maciej

mbz@urbancode.com
http://www.urbancode.com




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tar task weird behavior on Linux

Posted by Magesh Umasankar <um...@apache.org>.
My guess is that when WinZIp temporarily extracts the contents
of the gz file to show that to you, it sees a .tar file already existing
in its temp extract directory and hence renames the file into .tar[1].

It happens all the time when I use WinZip.  It shoudn't cause you
too much worries...

Magesh

----- Original Message -----
From: "Maciej Zawadzki" <mb...@urbancode.com>
To: "Ant Users List" <an...@jakarta.apache.org>; "Magesh Umasankar"
<um...@apache.org>
Sent: Friday, December 07, 2001 2:59 PM
Subject: RE: Tar task weird behavior on Linux


> After doing gzip --list on the generated .gz file, it contains a .tar
file.
> So that works.  But still, why does WinZip think that a .gz file generated
> on Linux contain a .tar[1] rather than a .tar file?
>
> I guess that it's more of a WinZip question.  But I wanted to see whether
> anyone else has experienced this type of behavior and if so maybe found a
> work around.
>
> Thanks for your help Magesh.
>
> --Maciej
>
> > -----Original Message-----
> > From: Magesh Umasankar [mailto:umagesh@apache.org]
> > Sent: Friday, December 07, 2001 12:06 PM
> > To: Ant Users List
> > Subject: Re: Tar task weird behavior on Linux
> >
> >
> > I suspect the problem lies on how WInZip reads the files present
> > in a gizp - not the way in which Ant stores the file inside it.
> >
> > On linux, after creating tha tar using ant, can you run gzip --list on
it
> > to see what the output is?
> >
> > Magesh
> >
> >
> > ----- Original Message -----
> > From: "Maciej Zawadzki" <mb...@urbancode.com>
> > To: "Ant Users List" <an...@jakarta.apache.org>; "Magesh Umasankar"
> > <um...@apache.org>
> > Sent: Friday, December 07, 2001 11:45 AM
> > Subject: RE: Tar task weird behavior on Linux
> >
> >
> > > I opened up the .gz file in windows using winZip.  The funny
> > thing is that
> > > if the Ant script runs on windows then it produces a .gz file
> > that contain
> > a
> > > .tar file.  It's only if I run the ant script on Linux that .gz file
> > > contains a .tar[1] file.  Shouldn't the two .gz files (the one
> > produced on
> > > windows and the one produced on Linux) be exactly the same at the
binary
> > > level?
> > >
> > > Thanks,
> > > --Maciej
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Magesh Umasankar [mailto:umagesh@apache.org]
> > > > Sent: Friday, December 07, 2001 2:46 AM
> > > > To: Ant Users List
> > > > Subject: Re: Tar task weird behavior on Linux
> > > >
> > > >
> > > > From: "Maciej Zawadzki" <mb...@urbancode.com>
> > > >
> > > > > run an Ant script with the fragment below, the .gz file that is
> > created
> > > > > contains a .tar[1] file rather than a .tar file.  This only
> > happens if
> > I
> > > > > execute the ant script on Linux, it works fine on Windows 2000.
> > > > >
> > > > >         <!-- .tar.gz all the source code to the deploy
directory -->
> > > > >         <tar tarfile="${dist.dir}/${name}-${version}-src.tar"
> > > > >             basedir="${src.dir}" />
> > > > >         <gzip
> > > > >
zipfile="${deployDir}/${download.dir}/${name}-${version}-src.tar.gz"
> > > > >             src="${dist.dir}/${name}-${version}-src.tar" />
> > > > >         <delete file="${dist.dir}/${name}-${version}-src.tar"/>
> > > > >
> > > >
> > > > How did you check what files are contained inside the gz file?
> > > >
> > > > Did you use native
> > > >
> > > > gzip -l
> > > >
> > > > or
> > > >
> > > > gzip --list
> > > >
> > > > ?  If not, will you please ensure that?
> > > >
> > > > Magesh
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tar task weird behavior on Linux

Posted by Maciej Zawadzki <mb...@urbancode.com>.
After doing gzip --list on the generated .gz file, it contains a .tar file.
So that works.  But still, why does WinZip think that a .gz file generated
on Linux contain a .tar[1] rather than a .tar file?

I guess that it's more of a WinZip question.  But I wanted to see whether
anyone else has experienced this type of behavior and if so maybe found a
work around.

Thanks for your help Magesh.

--Maciej

> -----Original Message-----
> From: Magesh Umasankar [mailto:umagesh@apache.org]
> Sent: Friday, December 07, 2001 12:06 PM
> To: Ant Users List
> Subject: Re: Tar task weird behavior on Linux
>
>
> I suspect the problem lies on how WInZip reads the files present
> in a gizp - not the way in which Ant stores the file inside it.
>
> On linux, after creating tha tar using ant, can you run gzip --list on it
> to see what the output is?
>
> Magesh
>
>
> ----- Original Message -----
> From: "Maciej Zawadzki" <mb...@urbancode.com>
> To: "Ant Users List" <an...@jakarta.apache.org>; "Magesh Umasankar"
> <um...@apache.org>
> Sent: Friday, December 07, 2001 11:45 AM
> Subject: RE: Tar task weird behavior on Linux
>
>
> > I opened up the .gz file in windows using winZip.  The funny
> thing is that
> > if the Ant script runs on windows then it produces a .gz file
> that contain
> a
> > .tar file.  It's only if I run the ant script on Linux that .gz file
> > contains a .tar[1] file.  Shouldn't the two .gz files (the one
> produced on
> > windows and the one produced on Linux) be exactly the same at the binary
> > level?
> >
> > Thanks,
> > --Maciej
> >
> >
> >
> > > -----Original Message-----
> > > From: Magesh Umasankar [mailto:umagesh@apache.org]
> > > Sent: Friday, December 07, 2001 2:46 AM
> > > To: Ant Users List
> > > Subject: Re: Tar task weird behavior on Linux
> > >
> > >
> > > From: "Maciej Zawadzki" <mb...@urbancode.com>
> > >
> > > > run an Ant script with the fragment below, the .gz file that is
> created
> > > > contains a .tar[1] file rather than a .tar file.  This only
> happens if
> I
> > > > execute the ant script on Linux, it works fine on Windows 2000.
> > > >
> > > >         <!-- .tar.gz all the source code to the deploy directory -->
> > > >         <tar tarfile="${dist.dir}/${name}-${version}-src.tar"
> > > >             basedir="${src.dir}" />
> > > >         <gzip
> > > > zipfile="${deployDir}/${download.dir}/${name}-${version}-src.tar.gz"
> > > >             src="${dist.dir}/${name}-${version}-src.tar" />
> > > >         <delete file="${dist.dir}/${name}-${version}-src.tar"/>
> > > >
> > >
> > > How did you check what files are contained inside the gz file?
> > >
> > > Did you use native
> > >
> > > gzip -l
> > >
> > > or
> > >
> > > gzip --list
> > >
> > > ?  If not, will you please ensure that?
> > >
> > > Magesh
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tar task weird behavior on Linux

Posted by Magesh Umasankar <um...@apache.org>.
I suspect the problem lies on how WInZip reads the files present
in a gizp - not the way in which Ant stores the file inside it.

On linux, after creating tha tar using ant, can you run gzip --list on it
to see what the output is?

Magesh


----- Original Message -----
From: "Maciej Zawadzki" <mb...@urbancode.com>
To: "Ant Users List" <an...@jakarta.apache.org>; "Magesh Umasankar"
<um...@apache.org>
Sent: Friday, December 07, 2001 11:45 AM
Subject: RE: Tar task weird behavior on Linux


> I opened up the .gz file in windows using winZip.  The funny thing is that
> if the Ant script runs on windows then it produces a .gz file that contain
a
> .tar file.  It's only if I run the ant script on Linux that .gz file
> contains a .tar[1] file.  Shouldn't the two .gz files (the one produced on
> windows and the one produced on Linux) be exactly the same at the binary
> level?
>
> Thanks,
> --Maciej
>
>
>
> > -----Original Message-----
> > From: Magesh Umasankar [mailto:umagesh@apache.org]
> > Sent: Friday, December 07, 2001 2:46 AM
> > To: Ant Users List
> > Subject: Re: Tar task weird behavior on Linux
> >
> >
> > From: "Maciej Zawadzki" <mb...@urbancode.com>
> >
> > > run an Ant script with the fragment below, the .gz file that is
created
> > > contains a .tar[1] file rather than a .tar file.  This only happens if
I
> > > execute the ant script on Linux, it works fine on Windows 2000.
> > >
> > >         <!-- .tar.gz all the source code to the deploy directory -->
> > >         <tar tarfile="${dist.dir}/${name}-${version}-src.tar"
> > >             basedir="${src.dir}" />
> > >         <gzip
> > > zipfile="${deployDir}/${download.dir}/${name}-${version}-src.tar.gz"
> > >             src="${dist.dir}/${name}-${version}-src.tar" />
> > >         <delete file="${dist.dir}/${name}-${version}-src.tar"/>
> > >
> >
> > How did you check what files are contained inside the gz file?
> >
> > Did you use native
> >
> > gzip -l
> >
> > or
> >
> > gzip --list
> >
> > ?  If not, will you please ensure that?
> >
> > Magesh
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tar task weird behavior on Linux

Posted by Maciej Zawadzki <mb...@urbancode.com>.
I opened up the .gz file in windows using winZip.  The funny thing is that
if the Ant script runs on windows then it produces a .gz file that contain a
.tar file.  It's only if I run the ant script on Linux that .gz file
contains a .tar[1] file.  Shouldn't the two .gz files (the one produced on
windows and the one produced on Linux) be exactly the same at the binary
level?

Thanks,
--Maciej



> -----Original Message-----
> From: Magesh Umasankar [mailto:umagesh@apache.org]
> Sent: Friday, December 07, 2001 2:46 AM
> To: Ant Users List
> Subject: Re: Tar task weird behavior on Linux
>
>
> From: "Maciej Zawadzki" <mb...@urbancode.com>
>
> > run an Ant script with the fragment below, the .gz file that is created
> > contains a .tar[1] file rather than a .tar file.  This only happens if I
> > execute the ant script on Linux, it works fine on Windows 2000.
> >
> >         <!-- .tar.gz all the source code to the deploy directory -->
> >         <tar tarfile="${dist.dir}/${name}-${version}-src.tar"
> >             basedir="${src.dir}" />
> >         <gzip
> > zipfile="${deployDir}/${download.dir}/${name}-${version}-src.tar.gz"
> >             src="${dist.dir}/${name}-${version}-src.tar" />
> >         <delete file="${dist.dir}/${name}-${version}-src.tar"/>
> >
>
> How did you check what files are contained inside the gz file?
>
> Did you use native
>
> gzip -l
>
> or
>
> gzip --list
>
> ?  If not, will you please ensure that?
>
> Magesh
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tar task weird behavior on Linux

Posted by Magesh Umasankar <um...@apache.org>.
From: "Maciej Zawadzki" <mb...@urbancode.com>

> run an Ant script with the fragment below, the .gz file that is created
> contains a .tar[1] file rather than a .tar file.  This only happens if I
> execute the ant script on Linux, it works fine on Windows 2000.
> 
>         <!-- .tar.gz all the source code to the deploy directory -->
>         <tar tarfile="${dist.dir}/${name}-${version}-src.tar"
>             basedir="${src.dir}" />
>         <gzip
> zipfile="${deployDir}/${download.dir}/${name}-${version}-src.tar.gz"
>             src="${dist.dir}/${name}-${version}-src.tar" />
>         <delete file="${dist.dir}/${name}-${version}-src.tar"/>
> 

How did you check what files are contained inside the gz file?

Did you use native

gzip -l

or 

gzip --list

?  If not, will you please ensure that?

Magesh




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>