diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-07-08 00:51:51 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-07-08 00:51:51 +0100 |
commit | 2b7886853c16ebffce2582ec9a9734ed98324fac (patch) | |
tree | fe0ae2bcb229ce71afa6639225b964b2c8fecc77 /meta/classes | |
parent | e7f1993e3ba682af214f6a4c69475636e294d76c (diff) | |
download | poky-2b7886853c16ebffce2582ec9a9734ed98324fac.tar.gz |
package_ipk.bbclass: Solve opkg-make-index locking problem using flock
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package_ipk.bbclass | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index 1aa2c814bb..f0c158033c 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -73,17 +73,15 @@ package_update_index_ipk () { | |||
73 | return | 73 | return |
74 | fi | 74 | fi |
75 | 75 | ||
76 | touch ${DEPLOY_DIR_IPK}/Packages | 76 | packagedirs="${DEPLOY_DIR_IPK}" |
77 | opkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} | ||
78 | |||
79 | for arch in $ipkgarchs; do | 77 | for arch in $ipkgarchs; do |
80 | if [ -e ${DEPLOY_DIR_IPK}/$arch/ ] ; then | 78 | packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/$arch ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk" |
81 | touch ${DEPLOY_DIR_IPK}/$arch/Packages | 79 | done |
82 | opkg-make-index -r ${DEPLOY_DIR_IPK}/$arch/Packages -p ${DEPLOY_DIR_IPK}/$arch/Packages -l ${DEPLOY_DIR_IPK}/$arch/Packages.filelist -m ${DEPLOY_DIR_IPK}/$arch/ | 80 | |
83 | fi | 81 | for pkgdir in $packagedirs; do |
84 | if [ -e ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/ ] ; then | 82 | if [ -e $pkgdir/ ]; then |
85 | touch ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages | 83 | touch $pkgdir/Packages |
86 | opkg-make-index -r ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -p ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -l ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages.filelist -m ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/ | 84 | flock $pkgdir/Packages.flock -c "opkg-make-index -r $pkgdir/Packages -p $pkgdir/Packages -l $pkgdir/Packages.filelist -m $pkgdir/" |
87 | fi | 85 | fi |
88 | done | 86 | done |
89 | } | 87 | } |