diff options
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-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) +} + + |