[oe-commits] org.oe.dev 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.

coredump2 commit openembedded-commits at lists.openembedded.org
Thu Mar 1 02:19:42 UTC 2007


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.

Author: coredump2 at openembedded.org
Branch: org.openembedded.dev
Revision: 77c7c9f8b6af45e03e3dfc70d5e536b37dd55d8d
ViewMTN: http://monotone.openembedded.org/revision.psp?id=77c7c9f8b6af45e03e3dfc70d5e536b37dd55d8d
Files:
1
classes/rootfs_ipk.bbclass
Diffs:

#
# mt diff -r2a3db6b938ba58e3c58a3b6ad48e10fbac18b29c -r77c7c9f8b6af45e03e3dfc70d5e536b37dd55d8d
#
# 
# 
# patch "classes/rootfs_ipk.bbclass"
#  from [04170b3871e0f3e177c162f74e50408afb735a0f]
#    to [b39c54e1570b3467692f1c49daaa00b9fce8f81c]
# 
============================================================
--- classes/rootfs_ipk.bbclass	04170b3871e0f3e177c162f74e50408afb735a0f
+++ classes/rootfs_ipk.bbclass	b39c54e1570b3467692f1c49daaa00b9fce8f81c
@@ -31,8 +31,51 @@ 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 () {
 	set -x
 






More information about the Openembedded-commits mailing list