]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - tar/patches/tar-1.17-wildcards.patch
Move all packages to root.
[people/ms/ipfire-3.x.git] / tar / patches / tar-1.17-wildcards.patch
1 --- tar-1.17/doc/tar.texi.wildcards 2007-06-28 13:23:46.000000000 +0200
2 +++ tar-1.17/doc/tar.texi 2007-06-28 13:23:46.000000000 +0200
3 @@ -6871,7 +6871,7 @@ The following table summarizes pattern-m
4
5 @multitable @columnfractions .3 .7
6 @headitem Members @tab Default settings
7 -@item Inclusion @tab @option{--no-wildcards --anchored --no-wildcards-match-slash}
8 +@item Inclusion @tab @option{--wildcards --anchored --wildcards-match-slash}
9 @item Exclusion @tab @option{--wildcards --no-anchored --wildcards-match-slash}
10 @end multitable
11
12 @@ -10666,6 +10666,9 @@ version of this document is available at
13 @table @asis
14 @item Use of globbing patterns when listing and extracting.
15
16 +Note: Following is true for original unpatched GNU tar.
17 +For compatibility reasons, the old behavior was preserved.
18 +
19 Previous versions of GNU tar assumed shell-style globbing when
20 extracting from or listing an archive. For example:
21
22 --- tar-1.17/src/tar.c.wildcards 2007-06-28 13:23:46.000000000 +0200
23 +++ tar-1.17/src/tar.c 2007-06-28 13:23:46.000000000 +0200
24 @@ -686,7 +686,7 @@ static struct argp_option options[] = {
25 {"no-ignore-case", NO_IGNORE_CASE_OPTION, 0, 0,
26 N_("case sensitive matching (default)"), GRID+1 },
27 {"wildcards", WILDCARDS_OPTION, 0, 0,
28 - N_("use wildcards (default for exclusion)"), GRID+1 },
29 + N_("use wildcards (default)"), GRID+1 },
30 {"no-wildcards", NO_WILDCARDS_OPTION, 0, 0,
31 N_("verbatim string matching"), GRID+1 },
32 {"no-wildcards-match-slash", NO_WILDCARDS_MATCH_SLASH_OPTION, 0, 0,
33 @@ -780,8 +780,7 @@ ARGMATCH_VERIFY (atime_preserve_args, at
34 /* Wildcard matching settings */
35 enum wildcards
36 {
37 - default_wildcards, /* For exclusion == enable_wildcards,
38 - for inclusion == disable_wildcards */
39 + default_wildcards, /* enable_wildcards */
40 disable_wildcards,
41 enable_wildcards
42 };
43 @@ -809,7 +808,7 @@ struct tar_args /* Variables used
44 | recursion_option)
45
46 #define MAKE_INCL_OPTIONS(args) \
47 - ((((args)->wildcards == enable_wildcards) ? EXCLUDE_WILDCARDS : 0) \
48 + ((((args)->wildcards != disable_wildcards) ? EXCLUDE_WILDCARDS : 0) \
49 | (args)->include_anchored \
50 | (args)->matching_flags \
51 | recursion_option)
52 @@ -2126,7 +2125,7 @@ decode_options (int argc, char **argv)
53
54 /* Warn about implicit use of the wildcards in command line arguments.
55 See TODO */
56 - warn_regex_usage = args.wildcards == default_wildcards;
57 + warn_regex_usage = 0; /* args.wildcards == default_wildcards; */
58
59 /* Derive option values and check option consistency. */
60
61 --- tar-1.17/src/names.c.wildcards 2007-04-03 14:17:13.000000000 +0200
62 +++ tar-1.17/src/names.c 2007-06-28 13:30:48.000000000 +0200
63 @@ -812,10 +812,7 @@ collect_and_sort_names (void)
64
65 if (name->found_count || name->directory)
66 continue;
67 - if (name->matching_flags & EXCLUDE_WILDCARDS)
68 - /* NOTE: EXCLUDE_ANCHORED is not relevant here */
69 - /* FIXME: just skip regexps for now */
70 - continue;
71 +
72 chdir_do (name->change_dir);
73
74 if (name->name[0] == 0)
75 diff -urNp tar-1.23-orig/tests/exclude01.at tar-1.23/tests/exclude01.at
76 --- tar-1.23-orig/tests/exclude01.at 2010-01-26 12:30:20.000000000 +0100
77 +++ tar-1.23/tests/exclude01.at 2010-03-12 14:42:31.000000000 +0100
78 @@ -59,6 +59,7 @@ testdir/dir2/file2
79 testdir/dir3/
80 NEXT
81 testdir/dir1/*
82 +testdir/dir1/file1
83 NEXT
84 testdir/dir1/*
85 NEXT