delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/26/09:35:18

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: Yes, hits=6.4 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DONT_USE_RAW_EMAIL_IN_BODY,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_CV,TW_RV,TW_TV,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <AANLkTikQ9DFY7cfn1-A4jqqn7ypAg5VUamAD4_FmMRci@mail.gmail.com>
References: <AANLkTikQ9DFY7cfn1-A4jqqn7ypAg5VUamAD4_FmMRci AT mail DOT gmail DOT com>
Date: Thu, 26 Aug 2010 09:35:00 -0400
Message-ID: <AANLkTimDNVBCg+bm5PA98eQ1FxC8utghg+p5dX9TDOOC@mail.gmail.com>
Subject: Re: Possible tar version 1.23-1 --remove-files bug.
From: Jeremy Warren <jerwah AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I have now compiled and verified the problem exists in Linux as well
in the Gnu Tar 1.23-1 release, and is not a cygwin specific bug.  I
have submitted to bug-tar.

Sorry for the false alarm.

On Thu, Aug 26, 2010 at 8:57 AM, Jeremy Warren <jerwah AT gmail DOT com> wrote:
> I have additionally verified now that rolling back to version : tar
> (GNU tar) 1.22.90 does not exhibit this problem.
>
>
>
> -----Original Message-----
> From: Jeremy Warren [mailto:jerwah AT gmail DOT com]
> Sent: Thursday, August 26, 2010 12:49 AM
> To: cygwin AT cygwin DOT com
> Subject: Possible tar version 1.23-1 --remove-files bug.
>
> I have duplicated the following behavior on 2 different machines
> CYGWIN_NT-5.2 1.7.6(0.230/5/3) 2010-08-16 16:06 i686 =A0(Windows 2003 R2 =
Server)
> CYGWIN_NT-5.1 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 =A0(Windows XP Deskt=
op)
> Both are running tar version 1.23-1 and the problem is 100%
> reproducible in my environment.
>
> *Some editing has been made to the output to protect the innocent.
> Any discrepancies in the output are unlikely related to the problem
> itself and more likely caused by my sausage shaped fingers.
>
> Scenario:
> Given a directory with sample contents:
> $ ls
> file1.asc =A0file2.asc =A0file3.asc =A0file4.asc
>
> the following command:
> $ tar --remove-files -cvf test.tar *.asc
> file1.asc
> file2.asc
> file3.asc
> file4.asc
>
> Produces the expected result of a single test.tar, with the 4 asc files r=
emoved.
>
> $ ls
> test.tar
>
> And the tarball correctly contains all 4 files.
>
> $ tar -tvf test.tar
> -rw-r--r-- XXXXXXXXXXXXXX/None 22 2010-08-26 00:07 file1.asc
> -rw-r--r-- XXXXXXXXXXXXXX/None 22 2010-08-26 00:07 file2.asc
> -rw-r--r-- XXXXXXXXXXXXXX/None 22 2010-08-26 00:07 file3.asc
> -rw-r--r-- XXXXXXXXXXXXXX/None 22 2010-08-26 00:07 file4.asc
>
>
> *** PROBLEM STARTS HERE ***
>
> The following command, using the -r (append -vs- create) switch,
> correctly produces a test.tar file with all 4 files but fails to
> delete the files.
> $ tar --remove-files -rvf test.tar *.asc
> file1.asc
> file2.asc
> file3.asc
> file4.asc
>
> $ ls
> file1.asc =A0file2.asc =A0file3.asc =A0file4.asc =A0test.tar
>
> $ tar -tvf test.tar
> -rw-r--r-- XXXXXXXXXXXXXX/None 22 2010-08-26 00:11 file1.asc
> -rw-r--r-- XXXXXXXXXXXXXX/None 22 2010-08-26 00:11 file2.asc
> -rw-r--r-- XXXXXXXXXXXXXX/None 22 2010-08-26 00:11 file3.asc
> -rw-r--r-- XXXXXXXXXXXXXX/None 22 2010-08-26 00:11 file4.asc
>
> A return code of zero is produced in either instance, and the tarballs
> created are both fully usable. =A0There is a second scenario where all
> asc files are deleted except the last one (so test.tar and file4 would
> be left in the directory at completion) but as of yet I cannot
> reproduce that scenario at will, so I'm uncertain as to the exact
> startup conditions that cause it.
>
> In my situation using -c is not a solution since this command is
> embedded within a large loop. =A0 Each file is being processed and
> appended to the archive one at a time. =A0The processing script worked
> without issue prior to upgrading to the 1.23-1 version tar within the
> last week or so.
>
> *** Other possibly relevant pieces of information: ***
>
> I verified using a Linux box (2.6.18-164.9.1.el5.centos.plus) running
> tar (GNU tar) 1.15.1 to verify that my expectations of the command
> were correct.
>
> $ ls
> file1.asc =A0file2.asc =A0file3.asc =A0file4.asc
>
> $ tar --remove-files -rvf test.tar *.asc
> file1.asc
> file2.asc
> file3.asc
> file4.asc
>
> $ ls
> test.tar
>
> $ tar -tvf test.tar
> -rw-r--r-- XXXXXXXXXXXXXX/XXXXXXXXXXXXXX 22 2010-08-26 00:15:28 file1.asc
> -rw-r--r-- XXXXXXXXXXXXXX/XXXXXXXXXXXXXX 22 2010-08-26 00:15:28 file2.asc
> -rw-r--r-- XXXXXXXXXXXXXX/XXXXXXXXXXXXXX 22 2010-08-26 00:15:28 file3.asc
> -rw-r--r-- XXXXXXXXXXXXXX/XXXXXXXXXXXXXX 22 2010-08-26 00:15:28 file4.asc
>
> Cygwin was installed from different mirrors at different times on each ma=
chine.
>
> It appears from the release notes that some changes were made in
> 1.23-1 related to the --remove-files argument
> "** The --remove-files option removes files only if they were
> succesfully stored in the archive."
>
> I was unable to find any related issues in the archive but was having
> trouble making the archive search match the '--remove-files' switch in
> the query. =A0Apologies in advance if I duped.
>
> Thanks,
> Jeremy
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019