summaryrefslogtreecommitdiff
path: root/archivers/gtar-base/patches/patch-ab
blob: 33b4a91ddf82464790cb575b5fafcea8616b03cc (plain)
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
$NetBSD: patch-ab,v 1.13 2010/03/23 19:00:10 tez Exp $
add --no-unlink-first option to negate --unlink-first option
earlier patches made --unlink-first a default, but that was dropped years ago

--- src/tar.c.orig	2010-03-23 12:11:49.133467100 -0500
+++ src/tar.c	2010-03-23 12:39:58.326191800 -0500
@@ -299,6 +299,7 @@
   NO_RECURSION_OPTION,
   NO_SAME_OWNER_OPTION,
   NO_SAME_PERMISSIONS_OPTION,
+  NO_UNLINK_FIRST_OPTION,
   NO_SEEK_OPTION,
   NO_UNQUOTE_OPTION,
   NO_WILDCARDS_MATCH_SLASH_OPTION,
@@ -504,6 +505,8 @@
    N_("try extracting files with the same ownership as exists in the archive (default for superuser)"), GRID+1 },
   {"no-same-owner", NO_SAME_OWNER_OPTION, 0, 0,
    N_("extract files as yourself (default for ordinary users)"), GRID+1 },
+  {"no-unlink-first", NO_UNLINK_FIRST_OPTION, 0, 0,
+   N_("don't remove each file prior to extracting"), GRID+1 },
   {"numeric-owner", NUMERIC_OWNER_OPTION, 0, 0,
    N_("always use numbers for user/group names"), GRID+1 },
   {"preserve-permissions", 'p', 0, 0,
@@ -1642,6 +1645,10 @@
       old_files_option = UNLINK_FIRST_OLD_FILES;
       break;
       
+    case NO_UNLINK_FIRST_OPTION:
+      old_files_option = DEFAULT_OLD_FILES;
+      break;
+      
     case UTC_OPTION:
       utc_option = true;
       break;