1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00

Fix bug with --one-file-system and --listed-incremental.

This is important for at least misc/amanda-client.

Submitted by:	John Hein <jhein@symmetricom.com>
Obtained from:	upstream
This commit is contained in:
Christian Weisgerber 2010-11-27 20:31:19 +00:00
parent 4580d71cd6
commit 2132f91195
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=265294
5 changed files with 62 additions and 3 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= tar
PORTVERSION= 1.25
PORTREVISION= 1
CATEGORIES= archivers sysutils
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}

View File

@ -2,9 +2,9 @@ $FreeBSD$
Don't install lib/charset.alias.
--- gnu/Makefile.in.orig 2010-03-17 21:55:42.000000000 +0100
+++ gnu/Makefile.in 2010-03-17 21:56:32.000000000 +0100
@@ -1860,7 +1860,7 @@ langinfo.h: langinfo.in.h $(CXXDEFS_H) $
--- gnu/Makefile.in.orig 2010-11-07 14:53:46.000000000 +0100
+++ gnu/Makefile.in 2010-11-27 21:07:28.000000000 +0100
@@ -1957,7 +1957,7 @@ langinfo.h: langinfo.in.h $(CXXDEFS_H) $
# avoid installing it.
all-local: charset.alias ref-add.sed ref-del.sed

View File

@ -0,0 +1,15 @@
$FreeBSD$
Fix bug with --one-file-system and --listed-incremental.
--- src/create.c.orig 2010-11-01 21:34:59.000000000 +0100
+++ src/create.c 2010-11-27 21:12:55.000000000 +0100
@@ -1680,7 +1680,7 @@ dump_file0 (struct tar_stat_info *st, ch
This check is omitted if incremental_option is set *and* the
requested file is not explicitely listed in the command line. */
- if (!(incremental_option && !is_individual_file (p))
+ if (! (incremental_option && ! top_level)
&& !S_ISDIR (st->stat.st_mode)
&& OLDER_TAR_STAT_TIME (*st, m)
&& (!after_date_option || OLDER_TAR_STAT_TIME (*st, c)))

View File

@ -0,0 +1,28 @@
$FreeBSD$
Fix bug with --one-file-system and --listed-incremental.
--- src/incremen.c.orig 2010-10-24 20:07:55.000000000 +0200
+++ src/incremen.c 2010-11-27 21:08:05.000000000 +0100
@@ -426,7 +426,6 @@ procdir (const char *name_buffer, struct
{
struct directory *directory;
struct stat *stat_data = &st->stat;
- dev_t device = st->parent ? st->parent->stat.st_dev : 0;
bool nfs = NFS_FILE_STAT (*stat_data);
if ((directory = find_directory (name_buffer)) != NULL)
@@ -540,11 +539,8 @@ procdir (const char *name_buffer, struct
}
}
- /* If the directory is on another device and --one-file-system was given,
- omit it... */
- if (one_file_system_option && device != stat_data->st_dev
- /* ... except if it was explicitely given in the command line */
- && !is_individual_file (name_buffer))
+ if (one_file_system_option && st->parent
+ && stat_data->st_dev != st->parent->stat.st_dev)
/* FIXME:
WARNOPT (WARN_XDEV,
(0, 0,

View File

@ -0,0 +1,15 @@
$FreeBSD$
Fix bug with --one-file-system and --listed-incremental.
--- src/names.c.orig 2010-10-24 20:07:55.000000000 +0200
+++ src/names.c 2010-11-27 21:11:20.000000000 +0100
@@ -360,8 +360,6 @@ name_next_elt (int change_dirs)
{
if (unquote_option)
unquote_string (name_buffer);
- if (incremental_option)
- register_individual_file (name_buffer);
entry.type = ep->type;
entry.v.name = name_buffer;
return &entry;