2011-08-07 18:23:32 +02:00
|
|
|
# Emerge wrapper, uses matter lock file support to avoid
|
|
|
|
# concurrent execution
|
|
|
|
emerge() {
|
|
|
|
matter_lock_file="/var/tmp/.matter_resource.lock"
|
|
|
|
flock -x -n "${matter_lock_file}" true
|
|
|
|
rc=${?}
|
|
|
|
if [ "${rc}" != "0" ]; then
|
|
|
|
echo
|
|
|
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
|
|
echo "matter is running on this chroot, in order to prevent explosions"
|
|
|
|
echo "this emerge instance will terminate NOW"
|
|
|
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
|
|
echo
|
|
|
|
return 1
|
|
|
|
else
|
2011-11-27 12:29:35 +01:00
|
|
|
/usr/bin/emerge --quiet-build=n "$@"
|
2011-08-07 18:23:32 +02:00
|
|
|
return ${?}
|
|
|
|
fi
|
|
|
|
}
|