[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/apply.pl.in

Fridrich Strba fridrich at kemper.freedesktop.org
Thu Nov 26 05:38:41 PST 2009


 patches/apply.pl.in |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit fdda0f1eba4ee46b80db14e548159ccaa163e678
Author: Petr Mladek <pmladek at suse.cz>
Date:   Mon Nov 23 13:19:55 2009 +0100

    Fix check for old GNU patch tool (i#107027)
    
    * patches/apply.pl.in: do not break with GNU patch-2.6

diff --git a/patches/apply.pl.in b/patches/apply.pl.in
index 6b2faf0..74b5557 100755
--- a/patches/apply.pl.in
+++ b/patches/apply.pl.in
@@ -920,11 +920,13 @@ sub is_old_patch_version()
 
     open ($Patch, "@GNUPATCH@ --version|") || die "Can't run patch: $!";
     $ver_line = <$Patch>;
-    $ver_line =~ m/\s+(\d+)\.(\d+)\.(\d+)/ || die "Can't get patch version\n";
-    if ($1 >= 2 && $2 >= 5 && $3 >= 9) {
+    $ver_line =~ m/\s+(\d+)\.(\d+)\.?(\d+)?/ || die "Can't get patch version\n";
+    if ( ( $1 > 2 ) ||
+         ( $1 == 2 && $2 > 5 ) ||
+         ( $1 == 2 && $2 == 5 && $3 >= 9 ) ) {
 	$is_old = 0;
     }
-    
+
     if ($is_old) {
 	print "Old patch version - pruning LFs\n";
     }


More information about the ooo-build-commit mailing list