[OE-core] [PATCH] classes: Update to use corrected bb.utils.explode_dep_versions2 API
Mark Hatle
mark.hatle at windriver.com
Tue Oct 2 17:20:11 UTC 2012
On 10/1/12 7:10 PM, Richard Purdie wrote:
> The bb.utils.explode_dep_versions function has issues where dependency information
> can be lost. The API doesn't support maintaining the correct information so this
> changes to use a new function which correctly handles the data.
>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> diff --git a/meta/classes/libc-common.bbclass b/meta/classes/libc-common.bbclass
> index dc32c81..0f49936 100644
> --- a/meta/classes/libc-common.bbclass
> +++ b/meta/classes/libc-common.bbclass
> @@ -29,14 +29,7 @@ python populate_packages_prepend () {
> d.setVar('PKG_'+bpn+'-dev', 'libc6-dev')
> d.setVar('PKG_'+bpn+'-dbg', 'libc6-dbg')
> # For backward compatibility with old -dbg package
> -
> - def add_dep(var, dep):
> - deps = bb.utils.explode_dep_versions(d.getVar(var + '_' + bpn, True) or "")
> - if not dep in deps:
> - deps[dep] = ""
> - d.setVar(var + '_' + bpn, bb.utils.join_deps(deps, commasep=False))
> -
> - add_dep('RPROVIDES', 'libc-dbg')
> - add_dep('RCONFLICTS', 'libc-dbg')
> - add_dep('RREPLACES', 'libc-dbg')
> + d.appendVar('RPROVIDES_' + bpn + '-dbg', ' libc-dbg')
> + d.appendVar('RCONFLICTS_' + bpn + '-dbg', ' libc-dbg')
> + d.appendVar('RREPLACES_' + bpn + '-dbg', ' libc-dbg')
> }
The above is almost the same as the original code. The problem with appendVar
is that then you get duplicate entries. With the new code, I know we won't get
exceptions, but do we really want the duplicates?
Everything else looks good.
--Mark
More information about the Openembedded-core
mailing list