handle eix-update stacking
This commit is contained in:
parent
cebab1eac4
commit
8e95d73e6d
|
@ -5,7 +5,10 @@ PATH="$PATH:/usr/sbin:/sbin"
|
|||
TMP_FILE=$(mktemp)
|
||||
MAIL=$(mktemp)
|
||||
|
||||
PORTAGE_RUNING=$(pgrep emerge)
|
||||
# Possible race condition: if someone runs `eix blah` at the exact same time,
|
||||
# it will block the update. But that seems highly improbable.
|
||||
# The mail goal is to avoid stacking updates or eix-sync/eix-updates
|
||||
PORTAGE_RUNING=$(pgrep 'emerge|eix')
|
||||
if [ "${PORTAGE_RUNING}" ]; then
|
||||
echo "Error: another emerge is already running, exiting"
|
||||
exit 1
|
||||
|
@ -13,7 +16,7 @@ fi
|
|||
|
||||
PORTAGE_QUIET='1'
|
||||
|
||||
eix-sync 1>/dev/null 2>${TMP_FILE}
|
||||
eix-sync 1>/dev/null 2>${TMP_FILE} || eix-update 1>/dev/null 2>${TMP_FILE}
|
||||
|
||||
emerge -v --update --newuse --deep --with-bdeps=y --quiet-build=y @security \
|
||||
&>> ${TMP_FILE}
|
||||
|
|
Loading…
Reference in a new issue