X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2Fgnutar.pl;h=41367801d1a9fa102446873d49ac92402e28a795;hb=c6f0a88c567f8536c498f554285aed1f8150da18;hp=886fd089c0e7c35719b78a90d801d437f6c5fe6c;hpb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;p=debian%2Famanda diff --git a/installcheck/gnutar.pl b/installcheck/gnutar.pl index 886fd08..4136780 100644 --- a/installcheck/gnutar.pl +++ b/installcheck/gnutar.pl @@ -76,6 +76,21 @@ my ($v, $numeric_version); $numeric_version += $maj * 10000 if $maj; $numeric_version += $min * 100 if $min; $numeric_version += $mic if $mic; + +} + +my ($fc14, $fc15); +{ + my $uname = `uname -a`; + if ($uname =~ /\.fc14\./) { + $fc14 = 1; + } + if ($uname =~ /\.fc15\./) { + $fc15 = 1; + } + if ($uname =~ /\.fc16\./) { #like fc15 + $fc15 = 1; + } } # see if the default for --wildcards during inclusion has been changed @@ -99,8 +114,10 @@ my %version_classes = ( '>=1.23' => $numeric_version >= 12300, '*' => 1, '1.23' => ($numeric_version >= 12290 and $numeric_version <= 12300), + '1.23fc14' => ($numeric_version == 12300 and $fc14), '!1.23' => ($numeric_version < 12290 || ($numeric_version > 12300 && $numeric_version < 12500)), - '>=1.25' => $numeric_version >= 12500. + '>=1.25' => $numeric_version >= 12500, + 'fc15' => ($numeric_version >= 12500 and $fc15), ); # include and exclude all use the same set of patterns and filenames @@ -135,28 +152,29 @@ my $named_expectations = [ 'epsilon', 'zeta', 'eta', - 'empty', ], - # al be ga de ep ze et empty - [ 1, 1, 1, 1, 1, 1, 1, 1, ], # './A*A' => 'A*A', - [ 1, 1, 1, 1, 0, 1, 1, 0, ], # './A*A' => 'AxA', - [ 1, 1, 1, 1, 1, 1, 1, 1, ], # './B?B' => 'B?B', - [ 1, 1, 1, 1, 0, 1, 1, 0, ], # './B?B' => 'BxB', - [ 0, 0, 0, 0, 1, 1, 1, 1, ], # './C[C' => 'C[C', - [ 1, 1, 1, 1, 1, 1, 1, 1, ], # './D]D' => 'D]D', - [ 1, 0, 0, 1, 1, 0, 0, 1, ], # './E\\E' => 'E\\E', - [ 1, 1, 1, 1, 1, 1, 1, 1, ], # './F\'F' => 'F\'F', - [ 1, 1, 1, 1, 1, 1, 1, 1, ], # './G"G' => 'G"G', - [ 1, 1, 1, 1, 1, 1, 1, 1, ], # './H H' => 'H H', - [ 1, 1, 1, 0, 0, 1, 1, 0, ], # './A\\*A' => 'A*A', - [ 0, 0, 0, 0, 0, 0, 0, 0, ], # './A\\*A' => 'AxA', - [ 0, 0, 1, 0, 0, 0, 1, 0, ], # './B\\?B' => 'B?B', - [ 0, 0, 0, 0, 0, 0, 0, 0, ], # './B\\?B' => 'BxB', - [ 1, 1, 1, 0, 0, 1, 1, 0, ], # './C\\[C' => 'C[C', - [ 0, 1, 1, 0, 0, 1, 1, 0, ], # './D\\]D' => 'D]D', - [ 1, 0, 1, 0, 1, 0, 1, 0, ], # './E\\\\E' => 'E\\E', - [ 0, 1, 1, 0, 0, 1, 1, 0, ], # './F\\\'F' => 'F\'F', - [ 0, 1, 1, 0, 0, 1, 1, 0, ], # './G\\"G' => 'G"G', - [ 0, 1, 1, 0, 0, 1, 1, 0, ], # './H\\ H' => 'H H', + 'iota', + 'empty', ], + # al be ga de ep ze et io empty + [ 1, 1, 1, 1, 1, 1, 1, 1, 1, ], # './A*A' => 'A*A', + [ 1, 1, 1, 1, 0, 1, 1, 1, 0, ], # './A*A' => 'AxA', + [ 1, 1, 1, 1, 1, 1, 1, 1, 1, ], # './B?B' => 'B?B', + [ 1, 1, 1, 1, 0, 1, 1, 1, 0, ], # './B?B' => 'BxB', + [ 0, 0, 0, 0, 1, 1, 1, 1, 1, ], # './C[C' => 'C[C', + [ 1, 1, 1, 1, 1, 1, 1, 1, 1, ], # './D]D' => 'D]D', + [ 1, 0, 0, 1, 1, 0, 0, 1, 1, ], # './E\\E' => 'E\\E', + [ 1, 1, 1, 1, 1, 1, 1, 1, 1, ], # './F\'F' => 'F\'F', + [ 1, 1, 1, 1, 1, 1, 1, 1, 1, ], # './G"G' => 'G"G', + [ 1, 1, 1, 1, 1, 1, 1, 1, 1, ], # './H H' => 'H H', + [ 1, 1, 1, 0, 0, 1, 1, 0, 0, ], # './A\\*A' => 'A*A', + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, ], # './A\\*A' => 'AxA', + [ 0, 0, 1, 0, 0, 0, 1, 0, 0, ], # './B\\?B' => 'B?B', + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, ], # './B\\?B' => 'BxB', + [ 1, 1, 1, 0, 0, 1, 1, 0, 0, ], # './C\\[C' => 'C[C', + [ 0, 1, 1, 0, 0, 1, 1, 0, 0, ], # './D\\]D' => 'D]D', + [ 1, 0, 1, 0, 1, 0, 1, 0, 0, ], # './E\\\\E' => 'E\\E', + [ 0, 1, 1, 0, 0, 1, 1, 0, 0, ], # './F\\\'F' => 'F\'F', + [ 0, 1, 1, 0, 0, 1, 1, 0, 0, ], # './G\\"G' => 'G"G', + [ 0, 1, 1, 0, 0, 1, 1, 0, 0, ], # './H\\ H' => 'H H', ]; sub get_expectation { @@ -187,9 +205,11 @@ sub get_matching_type { my ($expectations) = @_; # find the type for the first matching version - for (keys %$expectations) { - if ($version_classes{$_}) { - return $expectations->{$_}; + foreach my $exp (@$expectations) { + foreach (keys %$exp) { + if ($version_classes{$_}) { + return $exp->{$_}; + } } } return undef; @@ -313,54 +333,60 @@ sub test_gnutar_inclusion { test_gnutar_inclusion( extra_args => [], - expectations => { - '<1.16' => 'alpha', - '>=1.16-no-wc' => 'epsilon', - '>=1.16-wc' => 'beta', # acts like --wildcards - }, + expectations => [ + {'<1.16' => 'alpha'}, + {'1.23fc14' => 'zeta'}, + {'fc15' => 'zeta'}, + {'>=1.16-no-wc' => 'epsilon'}, + {'>=1.16-wc' => 'beta'}, # acts like --wildcards + ], ); test_gnutar_inclusion( extra_args => [ '--no-wildcards' ], - expectations => { - '<1.16' => 'alpha', - '>=1.16' => 'epsilon', - }, + expectations => [ + {'<1.16' => 'alpha'}, + {'>=1.16' => 'epsilon'}, + ], ); test_gnutar_inclusion( extra_args => [ '--no-unquote' ], - expectations => { - '<1.16' => undef, - '>=1.16-no-wc' => 'empty', - '>=1.16-wc' => 'gamma', # acts like --wildcards --no-unquote - }, + expectations => [ + {'<1.16' => undef}, + {'1.23fc14' => 'eta'}, + {'fc15' => 'eta'}, + {'>=1.16-no-wc' => 'empty'}, + {'>=1.16-wc' => 'gamma'}, # acts like --wildcards --no-unquote + ], ); test_gnutar_inclusion( extra_args => [ '--no-wildcards', '--no-unquote' ], - expectations => { - '<1.16' => undef, - '>=1.16' => 'empty', - }, + expectations => [ + {'<1.16' => undef}, + {'>=1.16' => 'empty'}, + ], ); test_gnutar_inclusion( extra_args => [ '--wildcards' ], - expectations => { - '<1.16' => 'alpha', - '1.16..<1.25' => 'beta', - '>=1.25' => 'zeta', - }, + expectations => [ + {'<1.16' => 'alpha'}, + {'1.23fc14' => 'zeta'}, + {'1.16..<1.25' => 'beta'}, + {'>=1.25' => 'zeta'}, + ], ); test_gnutar_inclusion( extra_args => [ '--wildcards', '--no-unquote' ], - expectations => { - '<1.16' => undef, - '1.16..<1.25' => 'gamma', - '>=1.25' => 'eta', - }, + expectations => [ + {'<1.16' => undef}, + {'1.23fc14' => 'eta'}, + {'1.16..<1.25' => 'gamma'}, + {'>=1.25' => 'eta'}, + ], ); ## exclusion tests (using -t and filenames on the command line) @@ -467,19 +493,20 @@ sub test_gnutar_exclusion { # --wildcards test_gnutar_exclusion( extra_args => [], - expectations => { - '!1.23' => 'gamma', - '1.23' => 'delta', - '>=1.25' => 'eta', - }, + expectations => [ + {'!1.23' => 'gamma'}, + {'1.23fc14' => 'iota'}, + {'1.23' => 'delta'}, + {'>=1.25' => 'eta'}, + ], ); # --no-wildcards test_gnutar_exclusion( extra_args => [ '--no-wildcards' ], - expectations => { - '*' => 'empty', - }, + expectations => [ + {'*' => 'empty'}, + ], ); ## list (-t)