bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gnu tar w/ --listed-incremental --files-from


From: Stepan Kasal
Subject: Re: gnu tar w/ --listed-incremental --files-from
Date: Mon, 27 Jan 2003 15:06:39 +0100
User-agent: Mutt/1.2.5.1i

Hello,

On Sun, Jan 26, 2003 at 05:33:20PM +0100, Miek Gieben wrote:
> [On 22 Jan, @15:26, Stepan wrote in "Re: gnu tar w/ --listed-increm ..."]
> > OK, I'd say this _is_ a bug.
> 
> i believe the following patch fixes the problem:
> 
> grtz Miek
> 
> 
> --- tar-orig-1.13/src/create.c        Wed Jul  7 07:27:04 1999
> +++ tar-1.13/src/create.c     Sun Jan 26 17:21:43 2003
> @@ -855,7 +855,7 @@
>    /* See if we only want new files, and check if this one is too old to
>       put in the archive.  */
>  
> -  if (!incremental_option && !S_ISDIR (current_stat.st_mode)
> +  if (incremental_option && !S_ISDIR (current_stat.st_mode)
>        && current_stat.st_mtime < newer_mtime_option
>        && (!after_date_option || current_stat.st_ctime < newer_ctime_option))
>      {

I don't think so.  This section seems to remove old files from the list
if you call tar --newer-mtime, without ``--listed-incremental.''

Your patch seems to brak this case.

Generally, tar --newer-xxxtime should pack all files whose xxxtime is newer
then a certain limit, while --listed-incremental should pack all files
not listed in the list of files backed-up previously.

So your problems with --listed-incremental should not be fixed by any
time comparisons.

It's yet to be determined (perhaps by reading the manual) what should
happen when both --listed-incremental and --newer-xxxtime are given.
But I'd say this is next level of the game and we are not allowed to
proceed there until we fix the easier cases; for the time being, I'd
suppose that the combination is not allowed and yields an undefined
behaviour.

Good luck,
        Stepan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]