image.bbclass: move insert_feed_uris() to rootfs_ipk.bbclass
PATCH 1/1 image.bbclass: move insert_feed_uris() to rootfs_ipk.bbclass
This function generates feed configuration for opkg and as such should be used only for images using ipk, not rpm or deb.
Signed-off-by Filip Zyzniewski <[email protected]>
--- classes/image.bbclass | 31 ------------------------------- classes/rootfs_ipk.bbclass | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-)
classes/image.bbclass +0 -31
@@ -172,8 +172,6 @@ fakeroot do_rootfs () { rootfs_${IMAGE_PKGTYPE}_do_rootfs - insert_feed_uris - ${IMAGE_PREPROCESS_COMMAND} ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = ${IMAGE_EXTRA_SPACE} + $1; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'`
@@ -193,35 +191,6 @@ do_deploy_to () { cp "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${IMAGE_FSTYPES}" ${DEPLOY_TO} } -insert_feed_uris () { - - echo "Building feeds for [${DISTRO}].." - - 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" >> ${IMAGE_ROOTFS}/etc/opkg/${feed_name}-feed.conf - done - - # Allow to use package deploy directory contents as quick devel-testing - # feed. This creates individual feed configs for each arch subdir of those - # specified as compatible for the current machine. - # NOTE: Development-helper feature, NOT a full-fledged feed. - if [ -n "${FEED_DEPLOYDIR_BASE_URI}" ]; then - for arch in ${PACKAGE_ARCHS} - do - echo "src/gz local-$arch ${FEED_DEPLOYDIR_BASE_URI}/$arch" >> ${IMAGE_ROOTFS}/etc/opkg/local-$arch-feed.conf - done - fi -} - log_check() { set +x for target in $*
classes/rootfs_ipk.bbclass +31 -0
@@ -104,6 +104,37 @@ fakeroot rootfs_ipk_do_rootfs () { log_check rootfs rm -rf ${IPKG_TMP_DIR} + + rootfs_ipk_insert_feed_uris +} + +rootfs_ipk_insert_feed_uris () { + + echo "Building feeds for [${DISTRO}].." + + 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" >> ${IMAGE_ROOTFS}/etc/opkg/${feed_name}-feed.conf + done + + # Allow to use package deploy directory contents as quick devel-testing + # feed. This creates individual feed configs for each arch subdir of those + # specified as compatible for the current machine. + # NOTE: Development-helper feature, NOT a full-fledged feed. + if [ -n "${FEED_DEPLOYDIR_BASE_URI}" ]; then + for arch in ${PACKAGE_ARCHS} + do + echo "src/gz local-$arch ${FEED_DEPLOYDIR_BASE_URI}/$arch" >> ${IMAGE_ROOTFS}/etc/opkg/local-$arch-feed.conf + done + fi } rootfs_ipk_log_check() {
Signature · 1 line
1.7.1