autoport-launcher: call dnf refresh before update

This commit is contained in:
Silvan Calarco 2024-09-20 16:52:27 +02:00
parent dc76be906a
commit b4af591361

View File

@ -62,11 +62,13 @@ for r in ${AUTOPORT_REPOSITORIES[$i]}; do
if [ "${AUTOPORT_NATIVE[$i]}" ]; then if [ "${AUTOPORT_NATIVE[$i]}" ]; then
[[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in ${AUTOPORT_ARCH[$i]} native environment" [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in ${AUTOPORT_ARCH[$i]} native environment"
echo "= Updating packages in ${AUTOPORT_ARCH[$i]} native environment..." >> $LOGFILE echo "= Updating packages in ${AUTOPORT_ARCH[$i]} native environment..." >> $LOGFILE
LANG=C dnf refresh >> $LOGFILE
LANG=C dnf update -y >> $LOGFILE LANG=C dnf update -y >> $LOGFILE
UPDATE_DONE=1 UPDATE_DONE=1
elif [ "${AUTOPORT_CHROOT[$i]}" ]; then elif [ "${AUTOPORT_CHROOT[$i]}" ]; then
[[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in ${AUTOPORT_CHROOT[$i]} chroot environment" [[ "`/usr/bin/tty`" != "not a tty" ]] && echo "Updating packages in ${AUTOPORT_CHROOT[$i]} chroot environment"
#echo "= Updating packages in ${AUTOPORT_CHROOT[$i]} chroot environment..." >> $LOGFILE #echo "= Updating packages in ${AUTOPORT_CHROOT[$i]} chroot environment..." >> $LOGFILE
LANG=C /usr/sbin/chroot /var/autoport/${AUTOPORT_CHROOT[$i]} dnf refresh > /dev/null
LANG=C /usr/sbin/chroot /var/autoport/${AUTOPORT_CHROOT[$i]} dnf update -y > /dev/null LANG=C /usr/sbin/chroot /var/autoport/${AUTOPORT_CHROOT[$i]} dnf update -y > /dev/null
#[ "${AUTOPORT_CHROOT_ICECREAM[$i]}" ] && LANG=C /usr/sbin/chroot /var/autoport/${AUTOPORT_CHROOT[$i]} /etc/init.d/icecream start #[ "${AUTOPORT_CHROOT_ICECREAM[$i]}" ] && LANG=C /usr/sbin/chroot /var/autoport/${AUTOPORT_CHROOT[$i]} /etc/init.d/icecream start
UPDATE_DONE=1 UPDATE_DONE=1