40-autodist-cleanold: sync with current build server
This commit is contained in:
parent
78c85dcc7d
commit
8794727a6a
@ -2,12 +2,12 @@
|
||||
[ -e /etc/autodist/config ] && . /etc/autodist/config
|
||||
[ -e /etc/sysconfig/autoport ] && . /etc/sysconfig/autoport
|
||||
|
||||
RPMS_CTIME_OLD="+14"
|
||||
BUILD_CTIME_OLD="+14"
|
||||
SOURCES_CTIME_OLD="+40"
|
||||
SOURCES_ARCHIVES_CTIME_OLD="+14"
|
||||
SOURCES_PATCH_CTIME_OLD="+730"
|
||||
SRPMS_CTIME_OLD="+14"
|
||||
RPMS_CTIME_OLD="+3"
|
||||
BUILD_CTIME_OLD="+3"
|
||||
SOURCES_CTIME_OLD="+7"
|
||||
SOURCES_ARCHIVES_CTIME_OLD="+7"
|
||||
SOURCES_PATCH_CTIME_OLD="+365"
|
||||
SRPMS_CTIME_OLD="+3"
|
||||
TMP_CTIME_OLD="+2"
|
||||
|
||||
function clean() {
|
||||
@ -47,16 +47,18 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
||||
[ -e /var/autoport/$a/var/autodist/RPM/RPMS/ ] && \
|
||||
clean /var/autoport/$a/var/autodist
|
||||
[ -e /var/autoport/$a/var/tmp/autodist ] && \
|
||||
find /var/autoport/$a/var/tmp/autodist/ -mindepth 1 -maxdepth 1 -type f -mtime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
find /var/autoport/$a/tmp/ -mindepth 1 -maxdepth 1 -type f -mtime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
find /var/autoport/$a/var/tmp/autodist/ -mindepth 1 -maxdepth 1 -type f -ctime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
find /var/autoport/$a/tmp/ -mindepth 1 -maxdepth 1 -type f -ctime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
sudo -u ${AUTOPORT_CHROOT_USER[$i]} ccache -C
|
||||
elif [ "${AUTOPORT_UPDATE[$i]}" ]; then
|
||||
clean /var/autodist
|
||||
find /var/autodist-tmp/ -mindepth 1 -maxdepth 1 -type f -mtime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
find /var/autodist-tmp/ -mindepth 1 -maxdepth 1 -ctime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
sudo -u autodist ccache -C
|
||||
elif [ "${AUTOPORT_NATIVE[$i]}" -a "${AUTOPORT_CHROOT_USER[$i]}" ]; then
|
||||
WORKINGHOME=`getent passwd ${AUTOPORT_CHROOT_USER[$i]} | cut -d: -f6`
|
||||
if [ -e $WORKINGHOME ]; then
|
||||
clean $WORKINGHOME
|
||||
fi
|
||||
find /var/autodist-tmp/ -mindepth 1 -maxdepth 1 -type f -mtime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
find /var/autodist-tmp/ -mindepth 1 -maxdepth 1 -ctime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user