buildbot: fix a bug

This commit is contained in:
JerryXiao 2019-09-05 23:36:42 +08:00
parent 91a8e844f5
commit 61bbd523f4

View file

@ -381,6 +381,9 @@ class updateManager:
continue continue
pkgdir = REPO_ROOT / pkg.dirname pkgdir = REPO_ROOT / pkg.dirname
logger.info(f'checking update: {pkg.dirname}') logger.info(f'checking update: {pkg.dirname}')
if self.__pkgerrs.get(pkg.dirname, 0) >= 2:
logger.warning(f'package: {pkg.dirname} too many failures checking update')
continue
pkgbuild = pkgdir / 'PKGBUILD' pkgbuild = pkgdir / 'PKGBUILD'
archs = get_arch_from_pkgbuild(pkgbuild) archs = get_arch_from_pkgbuild(pkgbuild)
buildarchs = [BUILD_ARCH_MAPPING.get(arch, None) for arch in archs] buildarchs = [BUILD_ARCH_MAPPING.get(arch, None) for arch in archs]
@ -401,10 +404,6 @@ class updateManager:
if pkg.type in ('git', 'manual'): if pkg.type in ('git', 'manual'):
ver = self.__get_new_ver(pkg.dirname, arch) ver = self.__get_new_ver(pkg.dirname, arch)
oldver = self.__pkgvers.get(pkg.dirname, None) oldver = self.__pkgvers.get(pkg.dirname, None)
errs = self.__pkgerrs.get(pkg.dirname, 0)
if errs >= 2:
logger.warning(f'package: {pkg.dirname} too many failures checking update')
continue
has_update = False has_update = False
if rebuild_package: if rebuild_package:
has_update = True has_update = True