All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Blundell <pb@reciva.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH 2/3] package_ipk: optimize do_package_update_index_ipk
Date: Thu, 18 Jun 2009 10:17:58 +0100	[thread overview]
Message-ID: <1245316678.25995.9.camel@mill.internal.reciva.com> (raw)
In-Reply-To: <1245267720-13612-2-git-send-email-khimov@altell.ru>

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.





  parent reply	other threads:[~2009-06-18  9:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 19:41 [PATCH 1/3] Make package_update_index_ipk proper task with locking Roman I Khimov
2009-06-17 19:41 ` [PATCH 2/3] package_ipk: optimize do_package_update_index_ipk Roman I Khimov
2009-06-17 19:42   ` [PATCH 3/3] package_ipk: fix race in opkg.conf creation Roman I Khimov
2009-06-17 21:08     ` Tom Rini
2009-06-18  8:49       ` Roman I Khimov
2009-06-18 12:47     ` Richard Purdie
2009-06-17 21:06   ` [PATCH 2/3] package_ipk: optimize do_package_update_index_ipk Tom Rini
2009-06-18  9:17   ` Phil Blundell [this message]
2009-06-18 10:00     ` Roman I Khimov
2009-06-18 10:11     ` Roman I Khimov
2009-06-18 10:57       ` Phil Blundell
2009-06-18 13:00   ` Richard Purdie
2009-06-17 21:04 ` [PATCH 1/3] Make package_update_index_ipk proper task with locking Tom Rini
2009-06-18 13:05 ` Richard Purdie
2009-06-18 13:16   ` Phil Blundell
2009-06-18 13:35     ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245316678.25995.9.camel@mill.internal.reciva.com \
    --to=pb@reciva.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.