grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remove the usage of "local" in scripts introduces a small bug in "ve


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: Remove the usage of "local" in scripts introduces a small bug in "version_test_gt()"
Date: Fri, 23 Dec 2011 12:02:16 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16

Committed, thanks. Next time please include Changelog entry and make sure that your patch isn't word-wrapped by your mailer.
On 28.11.2011 10:08, Lukas Anzinger wrote:
Hi,

it looks to me that the patch which removes the usage of "local" in
scripts (http://lists.gnu.org/archive/html/grub-devel/2011-11/msg00037.html)
introduces a bug in the function version_test_gt() in the file
util/grub-mkconfig_lib.in:

The variable $cmp is set to "gt" or "ge", however,
$version_test_gt_cmp is used instead and the case has no effect.

This patch should fix it:

--- a/util/grub-mkconfig_lib.in 2011-11-28 09:42:11.000000000 +0100
+++ b/util/grub-mkconfig_lib.in 2011-11-28 10:00:00.000000000 +0100
@@ -198,8 +198,8 @@
    fi
    case "$version_test_gt_a:$version_test_gt_b" in
      *.old:*.old) ;;
-    *.old:*) version_test_gt_a="`echo -n "$version_test_gt_a" | sed
-e 's/\.old$//'`" ; cmp=gt ;;
-    *:*.old) version_test_gt_b="`echo -n "$version_test_gt_b" | sed
-e 's/\.old$//'`" ; cmp=ge ;;
+    *.old:*) version_test_gt_a="`echo -n "$version_test_gt_a" | sed
-e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
+    *:*.old) version_test_gt_b="`echo -n "$version_test_gt_b" | sed
-e 's/\.old$//'`" ; version_test_gt_cmp=ge ;;
    esac
    version_test_numeric "$version_test_gt_a" "$version_test_gt_cmp"
"$version_test_gt_b"
    return "$?"

I noticed the problem when I tried to apply the patch
"dpkg_version_comparison.patch" from Debian.

Maybe someone should take a look at the other variables ...

Regards,

Lukas

_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel



--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




reply via email to

[Prev in Thread] Current Thread [Next in Thread]