summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hentges <oe@hentges.net>2007-03-01 02:06:34 +0000
committerMatthias Hentges <oe@hentges.net>2007-03-01 02:06:34 +0000
commitb47f572122d09f6462952bb8d7d19ea47cce538a (patch)
tree4c8b17a186f482f47166714a050d9cf2f03120c8
parent097534b3b0b8c172d9d07a2c2e7673508e389990 (diff)
rootfs_ipk.bbclass: Implements a sensational new feature called 'oe-feed' which, for the first time ever, actually lets you use your ipk deploy dir as a feed in ipkg.conf./mtcommit ../classes/rootfs_ipk.bbclass Oh wait......we already could do that in the past, now couldn't we?? Set DEPLOY_ENABLE_OEFEED=1 in your shell env or local.conf to activate fast oe-feed/Packages creation, set DEPLOY_ENABLE_OEFEED=2 to enable traditional (and slooooow) oe-feed/Packages creation.
-rw-r--r--classes/rootfs_ipk.bbclass43
1 files changed, 43 insertions, 0 deletions
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index fdd42ee429..eeb2f3f4c4 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -31,6 +31,49 @@ rootfs_ipk_do_indexes () {
fi
fi
done
+
+ test "${DEPLOY_ENABLE_OEFEED}" -gt 0 && rootfs_create_combined_feed || /bin/true
+}
+
+rootfs_create_combined_feed() {
+
+ # Create deploy/oe-feed which can be used as a feed in ipkg.conf
+ # Set DEPLOY_ENABLE_OEFEED=2 to rebuild Packages with ipkg-make-index (very slow)
+ # Set DEPLOY_ENABLE_OEFEED=1 to use the Packages files from ipk/ARCH/ (fast)
+
+ mkdir -p "${DEPLOY_DIR}/oe-feed"
+ cd "${DEPLOY_DIR}/oe-feed" || exit 1
+
+ # To catch deleted / changed packages, we have to completly rebuild
+ # the symlinks every time.
+ test -d "${DEPLOY_DIR}/oe-feed" && rm -rf "${DEPLOY_DIR}/oe-feed/"
+
+ case "${DEPLOY_ENABLE_OEFEED}" in
+ 1) MAKE_INDEX_TYPE="fast" ;;
+ *) MAKE_INDEX_TYPE="traditional" ;;
+ esac
+
+ for arch in $ipkgarchs
+ do
+ if test -d ${DEPLOY_DIR_IPK}/$arch/
+ then
+ # Note: *.ipk won't work (too many arguments)
+ for ipk in `ls -1 "${DEPLOY_DIR_IPK}/$arch/" | grep ".ipk$"`
+ do
+ ln -s "${DEPLOY_DIR_IPK}/$arch/$ipk" .
+ done
+ fi
+
+ # Doesn't get faster than that =)
+ test "$MAKE_INDEX_TYPE" = "fast" && cat ${DEPLOY_DIR_IPK}/$arch/Packages >> ./Packages
+ done
+
+ if test "$MAKE_INDEX_TYPE" = "traditional"
+ then
+ rm -f ${DEPLOY_DIR}/oe-feed/Packages
+ touch ${DEPLOY_DIR}/oe-feed/Packages
+ ipkg-make-index -r ${DEPLOY_DIR}/oe-feed/Packages -p ${DEPLOY_DIR}/oe-feed/Packages -l ${DEPLOY_DIR}/oe-feed/Packages.filelist -m ${DEPLOY_DIR}/oe-feed/
+ fi
}
fakeroot rootfs_ipk_do_rootfs () {