[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tar -I incompatibility



>>>>> " " == Paul Eggert <eggert@twinsun.com> writes:

    >> Date: Sun, 7 Jan 2001 12:07:14 -0500 From: Michael Stone
    >> <mstone@debian.org>

    >> I certainly hope that the debian version at least prevents
    >> serious silent breakage by either reverting the change to -I
    >> and printing a message that the option is deprecated or
    >> removing the -I flag entirely.

     > Why would deprecating or removing the -I flag help prevent
     > serious silent breakage?  I would think that most people using
     > -I in the 1.13.17 sense would use it like this:

     > tar -xIf archive.tar

     > and this silently breaks in 1.13.18 only in the unlikely case
     > where "f" is a readable tar file.

% tar --version
tar (GNU tar) 1.13.18
Copyright 2000 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.
% tar -cIvvf bla.tar.bz2 bla
tar: bla: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
% mkdir bla
% tar -cIvvf bla.tar.bz2 bla
drwxr-xr-x mrvn/mrvn         0 2001-01-07 22:50:27 bla/
% file bla.tar.bz2          
bla.tar.bz2: GNU tar archive
% tar -tIvvf bla.tar.bz2             
drwxr-xr-x mrvn/mrvn         0 2001-01-07 22:50:27 bla/

As you see -I is silently ignored in violation to
/usr/share/doc/tar/NEWS.gz:

* The short name of the --bzip option has been changed to -j,
  and -I is now an alias for -T, for compatibility with Solaris tar.

Thats part of the problem, people won't get any error message at the
moment. Everything looks fine until you compare the size, run file or
try to bunzip the file manually.

As I said before tar -I in its old useage should give one of several
errors, but doesn't. Can't remeber the bug number, but its in the BTS.

     > I'm not entirely opposed to deprecating -I for a while -- but I
     > want to know why it's helpful to do this before installing such
     > a change.

If its depreciated people will get a message every time they use
-I. cron jobs will generate a mail every time they run.
Just think how anoying a daily mail is and how fast people will change
the option.
BUT nothing will break, no data will be lost.

On the other hand, just changing the meaning or deleting the option
will result in severe breakage in 3rd party software. Sometimes
without even giving a hint of the cause. You know how bad 3rd party
software can be. :)

MfG
        Goswin



Reply to: