]> code.ossystems Code Review - openembedded-core.git/commit
update-alternative.bbclass: add batch alternatives support
authorKevin Tian <kevin.tian@intel.com>
Sat, 25 Sep 2010 06:54:44 +0000 (14:54 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 29 Sep 2010 15:42:15 +0000 (16:42 +0100)
commit22cbcd964fceb43c89142be77db8950425b4303e
tree34879ea75a7e06fddd6c174820ec3f715d72abdf
parent5f289ac80f81681f1d31e8637ceeeb5217aa40ca
update-alternative.bbclass: add batch alternatives support

With new batch ability, we can use below simple 2 lines for multiple alternatives
updates:

ALTERNATIVE_LINKS = "${bindir}/cmd1 {sbindir}/cmd2 ..."
ALTERNATIVE_PRIORITY = "100"

Then for each command "/path/cmd" listed in ALTERNATIVE_LINKS, below is done
automatically:

    ${D}/path/cmd is renamed to ${D}/path/cmd.{PN}
    a new alternative named 'cmd' is created which:
        links /path/cmd to /path/cmd.{PN} with priority specified in ALTERNATIVE_PRIORITY

This way the recipe with multiple alternatives could be simplified a lot. There
are still some cases where above assumptions may break, but I expect more recipes
should benefit from this simple enhancement

Fix [BUGID #257]

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
meta/classes/update-alternatives.bbclass