[vox-tech] tar question

Peter Jay Salzman vox-tech@lists.lugod.org
Tue, 4 Jun 2002 16:12:25 -0700


i don't know if most of us are qualified to do this.  file util
programming can be very tricky.

as proof, if you come to tonight's meeting, i'm going to talk about a
*very* interesting race condition with rm.

pete "i have as much free time as mark, perhaps less" salzman


begin Mark K. Kim <markslist@cbreak.org> 
> It's a chance for someone to contribute to OSS... someone go for it.
> 
> -Mark "no-time" Kim
> 
> On Tue, 4 Jun 2002, Shawn P. Neugebauer wrote:
> 
> > On Tuesday 04 June 2002 02:23 pm, you wrote:
> > > On Tuesday 04 June 2002 12:54 pm, you wrote:
> > > [snip]
> > >
> > > > it _sucks royally_ that tar seems to destroy the archive when you delete
> > > > an unknown file:
> > > >
> > > >    p@satan% file test.tar
> > > >    test.tar: GNU tar archive
> > > >    p@satan% tar f test.tar --delete "test/biteme"
> > > >    tar: test/biteme: Not found in archive
> > > >    tar: Error exit delayed from previous errors
> > > >    p@satan% file test.tar
> > > >    test.tar: data
> > >
> > > it also deletes the archive if you don't list a file (or files).  yes, this
> > > is weird and were it not consistent i would call it a bug, but it's
> > > probably some kind of "feature."
> >
> > well, this *is* a bug!  i noticed it when testing stuff to answer pete's
> > question, but ignored it.  then we pete mentioned it again, i started
> > poking around.  can't find any mention of it anywhere.  however, the
> > tar man/info page at gnu.org says
> >   "if you list no member names, nothing will be deleted"
> > and this is clearly violated.  as pete noticed, it also destroys the
> > archive if a member name is not actually a member.
> >
> > i reported this to bugzilla.redhat.com for version 7.1 and got a
> > quick reply that "it works in 7.3."  however, i just tested it with 7.3
> > and it's broken there, too; i added a comment to this.
> >
> > FYI, this is tar-1.13.19-4 on RH 7.1 and tar-1.13.25-4 on RH 7.3.
> >
> > shawn.