Hello community,

here is the log from the commit of package perl-Bootloader for openSUSE:Factory 
checked in at 2015-05-02 17:34:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Bootloader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Bootloader"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Bootloader/perl-Bootloader.changes  
2015-04-25 16:46:18.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Bootloader.new/perl-Bootloader.changes     
2015-05-02 17:34:12.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Apr 30 08:41:08 CEST 2015 - [email protected]
+
+- Escape/unescape special characters on write/read (bsc#831791)
+- 0.833
+
+-------------------------------------------------------------------

Old:
----
  perl-Bootloader-0.832.tar.xz

New:
----
  perl-Bootloader-0.833.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Bootloader.spec ++++++
--- /var/tmp/diff_new_pack.yUCbR2/_old  2015-05-02 17:34:13.000000000 +0200
+++ /var/tmp/diff_new_pack.yUCbR2/_new  2015-05-02 17:34:13.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Bootloader
-Version:        0.832
+Version:        0.833
 Release:        0
 Requires:       coreutils
 Requires:       perl-base = %{perl_version}

++++++ perl-Bootloader-0.832.tar.xz -> perl-Bootloader-0.833.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/perl-Bootloader-0.832/VERSION 
new/perl-Bootloader-0.833/VERSION
--- old/perl-Bootloader-0.832/VERSION   2015-04-22 13:59:11.000000000 +0200
+++ new/perl-Bootloader-0.833/VERSION   2015-04-30 08:38:12.000000000 +0200
@@ -1 +1 @@
-0.832
+0.833
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/perl-Bootloader-0.832/changelog 
new/perl-Bootloader-0.833/changelog
--- old/perl-Bootloader-0.832/changelog 2015-04-22 13:59:11.000000000 +0200
+++ new/perl-Bootloader-0.833/changelog 2015-04-30 08:38:12.000000000 +0200
@@ -1,3 +1,6 @@
+2015-04-29:    0.833
+       - Escape/unescape special characters on write/read (bsc#831791)
+
 2015-04-22:    0.832
        - started pbl-yaml testsuite
        - added test cases for various utf8/non-utf8/really broken config files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/perl-Bootloader-0.832/perl-Bootloader-testsuite/tests/test_interface/core-test.pl
 
new/perl-Bootloader-0.833/perl-Bootloader-testsuite/tests/test_interface/core-test.pl
--- 
old/perl-Bootloader-0.832/perl-Bootloader-testsuite/tests/test_interface/core-test.pl
       2015-04-22 13:59:11.000000000 +0200
+++ 
new/perl-Bootloader-0.833/perl-Bootloader-testsuite/tests/test_interface/core-test.pl
       2015-04-30 08:38:12.000000000 +0200
@@ -1,5 +1,5 @@
 use strict;
-use Test::More tests => 6;
+use Test::More tests => 14;
 
 use lib "./";
 use Bootloader::Library;
@@ -14,6 +14,20 @@
 #FIXME broken
 #is(getcwd()."/fake_root1/boot", 
$core->ResolveCrossDeviceSymlinks(getcwd()."/fake_root1/boot/boot"));
 
+my @test_strings = (
+    ['acpi_osi="!Windows 2012"', '"acpi_osi=\"!Windows 2012\""'],
+    ['acpi_osi=\"!Windows 2012\"', '"acpi_osi=\\\\\"!Windows 2012\\\\\""'],
+    ['`echo Hello`', '`echo Hello`'],
+    ['Hello `pwd`', '"Hello \`pwd\`"']
+    );
+
+foreach(  @test_strings ) {
+    is( $core->Quote($_->[0], "always"), $_->[1] );
+}
+
+foreach( @test_strings ) {
+    is( $core->Unquote($_->[1]), $_->[0] );
+}
 
 #test heuristic for fitting sections
 my %debug_section = (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/perl-Bootloader-0.832/src/Core.pm 
new/perl-Bootloader-0.833/src/Core.pm
--- old/perl-Bootloader-0.832/src/Core.pm       2015-04-22 13:59:11.000000000 
+0200
+++ new/perl-Bootloader-0.833/src/Core.pm       2015-04-30 08:38:12.000000000 
+0200
@@ -325,7 +325,12 @@
 sub Quote {
     my $self = shift;
     my $text = shift;
-    my $when = shift;
+    my $when = shift || '';
+
+    $text = $self->trim($text);
+    return $text if ($text =~ /^`.*`$/); #leave full strings in backticks 
untouched
+
+    $text =~ s/([\\"`])/\\$1/g; #escape backslashes, backticks and quotes
 
     if ($when eq "always"
        || ($when eq "blanks" && index ($text, " ") >= 0)
@@ -333,9 +338,9 @@
        || index ($text, "=") >= 0)
     {
         $text =~ s: +: :; #remove duplicated spaces
-       $text = "\"$text\"";
+        $text = "\"$text\"";
     }
-    
+
     return $text;
 }
 
@@ -358,6 +363,9 @@
     {
        $text = $1;
     }
+
+    $text =~ s/\\([\\"`])/$1/g; #unescape backslashes, backticks and quotes
+
     return $text;
 }
 


Reply via email to