[oe] update-alternatives broken badly (by me :()

Martin Jansa martin.jansa at gmail.com
Fri Jan 8 13:23:44 UTC 2010


After this change
http://cgit.openembedded.net/cgit.cgi/openembedded/commit/?id=9b641bbfed07c075ae5cbe84082a85f1ba703447

most distributions use opkg-native as u-a provider for building their
images, but I haven't noticed that 

update-alternatives-cworth use alternatives from
/usr/lib/ipkg/alternatives

opkg use
/usr/lib/opkg/alternatives

So image prepared with opkg-native cannot ship with
update-alternatives-cworth installed, but it does, because task-boot
DEPENDS on "update-alternatives" which could be fixed with 
DISTRO_UPDATE_ALTERNATIVES and using DISTRO_UPDATE_ALTERNATIVES for
PREFERRED_PROVIDER_virtual/update-alternatives
PREFERRED_PROVIDER_virtual/update-alternatives-native
and here in task-boot.

But this won't fix already installed/built images :/.

How to fix this properly? I guess that right combination of RCONFLICTS
and good postinst scipt can fix that.. but its quite difficult to test
it and it can break things even more :/. Please advise..

Sort of nasty workaround now is
opkg remove update-alternatives-cworth
opkg reinstall busybox

Here is info I just sent to SHR mailing list

In last opkg upgrade there is bump to busybox package, which triggers
old bug in our images :(.

There are 2 scripts providing update-alternatives in our images, one is
part of opkg itself installed in
/usr/bin/update-alternatives (it was added to opkg later)

and older update-alternatives-cworth installed in
/usr/sbin/update-alternatives and used by default

But with busybox upgrade all symlinks are updated with knowledge only
from /usr/lib/ipkg/alternatives because of that -cworth which shouldn't
be part of image! (I'll push -cworth blacklist to our shr.conf but its
too late for those who upgraded busybox yesterday).

Hopefully working work-around (haven't tested because I'm at work)

opkg remove update-alternatives-cworth
opkg reinstall busybox

Please also check
diff -rq /usr/lib/opkg/alternatives /usr/lib/ipkg/alternatives
if there is some major difference, if yes reinstall packages where the
alternatives provided by them are different in those 2 dirs.

-- 
uin:136542059                jid:Martin.Jansa at gmail.com
Jansa Martin                 sip:jamasip at voip.wengo.fr 
JaMa                         




More information about the Openembedded-devel mailing list