* [PATCH] make 10_linux' test_gt() a bit more generic
@ 2009-08-04 19:19 Robert Millan
2009-08-07 12:05 ` Robert Millan
0 siblings, 1 reply; 4+ messages in thread
From: Robert Millan @ 2009-08-04 19:19 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
This makes 10_linux' test_gt() a bit more generic so that it can be
moved (along with a few other functions) to grub-mkconfig_lib, where
it'll be usable by 10_freebsd.
This will allow handling multiple kernel versions in 10_freebsd, like
10_linux does.
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
[-- Attachment #2: test_gt.diff --]
[-- Type: text/x-diff, Size: 623 bytes --]
2009-08-04 Robert Millan <rmh.grub@aybabtu.com>
* util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
not just "vmlinu[zx]".
Index: util/grub.d/10_linux.in
===================================================================
--- util/grub.d/10_linux.in (revision 2466)
+++ util/grub.d/10_linux.in (working copy)
@@ -67,8 +67,8 @@ test_numeric ()
test_gt ()
{
- local a=`echo $1 | sed -e "s/vmlinu[zx]-//g"`
- local b=`echo $2 | sed -e "s/vmlinu[zx]-//g"`
+ local a=`echo $1 | sed -e "s/[^-]*-//g"`
+ local b=`echo $2 | sed -e "s/[^-]*-//g"`
local cmp=gt
if [ "x$b" = "x" ] ; then
return 0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] make 10_linux' test_gt() a bit more generic
2009-08-04 19:19 [PATCH] make 10_linux' test_gt() a bit more generic Robert Millan
@ 2009-08-07 12:05 ` Robert Millan
2009-08-08 5:38 ` Pavel Roskin
0 siblings, 1 reply; 4+ messages in thread
From: Robert Millan @ 2009-08-07 12:05 UTC (permalink / raw)
To: grub-devel
Committed. Also moved those functions to grub-mkconfig_lib.in.
On Tue, Aug 04, 2009 at 09:19:40PM +0200, Robert Millan wrote:
>
> This makes 10_linux' test_gt() a bit more generic so that it can be
> moved (along with a few other functions) to grub-mkconfig_lib, where
> it'll be usable by 10_freebsd.
>
> This will allow handling multiple kernel versions in 10_freebsd, like
> 10_linux does.
>
> --
> Robert Millan
>
> The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
> how) you may access your data; but nobody's threatening your freedom: we
> still allow you to remove your data and not access it at all."
> 2009-08-04 Robert Millan <rmh.grub@aybabtu.com>
>
> * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
> not just "vmlinu[zx]".
>
> Index: util/grub.d/10_linux.in
> ===================================================================
> --- util/grub.d/10_linux.in (revision 2466)
> +++ util/grub.d/10_linux.in (working copy)
> @@ -67,8 +67,8 @@ test_numeric ()
>
> test_gt ()
> {
> - local a=`echo $1 | sed -e "s/vmlinu[zx]-//g"`
> - local b=`echo $2 | sed -e "s/vmlinu[zx]-//g"`
> + local a=`echo $1 | sed -e "s/[^-]*-//g"`
> + local b=`echo $2 | sed -e "s/[^-]*-//g"`
> local cmp=gt
> if [ "x$b" = "x" ] ; then
> return 0
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] make 10_linux' test_gt() a bit more generic
2009-08-07 12:05 ` Robert Millan
@ 2009-08-08 5:38 ` Pavel Roskin
2009-08-10 11:36 ` Robert Millan
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2009-08-08 5:38 UTC (permalink / raw)
To: The development of GRUB 2
On Fri, 2009-08-07 at 14:05 +0200, Robert Millan wrote:
>
> Committed. Also moved those functions to grub-mkconfig_lib.in.
When comparing vmlinuz-2.6.31-rc4-wl and vmlinuz-2.6.31-rc5-wl,
version_test_gt() ends up comparing "wl" and "wl".
Using the "g" modifier leads to the replacement being applied
continuously until the last minus is consumed. The use of "g" wasn't
warranted before, but it didn't have such effect.
I'm committing the fix.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] make 10_linux' test_gt() a bit more generic
2009-08-08 5:38 ` Pavel Roskin
@ 2009-08-10 11:36 ` Robert Millan
0 siblings, 0 replies; 4+ messages in thread
From: Robert Millan @ 2009-08-10 11:36 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, Aug 08, 2009 at 01:38:43AM -0400, Pavel Roskin wrote:
> On Fri, 2009-08-07 at 14:05 +0200, Robert Millan wrote:
> >
> > Committed. Also moved those functions to grub-mkconfig_lib.in.
>
> When comparing vmlinuz-2.6.31-rc4-wl and vmlinuz-2.6.31-rc5-wl,
> version_test_gt() ends up comparing "wl" and "wl".
>
> Using the "g" modifier leads to the replacement being applied
> continuously until the last minus is consumed. The use of "g" wasn't
> warranted before, but it didn't have such effect.
You're right. I tend to use "g" without thinking. I should be more
careful with this.
> I'm committing the fix.
Thanks.
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-10 11:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 19:19 [PATCH] make 10_linux' test_gt() a bit more generic Robert Millan
2009-08-07 12:05 ` Robert Millan
2009-08-08 5:38 ` Pavel Roskin
2009-08-10 11:36 ` Robert Millan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.