pf-tools/pf-tools: correct keyname for the include (action -> type)

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Thu Apr 10 11:54:30 UTC 2014


details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/8eba26572ee4
changeset: 1265:8eba26572ee4
user:      shad
date:      Thu Apr 10 13:54:25 2014 +0200
description:
correct keyname for the include (action -> type)

diffstat:

 lib/PFTools/Compat/Translation.pm |  2 +-
 tools/Translate_old_config        |  7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r f927426e4b3d -r 8eba26572ee4 lib/PFTools/Compat/Translation.pm
--- a/lib/PFTools/Compat/Translation.pm	Thu Apr 10 11:51:14 2014 +0200
+++ b/lib/PFTools/Compat/Translation.pm	Thu Apr 10 13:54:25 2014 +0200
@@ -41,7 +41,7 @@
     my $new_conf = $conf_parsed;
     foreach my $section ( keys %{$new_conf} ) {
         if ( $section =~ /^@(.*)$/ ) {
-            $new_conf->{$1} = { 'action' => 'include' };
+            $new_conf->{$1} = { 'type' => 'include' };
             delete $new_conf->{$section};
             next;
         }
diff -r f927426e4b3d -r 8eba26572ee4 tools/Translate_old_config
--- a/tools/Translate_old_config	Thu Apr 10 11:51:14 2014 +0200
+++ b/tools/Translate_old_config	Thu Apr 10 13:54:25 2014 +0200
@@ -149,7 +149,7 @@
 else {
     foreach my $section ( keys %{$old_parsing} ) {
         if ( $section =~ m{\A @ (.*) \z}msx ) {
-            $trans->{$1} = { 'action' => 'include' };
+            $trans->{$1} = { 'type' => 'include' };
         }
         elsif ( $old_parsing->{$section}->{'type'} eq 'network' ) {
             $trans->{$section}
@@ -355,13 +355,16 @@
                         . qq{\n} );
             }
             $output_fh->print(qq{[$section]\n});
-            $trans->{$section}->{'site'} = $options->{'site'};
+
             foreach my $key ( sort orderkeys keys %{ $trans->{$section} } ) {
                 if ( $comments->{$section}->{$key} ) {
                     $output_fh->print(
                         join( qq{\n}, @{ $comments->{$section}->{$key} } )
                             . qq{\n} );
                 }
+                if ( $key eq 'site' ) {
+                    $trans->{$section}->{$key} = $options->{'site'};
+                }
                 $output_fh->print("\t$key\t= $trans->{$section}->{$key}");
                 if ( $comments->{'inline'}->{$section}->{$key} ) {
                     $output_fh->print(



More information about the pf-tools-commits mailing list