[oe] [PATCH 2/3] package_ipk: optimize do_package_update_index_ipk

Phil Blundell pb at reciva.com
Thu Jun 18 09:17:58 UTC 2009


On Wed, 2009-06-17 at 23:41 +0400, Roman I Khimov wrote:
> +			PACK_COUNT=`ls -t ${DEPLOY_DIR_IPK}/$ipk_path/ | head -n 4 | grep Packages | wc -l`
> +			if [ -e ${DEPLOY_DIR_IPK}/$ipk_path/ -a "$PACK_COUNT" != "4" ] ; then 

This test seems a little bit fragile.  How about something like:

NEWEST_PACKAGE=`ls -t ${DEPLOY_DIR_IPK}/$ipk_path/*.ipk | head -n 1`
if [ -n "$NEWEST_PACKAGE" ] && [ "$NEWEST_PACKAGE" -nt
"${DEPLOY_DIR_IPK}/$ipk_path/Packages" ]; then
 ...

instead?  Or, perhaps even better, teach ipkg-make-index to do this
checking for itself and just return immediately if there's no work for
it to do.

p.






More information about the Openembedded-devel mailing list