On 8 November 2010 13:18, Cristian Ionescu-Idbohrn
<[email protected]> wrote:

> I wouldn't say that.  The linux Makefile defines:
>
>        VERSION = 2
>        PATCHLEVEL = 6
>        SUBLEVEL = 32
>        EXTRAVERSION =
>
> To distinguish the EXTRAVERSION you'll either have to know VERSION,
> PATCHLEVEL and SUBLEVEL, or the separator between SUBLEVEL and
> EXTRAVERSION.

There's no separator between SUBLEVEL and extraversion.
Try "make-kpkg --append-to-version 1 kernel_image " and see it yourself.

> Anyway, extracting 5 characters (a dumb string) after the second dot
> is IMO more error prone done with this bashism:

We extract just 2 characters, the :4:5 was just a mistake.
This is going to be fine until 2.6.99, I think that's plenty.
We just don't care about extraversion.

>        LINUX_MINOR_REV=${LINUX_FULL_VER:4:5}

The bashism (and bug) has been cleared in git.

> than this way:
>
>        LINUX_FULL_VER=$(uname -r)
>        LINUX_MINOR_MAYBE_XTRA=${LINUX_FULL_VER#*.}
>        LINUX_MINOR_MAYBE_XTRA=${LINUX_MINOR_MAYBE_XTRA#*.}
>        [ ${#LINUX_MINOR_MAYBE_XTRA} -le 5 ] || {
>                slak=${LINUX_MINOR_MAYBE_XTRA#?????}
>                LINUX_MINOR_MAYBE_XTRA=${LINUX_MINOR_MAYBE_XTRA%$slak}
>        }

You're saying that you'd prefer this against:
LINUX_MINOR_REV=`uname -r | cut -c 5,6`
?
Cheers,

Luca

_______________________________________________
Debian-eeepc-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel

Reply via email to