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

Bug#685376: postinst fails on non-default Debian kernels and is useless on =<3.4

Package: makedev
Version: 2.3.1-91
Severity: serious


the debian/postinst of makedev currently contains the following code:
# force update of fb devices if kernel is Linux >= 2.4 and they already exist
kern_rev1=`uname -r | sed -e 's@^\([^.]*\)\..*@\1@'`
kern_rev2=`uname -r | sed -e 's@^[^.]*\.\([^.]*\)\..*@\1@'`
if [ `uname -s` = "Linux" ] && [ $kern_rev1 -ge 2 ] && [ $kern_rev2 -ge 4 ] && [ -e /dev/fb0 ]
        MAKEDEV fb

This fails boldly on my machine with linux-image-3.4-trunk-amd64 being
installed as `uname -r` returns "3.4-trunk-amd64".
And even if it would return 3.4.0, the condition is false for 3.x kernels
before 3.4 (like the 3.2 in Wheezy) → serious because of that.

A possible fix would be
kern_rev2=`uname -r | sed -e 's@^[^.]*\.\([0-9]*\).*@\1@'`
But then the if condition still has to be updated, as it won't trigger
with [3.0..3.4[


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.4-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Reply to: