bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] --listed-incremental + --no-recursion + --files-from bug


From: Miek Gieben
Subject: Re: [Bug-tar] --listed-incremental + --no-recursion + --files-from bug
Date: Sat, 2 Jul 2005 10:32:20 +0200
User-agent: Vim/Mutt/Linux

[On 18 Jun, @14:19, Miek Gieben wrote in "Re: [Bug-tar] --listed-increme ..."]
> [On 18 Jun, @12:18, Sergey Poznyakoff wrote in "Re: [Bug-tar] 
> --listed-increme ..."]
> > It appeared to me that --exclude or --exclude-from might help in your
> > case. Have you tried it?
> 

<SNIP>

> As you said in your other mail concerning this, you are working
> on it. Do you accept patches?

to come back to this. This following patch solves (at least my)
problem when you specify all the options above and tar creates a tar
file with everything in it, three times.

The patch is against 1.15.1:

--- tar-1.15.1/src/create.c     2004-10-04 11:21:31.000000000 +0200
+++ tar-1.15.1.local/src/create.c       2005-06-30 13:35:51.647593741 +0200
@@ -1175,7 +1175,14 @@
                          buffer = xrealloc (buffer, buffer_size);
                        }
                      strcpy (buffer + plen, q + 1);
-                     dump_file (buffer, -1, (dev_t) 0);
+                     /* Hack to make --listed-incremental and
+                      * --files-from and --no-recursion work;
+                      */
+                     if (!listed_incremental_option &&
+                                     !files_from_option &&
+                                     !recursion_option) {
+                             dump_file (buffer, -1, (dev_t) 0);
+                     }
                    }
                  q += qlen + 1;
                }

This patch does what I found out and mailed to bug-tar in this
message:
http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00064.html

Thanks,

--
grtz,
  - Miek

http://www.miek.nl                      http://www.nlnetlabs.nl
PGP Key ID: 0xB18453A1
fingerprint: 002B B079 0DDA 7D44 2B5C  CAB0 C3B7 F943 B184 53A1

Attachment: signature.asc
Description: Digital signature


reply via email to

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