autoport-native: only upgrade native packages on first loop cycle
This commit is contained in:
parent
e53a62198a
commit
092e90e004
@ -31,6 +31,8 @@ function pid_check() {
|
|||||||
|
|
||||||
pid_check
|
pid_check
|
||||||
|
|
||||||
|
NATIVE_UPGRADED=
|
||||||
|
|
||||||
for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
||||||
for r in ${AUTOPORT_REPOSITORIES[$i]}; do
|
for r in ${AUTOPORT_REPOSITORIES[$i]}; do
|
||||||
[ "${AUTOPORT_ARCH[$i]}" ] || continue
|
[ "${AUTOPORT_ARCH[$i]}" ] || continue
|
||||||
@ -55,10 +57,13 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
|||||||
|
|
||||||
if [ "${AUTOPORT_NATIVE[$i]}" ]; then
|
if [ "${AUTOPORT_NATIVE[$i]}" ]; then
|
||||||
a=${AUTOPORT_ARCH[$i]}
|
a=${AUTOPORT_ARCH[$i]}
|
||||||
[[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in $a native environment"
|
if [ ! "$NATIVE_UPGRADED" ]; then
|
||||||
echo "= Updating packages in $a native environment..." >> $LOGFILE
|
[[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in $a native environment"
|
||||||
LANG=C smart update > /dev/null
|
echo "= Updating packages in $a native environment..." >> $LOGFILE
|
||||||
LANG=C smart upgrade -y >> $LOGFILE
|
LANG=C smart update > /dev/null
|
||||||
|
LANG=C smart upgrade -y >> $LOGFILE
|
||||||
|
NATIVE_UPGRADED=1
|
||||||
|
fi
|
||||||
echo "= Working on $r($a) in native mode" >> $LOGFILE
|
echo "= Working on $r($a) in native mode" >> $LOGFILE
|
||||||
su -l ${AUTOPORT_CHROOT_USER[$i]} -c "$CMD_PREFIX autoport -b -r $r" >> $LOGFILE
|
su -l ${AUTOPORT_CHROOT_USER[$i]} -c "$CMD_PREFIX autoport -b -r $r" >> $LOGFILE
|
||||||
AUTODIST_HOME=`getent passwd ${AUTOPORT_CHROOT_USER[$i]} | cut -d: -f6`
|
AUTODIST_HOME=`getent passwd ${AUTOPORT_CHROOT_USER[$i]} | cut -d: -f6`
|
||||||
|
Loading…
Reference in New Issue
Block a user