Bug#231538: A possible solution
At Wed, 25 Feb 2004 01:10:35 +0900,
GOTO Masanori wrote:
> At Fri, 13 Feb 2004 06:35:47 -0200,
> Cesar Eduardo Barros wrote:
> > A simple way to avoid problems when dist-upgrading would be to check in
> > the preinst for a working bswap.
> >
> > A small precompiled static binary could
> > be added to the preinst (it doesn't even have to use a C library, see
> > http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html) and run
> > to check if using the emulated opcodes won't die with SIGILL or SIGSEGV.
>
> I think it's easier just use "uname -m". I don't know bswap is 486
> mandatory instruction or not, so it may be wrong, though.
>
> I think Cesar's suggestion is good idea. Checking processor class in
> preinst and if it does not have "bswap" (so i386 class processor), we
> stop to install and warn with libc6.preinst:
>
> if [ "$realarch" = i386 ]
> then
> kernel_ver=`uname -r`
> if dpkg --compare-versions "$kernel_ver" lt 2.4.24
> then
> echo WARNING: This machine has i386 class processor.
> echo Debian sarge and later you need to use at least a 2.4.24
> echo or 2.6.0 kernel on i386. Please upgrade your kernel
> echo before installing glibc.
> echo The reason is that "bswap" instruction is not supported
> echo on i386 class processors, and newer kernel can emulate
> echo such lacking instructions.
> exit 1
> fi
> fi
I've added the above checking code. This stops installing glibc before
upgrading kernel. I would like to close this bug using this patch.
BTW,
> Well newer initrd-tools module-init-tools should be in woody
> in order to upgrade to sarge smoothly.
Is this ok? Herbert? Marco? If not, I reassign this bug to such
packages.
Regards,
-- gotom
Reply to: