[Debian-eeepc-devel] How to deal with the freeze?
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Mon Nov 8 12:18:46 UTC 2010
On Mon, 8 Nov 2010, Luca Niccoli wrote:
> On 7 November 2010 17:25, Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com> wrote:
>
> > Are _you_ that sure? Progress is surprisingly fast, sometimes ;)
> > Why not doing it right once (if you can) and then forget about it?
>
> Because we have no guarantee at all about what the separator after the
> minor version will be; the kernel build system (and make-kpkg for that
> matter) leave it up to the user.
Right. That was my point, wasn't it?
> There could be kernels named 2.6.32aaa or even 2.6.321, where aaa and
> 1 are local revisions.
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.
> So using your approach is bound to cause trouble for someone, just to
> solve a problem that doesn't exist at the moment and will probably
> never exist for this particular script.
Anyway, extracting 5 characters (a dumb string) after the second dot
is IMO more error prone done with this bashism:
LINUX_MINOR_REV=${LINUX_FULL_VER:4:5}
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}
}
--
Cristian
More information about the Debian-eeepc-devel
mailing list