1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
$NetBSD: patch-ab,v 1.8 2002/11/20 16:57:55 bouyer Exp $
--- src/tar.c.orig Fri Sep 21 02:11:27 2001
+++ src/tar.c Sun Nov 17 18:24:55 2002
@@ -136,6 +136,7 @@
NEWER_MTIME_OPTION,
NO_ANCHORED_OPTION,
NO_IGNORE_CASE_OPTION,
+ NO_UNLINK_FIRST_OPTION,
NO_WILDCARDS_OPTION,
NO_WILDCARDS_MATCH_SLASH_OPTION,
NULL_OPTION,
@@ -233,6 +234,7 @@
{"no-recursion", no_argument, &recursion_option, 0},
{"no-same-owner", no_argument, &same_owner_option, -1},
{"no-same-permissions", no_argument, &same_permissions_option, -1},
+ {"no-unlink-first", no_argument, NULL, NO_UNLINK_FIRST_OPTION},
{"numeric-owner", no_argument, &numeric_owner_option, 1},
{"old-archive", no_argument, 0, 'o'},
{"one-file-system", no_argument, 0, 'l'},
@@ -266,6 +268,7 @@
{"touch", no_argument, 0, 'm'},
{"uncompress", no_argument, 0, 'Z'},
{"ungzip", no_argument, 0, 'z'},
+ {"unlink", no_argument, 0, 'U'},
{"unlink-first", no_argument, 0, 'U'},
{"update", no_argument, 0, 'u'},
{"use-compress-program", required_argument, 0, USE_COMPRESS_PROGRAM_OPTION},
@@ -327,6 +330,7 @@
--overwrite overwrite existing files when extracting\n\
--overwrite-dir overwrite directory metadata when extracting\n\
-U, --unlink-first remove each file prior to extracting over it\n\
+ --no-unlink-first don't remove each file prior to extracting\n\
--recursive-unlink empty hierarchies prior to extracting directory\n\
-S, --sparse handle sparse files efficiently\n\
-O, --to-stdout extract files to standard output\n\
@@ -510,6 +514,7 @@
owner_option = -1;
group_option = -1;
+ old_files_option = UNLINK_FIRST_OLD_FILES;
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
@@ -843,6 +848,10 @@
case 'U':
old_files_option = UNLINK_FIRST_OLD_FILES;
+ break;
+
+ case NO_UNLINK_FIRST_OPTION:
+ old_files_option = 0;
break;
case 'v':
|