[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] keep newer files bug?
From: |
Helmut Waitzmann |
Subject: |
Re: [Bug-tar] keep newer files bug? |
Date: |
Wed, 25 May 2005 14:35:14 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Sergey Poznyakoff <address@hidden> writes:
>Helmut Waitzmann <address@hidden> wrote:
>
>> So, what will tar --keep-newer-files -x do, if the archive member to be
>> extracted is newer than the file in the filesystem?
>It will unlink the old file and create a new one.
This is a contradiction to my testcases. Please check again:
I wrote:
>>> 25 $ tar -tv -f archive.tar
>>> 26 -rw------- helmut/helmut 5 2005-05-23 23:41:39 file
>>> 39 $ ls -dogi -ctr -- \
>>> 40 1/older/keep-newer-files/file
>>> 62 831408 -rw------- 2 0 2005-05-23 23:41:35+0200
>>> 1/older/keep-newer-files/file
>>> 82 $ tar -x -f archive.tar --keep-newer-files \
>>> 83 -- -C 1/older/keep-newer-files
>>> 84 tar: file: Warning: Cannot stat: No such file or directory
>>> 85 tar: Current `file' is newer
>>> 86 $ ls -dogi -ctr -- 1/older/keep-newer-files/file
>>> 87 ls: 1/older/keep-newer-files/file: No such file or directory
>>>When extracting files, tar's option '--keep-newer-files' reveals some
>>>errors:
>>>
>>>First condition: The file in the file system is OLDER than the archive
>>>member to be extracted from the archive.
>>>
>>>So tar should extract it.
>>>
>>>(1) As can be seen in lines 82 to 87, tar does not do that: It unlinks
>>> the file but fails to extract the archive member, which is an ERROR.
In the archive, there is a member "file" (see lines 25 to 26).
In the directory "1/older/keep-newer-files", there is a file "file"
(lines 39, 40, and 62), which is OLDER than the archive member.
When extracting the archive into the directory "1/older/keep-newer-files"
(lines 82 to 85), the file should be replaced by the archive member
(because it OLDER than the archive member).
Now, look at lines 86 to 87: The old file is removed (this is CORRECT),
but the archive member is NOT extracted, which is an ERROR.
Please run my script (in a empty directory). What are your results? You
don't get the error message in line 87?
--
Wenn Sie mir E-Mail schreiben, stellen | When writing me e-mail, please
Sie bitte vor meine E-Mail-Adresse | precede my e-mail address with
meinen Vor- und Nachnamen, etwa so: | my full name, like
Helmut Waitzmann <address@hidden>, (Helmut Waitzmann) address@hidden
- [Bug-tar] keep newer files bug?, Andrea Pellizzon, 2005/05/06
- Re: [Bug-tar] keep newer files bug?, Sergey Poznyakoff, 2005/05/10
- Re: [Bug-tar] keep newer files bug?, Helmut Waitzmann, 2005/05/23
- Re: [Bug-tar] keep newer files bug?, Sergey Poznyakoff, 2005/05/24
- Re: [Bug-tar] keep newer files bug?, Helmut Waitzmann, 2005/05/25
- Re: [Bug-tar] keep newer files bug?, Sergey Poznyakoff, 2005/05/25
- Re: [Bug-tar] keep newer files bug?, Helmut Waitzmann, 2005/05/25
- Re: [Bug-tar] keep newer files bug?, Sergey Poznyakoff, 2005/05/25