From 27da0703ef1ffaa7e08dda22df7f9dfa074e60be Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Tue, 26 Apr 2016 10:18:27 -0600 Subject: Remove all usages of flock. https://bugs.linaro.org/show_bug.cgi?id=2198 Change-Id: I19f174f3f56ff7068ca6c426fc63c04eaec054a9 --- lib/checkout.sh | 10 ++++------ lib/configure.sh | 6 ------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/checkout.sh b/lib/checkout.sh index 68fbb3da..a64ebc0e 100644 --- a/lib/checkout.sh +++ b/lib/checkout.sh @@ -117,7 +117,7 @@ git_robust() while [ "$try" -lt "10" ]; do try="$(($try+1))" - flock ${local_builds}/git$$.lock --command "${cmd}" && break + ${cmd} && break done } @@ -182,8 +182,7 @@ checkout() if test x"${revision}" != x""; then notice "Checking out revision for ${component} in ${srcdir}" if test x${dryrun} != xyes; then - local cmd="${NEWWORKDIR} ${local_snapshots}/${repo} ${srcdir} ${revision}" - flock ${local_builds}/git$$.lock --command "${cmd}" + ${NEWWORKDIR} ${local_snapshots}/${repo} ${srcdir} ${revision} if test $? -gt 0; then error "Revision ${revision} likely doesn't exist in git repo ${repo}!" rm -f ${local_builds}/git$$.lock @@ -197,8 +196,7 @@ checkout() else notice "Checking out branch ${branch} for ${component} in ${srcdir}" if test x${dryrun} != xyes; then - local cmd="${NEWWORKDIR} ${local_snapshots}/${repo} ${srcdir} ${branch}" - flock ${local_builds}/git$$.lock --command "${cmd}" + ${NEWWORKDIR} ${local_snapshots}/${repo} ${srcdir} ${branch} if test $? -gt 0; then error "Branch ${branch} likely doesn't exist in git repo ${repo}!" rm -f ${local_builds}/git$$.lock @@ -387,7 +385,7 @@ change_branch() if test ! -d ${srcdir}/${branch}; then local cmd="${NEWWORKDIR} ${local_snapshots}/${version} ${local_snapshots}/${version}-${branch} ${branch}" - dryrun "flock ${local_builds}/git$$.lock --command ${cmd}" + dryrun "${cmd}" else if test x"${supdate}" = xyes; then if test x"${branch}" = x; then diff --git a/lib/configure.sh b/lib/configure.sh index 9dcb20d0..d20ad25d 100755 --- a/lib/configure.sh +++ b/lib/configure.sh @@ -25,12 +25,6 @@ configure_build() local component="`echo $1 | sed -e 's:\.git.*::' -e 's:-[0-9a-z\.\-]*::'`" - flock --wait 100 ${local_builds}/git$$.lock --command echo - if test $? -gt 0; then - error "Timed out waiting for a git checkout to complete." - return 1 - fi - # Linux isn't a build project, we only need the headers via the existing # Makefile, so there is nothing to configure. if test x"${component}" = x"linux"; then -- cgit v1.2.3