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

Roman I Khimov khimov at altell.ru
Thu Jun 18 10:00:12 UTC 2009


On Четверг 18 июня 2009 13:17:58 Phil Blundell wrote:
> 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?  

Works good here, updated patch to follow.




More information about the Openembedded-devel mailing list