]> Dogcows Code - chaz/tar/commitdiff
Version 1.22
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 5 Mar 2009 07:22:56 +0000 (07:22 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 5 Mar 2009 07:22:56 +0000 (07:22 +0000)
NEWS
configure.ac
doc/tar.texi
lib/.cvsignore
src/buffer.c
src/incremen.c
src/suffix.c
src/tar.c

diff --git a/NEWS b/NEWS
index 5324a4d98adf2d24f20c63fb3b3d1a4041c8b2fd..088dbfb298681dd158a738cbf0ad0e8833e732b5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,31 +1,25 @@
-GNU tar NEWS - User visible changes. 2009-03-04
+GNU tar NEWS - User visible changes. 2009-03-05
 Please send GNU tar bug reports to <bug-tar@gnu.org>
 
 \f
-version 1.21.90 (CVS)
+version 1.22 - Sergey Poznyakoff, 2009-03-05
 
 * Support for xz compression
 
-Tar uses xz for compression if at least one of the following
-conditions is met: 
+Tar uses xz for compression if one of the following conditions is met: 
 
  1. The option --xz or -J (see below) is used.
  2. The xz binary is set as compressor using --use-compress-program option.
  3. The file name of the archive being created ends in `.xz' and
  auto-compress option (-a) is used.
 
-Xz is used for decompression if at least one of the following
-conditions is met: 
+Xz is used for decompression if one of the following conditions is met: 
 
  1. The option --xz or -J is used.
  2. The xz binary is set as compressor using --use-compress-program option.
  3. The file is recognized as xz compressed stream data.
 
-* Short option -J
-
-The decision to assign -J option was taken just before the XZ format
-has been officially declared stable.  Now, that stable xz tools are
-available, the -J option is re-assigned as a short equivalent of --xz.
+* Short option -J reassigned as a short equivalent of --xz
 
 * New option -I
 
index 3acc73e0dbb22613548aa18f2349bc79cc81a2e0..762f8e4576dbf536893c172584f55593b9066e19 100644 (file)
@@ -1,7 +1,7 @@
 # Configure template for GNU tar.  -*- autoconf -*-
 
 # Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301, USA.
 
-AC_INIT([GNU tar], [1.21.90], [bug-tar@gnu.org])
+AC_INIT([GNU tar], [1.22], [bug-tar@gnu.org])
 AC_CONFIG_SRCDIR([src/tar.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_HEADERS([config.h:config.hin])
index 3813168a9d19c701eb26ee41c087a89e1bf4216b..7d8952bb9ebdb432961f878f41a53ab837470a96 100644 (file)
@@ -35,7 +35,7 @@ This manual is for @acronym{GNU} @command{tar} (version
 from archives.
 
 Copyright @copyright{} 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
-2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
index 93c66b740f72d097f4a83cb9345fb7ec95a26379..3058d1d5841339b329de5d29c7274cd1996c8da1 100644 (file)
@@ -188,6 +188,7 @@ savedir.c
 savedir.h
 setenv.c
 setenv.h
+size_max.h
 sleep.c
 snprintf.c
 stat-macros.h
index a646202a8421323c88cb0ae5865230f89f8a6e05..8edc257fe63ba27510eae8a4153ee2b02c48bf0b 100644 (file)
@@ -1,7 +1,7 @@
 /* Buffer management for tar.
 
    Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001,
-   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    Written by John Gilmore, on 1985-08-25.
 
index 7e1e36641e74b71b74d3d2f879adda761b0c24a9..cd32e196aed99bf5b17f55595387bb973f27d15c 100644 (file)
@@ -407,11 +407,14 @@ update_parent_directory (const char *name)
   free (p);
 }
 
+#define PD_VERBOSE        0x10
+#define PD_FORCE_CHILDREN 0x20
+#define PD_CHILDREN(f) ((f) & 3)
+
 static struct directory *
 procdir (char *name_buffer, struct stat *stat_data,
         dev_t device,
-        enum children children,
-        bool verbose,
+        int flag,
         char *entry)
 {
   struct directory *directory;
@@ -485,7 +488,7 @@ procdir (char *name_buffer, struct stat *stat_data,
        {
          if (strcmp (d->name, name_buffer))
            {
-             if (verbose)
+             if (flag & PD_VERBOSE)
                WARN ((0, 0, _("%s: Directory has been renamed from %s"),
                       quotearg_colon (name_buffer),
                       quote_n (1, d->name)));
@@ -498,7 +501,7 @@ procdir (char *name_buffer, struct stat *stat_data,
       else
        {
          DIR_SET_FLAG (directory, DIRF_NEW);
-         if (verbose)
+         if (flag & PD_VERBOSE)
            WARN ((0, 0, _("%s: Directory is new"),
                   quotearg_colon (name_buffer)));
          directory->children =
@@ -517,43 +520,48 @@ procdir (char *name_buffer, struct stat *stat_data,
       /* ... except if it was explicitely given in the command line */
       && !is_individual_file (name_buffer))
     directory->children = NO_CHILDREN;
-  else if (children == ALL_CHILDREN)
-    directory->children = ALL_CHILDREN;
-
+  else if (flag & PD_FORCE_CHILDREN)
+    {
+      directory->children = PD_CHILDREN(flag);
+      if (directory->children == NO_CHILDREN)
+       *entry = 'N';
+    }
+         
   DIR_SET_FLAG (directory, DIRF_INIT);
 
-  {
-    const char *tag_file_name;
-
-    switch (check_exclusion_tags (name_buffer, &tag_file_name))
-      {
-      case exclusion_tag_all:
-       /* This warning can be duplicated by code in dump_file0, but only
-          in case when the topmost directory being archived contains
-          an exclusion tag. */
-       exclusion_tag_warning (name_buffer, tag_file_name,
-                              _("directory not dumped"));
-       if (entry)
-         *entry = 'N';
-       directory->children = NO_CHILDREN;
-       break;
-
-      case exclusion_tag_contents:
-       exclusion_tag_warning (name_buffer, tag_file_name,
-                              _("contents not dumped"));
-       directory->children = NO_CHILDREN;
-       break;
+  if (directory->children != NO_CHILDREN)
+    {
+      const char *tag_file_name;
 
-      case exclusion_tag_under:
-       exclusion_tag_warning (name_buffer, tag_file_name,
-                              _("contents not dumped"));
-       directory->tagfile = tag_file_name;
-       break;
+      switch (check_exclusion_tags (name_buffer, &tag_file_name))
+       {
+       case exclusion_tag_all:
+         /* This warning can be duplicated by code in dump_file0, but only
+            in case when the topmost directory being archived contains
+            an exclusion tag. */
+         exclusion_tag_warning (name_buffer, tag_file_name,
+                                _("directory not dumped"));
+         if (entry)
+           *entry = 'N';
+         directory->children = NO_CHILDREN;
+         break;
 
-      case exclusion_tag_none:
-       break;
-      }
-  }
+       case exclusion_tag_contents:
+         exclusion_tag_warning (name_buffer, tag_file_name,
+                                _("contents not dumped"));
+         directory->children = NO_CHILDREN;
+         break;
+         
+       case exclusion_tag_under:
+         exclusion_tag_warning (name_buffer, tag_file_name,
+                                _("contents not dumped"));
+         directory->tagfile = tag_file_name;
+         break;
+         
+       case exclusion_tag_none:
+         break;
+       }
+    }
 
   return directory;
 }
@@ -645,7 +653,7 @@ scan_directory (char *dir, dev_t device)
   size_t name_length;          /* used length in name_buffer */
   struct stat stat_data;
   struct directory *directory;
-
+  
   if (! dirp)
     savedir_error (dir);
 
@@ -667,8 +675,7 @@ scan_directory (char *dir, dev_t device)
       return NULL;
     }
 
-  directory = procdir (name_buffer, &stat_data, device, NO_CHILDREN, false,
-                      NULL);
+  directory = procdir (name_buffer, &stat_data, device, 0, NULL);
 
   if (dirp && directory->children != NO_CHILDREN)
     {
@@ -707,10 +714,13 @@ scan_directory (char *dir, dev_t device)
 
              if (S_ISDIR (stat_data.st_mode))
                {
+                 int pd_flag = (verbose_option ? PD_VERBOSE : 0);
+                 if (!recursion_option)
+                   pd_flag |= PD_FORCE_CHILDREN | NO_CHILDREN;
+                 else if (directory->children == ALL_CHILDREN)
+                   pd_flag |= PD_FORCE_CHILDREN | ALL_CHILDREN;
                  *entry = 'D';
-                 procdir (name_buffer, &stat_data, device,
-                          directory->children,
-                          verbose_option, entry);
+                 procdir (name_buffer, &stat_data, device, pd_flag, entry);
                }
 
              else if (one_file_system_option && device != stat_data.st_dev)
index 9080fd6f0cf3f6933700ccabd988b8b86321db7c..6dbc68e2d5a516eddb26f737cda704b9031299ee 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of GNU tar.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    Written by Sergey Poznyakoff.
 
index 8c83959655b3a0301f02051e9111010b240d2c1c..dbffc2a983be5462ce4ce988d140ac978ef76122 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -1,7 +1,7 @@
 /* A tar (tape archiver) program.
 
    Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
-   2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   2001, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
 
    Written by John Gilmore, starting 1985-08-25.
 
This page took 0.041495 seconds and 4 git commands to generate.