diff options
author | Richard Purdie <richard@openedhand.com> | 2008-10-01 15:38:55 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-10-01 15:38:55 +0000 |
commit | 18104e12167d04945c3d09e580172a3186ed9efe (patch) | |
tree | ffdf9d500ede885072f85b5a7b1ffd6e50bf1981 /meta/classes | |
parent | d96b9e37ffb91fa67497f9fb6032e1da7f7dd81f (diff) | |
download | openembedded-core-18104e12167d04945c3d09e580172a3186ed9efe.tar.gz openembedded-core-18104e12167d04945c3d09e580172a3186ed9efe.tar.bz2 openembedded-core-18104e12167d04945c3d09e580172a3186ed9efe.zip |
rootfs_ipk.bbclass: Add the hard bit of image generation from feeds, controlled by a BUILD_IMAGES_FROM_FEEDS variable
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5372 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index 5e8a9c720c..fdedc44e58 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass @@ -13,11 +13,14 @@ do_rootfs[recrdeptask] += "do_package_write_ipk" IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS}" +OPKG_FEED_URIS = "" + fakeroot rootfs_ipk_do_rootfs () { set -x package_update_index_ipk package_generate_ipkg_conf + ${OPKG_FEED_URIS} mkdir -p ${T}/ mkdir -p ${IMAGE_ROOTFS}/usr/lib/opkg/ @@ -95,7 +98,7 @@ install_all_locales() { PACKAGES_TO_INSTALL="" - INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${libdir}/opkg/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` + INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${libdir}/opkg/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` for pkg in $INSTALLED_PACKAGES do @@ -113,3 +116,33 @@ install_all_locales() { fi } +ipk_insert_feed_uris () { + + echo "Building from feeds activated!" + + for line in ${FEED_URIS} + do + # strip leading and trailing spaces/tabs, then split into name and uri + line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`" + feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`" + feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`" + + echo "Added $feed_name feed with URL $feed_uri" + + # insert new feed-sources + echo "src/gz $feed_name $feed_uri" >> ${IPKGCONF_TARGET} + done +} + +python () { + import bb + if bb.data.getVar('BUILD_IMAGES_FROM_FEEDS', d, True): + flags = bb.data.getVarFlag('do_rootfs', 'recrdeptask', d) + flags = flags.replace("do_package_write_ipk", "") + flags = flags.replace("do_deploy", "") + flags = flags.replace("do_populate_staging", "") + bb.data.setVarFlag('do_rootfs', 'recrdeptask', flags, d) + bb.data.setVar('OPKG_FEED_URIS', 'ipk_insert_feed_uris', d) +} + + |