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

Bug#801850: busybox: readlink gets shadowed by busybox causing debconf to possibly fail



Hey Christoph


On 03-10-17 21:42, Christoph Biedl wrote:
tags 801850 +moreinfo +patch
thanks

With both coreutils and busybox installed however, the
busybox variant gets used before the coreutils variant causing package
failures.
Does such a breakage happen or is this rather a theoretical scenario?
Or: Is this an issue to be fixed in (old)stable as well?
This happened in an actual situation, hence why i brought it up :)
Since my ticket is 2 years old in 10 days, I'm not sure exactly what I was doing to trigger this (call it a bad bug report on my part :) but I think what was going on (and writing it down again freshens my memory) we have an "embedded" jessie rootfs filesystem, and after post-install, we run a busybox --install to 'fill in the blanks'.

Because busybox's readlink has as you say precedence, flash-kernel in this case, fails to work as busybox's readlink is not as complete (or not fully compatible).

A quick fix/workaround:
if [ -f /bin/readlink ]; then
         unlink /usr/bin/readlink
fi
Things are not that easy unfortunately.
Which would be kind of an ugly workaround imo. As you first run busybox --install to 'fill in the blank' and still have to go fix things manually afterwards.
  It's saner to fix the
underlying problem which took a while to understand: busybox --install
places the readlink link in /usr/bin/, a directory that has precedence
in $PATH over /bin/  where coreutils version resides. And things go
downhill from there.

The patch attached changes busybox' install path for readlink to /bin/
as well - since busybox never replaces existing files, everything
should be fine.
This sounds quite reasonable and should work rather well, even better (but that's beyond a simple patch like this) would be if busybox --install would check if something exists, and not install the duplicate (unless --force is supplied (without overwriting))


Please give it a try and report whether this helps in your situation.
Since we haven't switched to flash-kernel, we haven't had the issue yet, but once it does; I'll definitely check this if it works now!

Thanks,

Olliver

     Christoph


Reply to: