summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_install.subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-03-19 11:44:23 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-03-19 11:44:23 +0000
commit847bee79d77df86299bb5ac909b15b22ad221bd7 (patch)
tree2aeb63f9f6855b1b2291e35ffa11ed46ba060b1e /subr/pkg_install.subr
parente1d4697bc4af580c8bbdb8256fdc90626e18a226 (diff)
downloadmidipix_build-847bee79d77df86299bb5ac909b15b22ad221bd7.tar.bz2
midipix_build-847bee79d77df86299bb5ac909b15b22ad221bd7.tar.xz
subr/{pkg_install,rtl_fetch}.subr, subr/rtl_complex.subr:rtl_flock_acquire(): split.
Diffstat (limited to 'subr/pkg_install.subr')
-rw-r--r--subr/pkg_install.subr13
1 files changed, 2 insertions, 11 deletions
diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr
index 8a033572..ef3fed28 100644
--- a/subr/pkg_install.subr
+++ b/subr/pkg_install.subr
@@ -22,17 +22,8 @@ pkg_install() {
return 1;
fi;
done; IFS="${_ifs_old}";
- (set +o errexit -o noglob; trap "rm -f \"${BUILD_WORKDIR}/install.lock\"" EXIT;
- date;
- while true; do
- if flock -E 622 -w 600 4; then
- break;
- elif [ "${?}" -eq 622 ]; then
- continue;
- else
- exit "${?}";
- fi;
- done;
+ (set +o errexit -o noglob; rtl_flock_acquire 4 || exit "${?}"; date;
+ trap "rm -f \"${BUILD_WORKDIR}/install.lock\"" EXIT;
if ! tar -C "${PKG_DESTDIR}" -cpf - . | tar -C "${PKG_PREFIX}" --overwrite -xpf -; then
exit 1;
fi) 4<>"${BUILD_WORKDIR}/install.lock";