Re: [Bug-tar] Bug with files which have hardlinks

2010-10-11 Thread Bob Proulx
Sergey Poznyakoff wrote:
 Bob Proulx ha escrit:
  Why did having afile hardlinked to another file change the behavior of
  tar?  Why did having afile's hardlink count greater than 1 cause tar
  to think that afile was a hardlink to afile?
 
 Tar uses a kind of guesswork to decide whether a file is a hard link
 to another already archived file.  It keeps a table of device/inode
 numbers for each archived file.  When a new file is added to the archive
 its device/inode numbers are looked up in this table.  If a matching
 entry is found, the file is deemed to be a hard link to that entry.
 This algorithm is triggered only if the link count of the file
 being added is greater than 1 (well, I'm simplifying a bit, because
 in some cases it is compared with 0, but that doesn't matter here).

Ah!  That makes sense.  That explains the behavior that Thomas Graf
was reporting in the original report.  And normally I would say that
it was good enough but I see that Paul reports that it was improved
just recently so even better.

Thanks,
Bob



Re: [Bug-tar] Bug with files which have hardlinks

2010-10-11 Thread Bob Proulx
Paul Eggert wrote:
 Bob Proulx wrote:
  Why did having afile hardlinked to another file change the behavior of
  tar?
 
 You're absolutely right, and this bug was fixed in August:
 
 http://git.savannah.gnu.org/cgit/tar.git/commit/?id=37ddfb0b7eb41cc3f58bce686d389b1e965e9ccf
 
 and this fix should appear in the next release.

Very good!  Then issue that Thomas Graf reported appears to be
resolved and will propagate as the new version is adopted.

Thanks!
Bob



[Bug-tar] [PATCH] gnulib: sync from latest gnulib, notably bootstrap and parse-datetime

2010-10-11 Thread Paul Eggert
* bootstrap: Sync from gnulib.
* doc/.gitignore: Rename getdate.texi to parse-datetime.texi.
* doc/Makefile.am (tar_TEXINFOS): Likewise.
* doc/tar.texi (Top): Adjust to renaming of getdate to parse-datetime.
* gnulib.modules: Likewise.  Also, remove ftruncate (now obsolete).
And add inttostr (we missed this dependency).
* src/tar.c: Include parse-datetime.h, not getdate.h.  All calls
to get_date replaced with parse_datetime.
---
 bootstrap   |  574 +++
 doc/.gitignore  |2 +-
 doc/Makefile.am |2 +-
 doc/tar.texi|4 +-
 gnulib.modules  |4 +-
 src/tar.c   |4 +-
 6 files changed, 372 insertions(+), 218 deletions(-)

diff --git a/bootstrap b/bootstrap
index 4d86ff2..2b3f24b 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,8 +1,10 @@
 #! /bin/sh
+# Print a version string.
+scriptversion=2010-10-08.16; # UTC
 
 # Bootstrap this package from checked-out sources.
 
-# Copyright (C) 2003-2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003-2010 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
@@ -17,7 +19,15 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see http://www.gnu.org/licenses/.
 
-# Written by Paul Eggert and Sergey Poznyakoff.
+# Originally written by Paul Eggert.  The canonical version of this
+# script is maintained as build-aux/bootstrap in gnulib, however, to
+# be useful to your project, you should place a copy of it under
+# version control in the top-level directory of your project.  The
+# intent is that all customization can be done with a bootstrap.conf
+# file also maintained in your version control; gnulib comes with a
+# template build-aux/bootstrap.conf to get you started.
+
+# Please report bugs or propose patches to bug-gnu...@gnu.org.
 
 nl='
 '
@@ -34,21 +44,16 @@ bt_regex=`echo $bt| sed 's/\./[.]/g'`
 bt2=${bt}2
 
 usage() {
-  echo 2 \
+  cat EOF
 Usage: $0 [OPTION]...
 Bootstrap this package from the checked-out sources.
 
 Options:
- --paxutils-srcdir=DIRNAME  Specify the local directory where paxutils
-  sources reside. Use this if you already
-  have paxutils sources on your machine, and
-  do not want to waste your bandwidth dowloading
-  them again.
  --gnulib-srcdir=DIRNAME  Specify the local directory where gnulib
   sources reside.  Use this if you already
   have gnulib sources on your machine, and
   do not want to waste your bandwidth downloading
-  them again.
+  them again.  Defaults to \$GNULIB_SRCDIR.
  --copy   Copy files instead of creating symbolic links.
  --force  Attempt to bootstrap even if the sources seem
   not to have been checked out.
@@ -57,8 +62,11 @@ Options:
 If the file $0.conf exists in the same directory as this script, its
 contents are read as shell variables to configure the bootstrap.
 
+For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
+are honored.
+
 Running without arguments will suffice in most cases.
-
+EOF
 }
 
 # Configuration.
@@ -72,13 +80,22 @@ gnulib_modules=
 # Any gnulib files needed that are not in modules.
 gnulib_files=
 
+# A function to be called to edit gnulib.mk right after it's created.
+# Override it via your own definition in bootstrap.conf.
+gnulib_mk_hook() { :; }
+
+# A function to be called after everything else in this script.
+# Override it via your own definition in bootstrap.conf.
+bootstrap_epilogue() { :; }
+
 # The command to download all .po files for a specified domain into
 # a specified directory.  Fill in the first %s is the domain name, and
 # the second with the destination directory.  Use rsync's -L and -r
 # options because the latest/%s directory and the .po files within are
 # all symlinks.
 po_download_command_format=\
-rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'
+rsync --delete --exclude '*.s1' -Lrtvz \
+ 'translationproject.org::tp/latest/%s/' '%s'
 
 extract_package_name='
   /^AC_INIT(/{
@@ -108,14 +125,14 @@ tests_base=tests
 
 # Extra files from gnulib, which override files from other sources.
 gnulib_extra_files=
-   $build_aux/install-sh
-   $build_aux/missing
-   $build_aux/mdate-sh
-   $build_aux/texinfo.tex
-   $build_aux/depcomp
-   $build_aux/config.guess
-   $build_aux/config.sub
-   doc/INSTALL
+$build_aux/install-sh
+$build_aux/missing
+$build_aux/mdate-sh
+$build_aux/texinfo.tex
+$build_aux/depcomp
+$build_aux/config.guess
+$build_aux/config.sub
+doc/INSTALL
 
 
 # Additional gnulib-tool options to use.  Use