image.bbclass: move insert_feed_uris() to rootfs_ipk.bbclass
authorFilip Zyzniewski <filip.zyzniewski@gmail.com>
Tue, 15 Feb 2011 02:01:30 +0000 (02:01 +0000)
committerTom Rini <tom_rini@mentor.com>
Mon, 14 Feb 2011 18:20:44 +0000 (11:20 -0700)
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 <filip.zyzniewski@gmail.com>
Signed-off-by: Tom Rini <tom_rini@mentor.com>
classes/image.bbclass
classes/rootfs_ipk.bbclass

index 9765442..9621614 100644 (file)
@@ -172,9 +172,6 @@ fakeroot do_rootfs () {
 
        rootfs_${IMAGE_PKGTYPE}_do_rootfs
 
-       [ "${ONLINE_PACKAGE_MANAGEMENT}" != "none" ] && \
-               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}) }'`
@@ -194,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 $*
index 92f521d..b173184 100644 (file)
@@ -104,8 +104,41 @@ fakeroot rootfs_ipk_do_rootfs () {
 
        log_check rootfs        
        rm -rf ${IPKG_TMP_DIR}
+
+       [ "${ONLINE_PACKAGE_MANAGEMENT}" != "none" ] && \
+               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() {
        target="$1"
         lf_path="$2"