[OE-core] [RFC][v2] [PATCH 1/1] package-index.bb: add support for deb and rpm.

Cui, Dexuan dexuan.cui at intel.com
Tue May 17 23:36:33 UTC 2011


Richard Purdie wrote:
> Hi Dexuan,
> 
> When I read Saul's original emails I thought this approach would work
> although it wasn't the first one that came to my mind.
> 
> Looking at the code you have, the problem is you have nowhere you can
> call the "addtask" for the individual tasks and we don't want to the
> overhead system wide for every recipe as it makes no sense.
Yes, I realized this later.

> I'd therefore like to suggest we tweak this approach a little. Each
> package_xxx.bbclass defines a function which updates the index for
> that packaging backend:
I agree. I've actually made a patch in branch dcui/package-index, but the below implementation you suggested is obviously much better! :-)
Thank you very much for the detailed suggestion!

> package_ipk.bbclass:
> 
> PACKAGEINDEXES += "package_index_ipk();"
> PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
> PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot"
> package_index_ipk[dirs] = "${DEPLOY_DIR_IPK}"
> 
> package_index_ipk() {
>        set -ex
>        package_update_index_ipk
>        set +ex
> }
> 
> The key is the addition to the PACKAGEINDEXES variable and its
> dependencies in PACKAGEINDEXDEPS.
> 
> In package-index.bb we can then just have:
> 
> do_package_index[depends] += "${PACKAGEINDEXDEPS}"
> 
> do_package_index() {
> 	${PACKAGEINDEXES}
> }
> 
> and these variables should always have the things we need in them
> depending on the package backends available.
> 
> Ideally we should cover the case there is no package backend enabled
> and just return too rather than error (or bbwarn "No package backends
> enabled, doing nothing").
Oh, I didn't realize this... I'll remember to handle this, too.

Thanks,
-- Dexuan



More information about the Openembedded-core mailing list