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

Re: kernel-image/debian.README; confusion over version numbers

On 19 May 1996, Manoj Srivastava wrote:

>	Ulp.  I am adding the following paragraph to debian.README, it
> will be in the next version of the scripts I upload.  BTW, I'd be
> extremely grateful for any critique on the documentation, which is
> something I need to work on.
>First, change the version numbers near the top of debian.rules.  If
>you don't, you may overwrite an installed directory, or you kernel may
>not be able to find any modules. You have been warned!
>  For an explanation on why this editing maybe required, and/or what
>  version set it to, consider this. The kernel knows what version it
>  is, as given in the kernel Makefile as the variables VERSION,
>  PATCHLEVEL, and SUBLEVEL.  It will look for the modules in
>  /lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL.  The debian scripts
>  think they know what the kernel version is, [...]

Why not use something like the following in debian.rules to set $(v)?

VERSION=$(shell grep ^VERSION Makefile | sed -e 's/[^0-9]*\([0-9]*\)/\1/')
PATCHLEVEL=$(shell grep ^PATCHLEVEL Makefile | sed -e 's/[^0-9]*\([0-9]*\)/\1/')
SUBLEVEL=$(shell grep ^SUBLEVEL Makefile | sed -e 's/[^0-9]*\([0-9]*\)/\1/')

        echo $(v)

Reply to: