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

Richard Purdie richard.purdie at linuxfoundation.org
Tue May 17 16:39:50 UTC 2011


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.

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:

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").

Cheers,

Richard






More information about the Openembedded-core mailing list