mirror of
https://github.com/archlinux-jerry/buildbot
synced 2024-11-21 20:40:41 +08:00
buildbot: fix rebuild
This commit is contained in:
parent
02cc370e41
commit
6dc56262bc
1 changed files with 9 additions and 1 deletions
10
buildbot.py
10
buildbot.py
|
@ -134,6 +134,7 @@ class jobsManager:
|
|||
if updates and len(updates) == 1:
|
||||
(pkgconfig, ver, buildarchs) = updates[0]
|
||||
fakejob = Job(buildarchs[0], pkgconfig, ver)
|
||||
self.__sign(fakejob)
|
||||
if self.__upload(fakejob, overwrite=overwrite):
|
||||
ret = f'done force_upload {pkgdirname}'
|
||||
logger.info(ret)
|
||||
|
@ -408,6 +409,7 @@ class updateManager:
|
|||
self.__pkgerrs = dict()
|
||||
self.__pkgvers = dict()
|
||||
self.__load()
|
||||
self.__rebuilding = False
|
||||
@property
|
||||
def pkgvers(self):
|
||||
return self.__pkgvers
|
||||
|
@ -456,11 +458,16 @@ class updateManager:
|
|||
updates = list()
|
||||
for pkg in jobsmgr.pkgconfigs:
|
||||
try:
|
||||
if self.__rebuilding and not rebuild_package:
|
||||
logger.info(f'Stop checking updates for rebuild.')
|
||||
break
|
||||
else:
|
||||
self.__rebuilding = bool(rebuild_package)
|
||||
if rebuild_package and \
|
||||
rebuild_package != pkg.dirname:
|
||||
continue
|
||||
pkgdir = REPO_ROOT / pkg.dirname
|
||||
logger.info(f'checking update: {pkg.dirname}')
|
||||
logger.info(f'{"[rebuild] " if rebuild_package else ""}checking update: {pkg.dirname}')
|
||||
if self.__pkgerrs.get(pkg.dirname, 0) >= 2:
|
||||
logger.warning(f'package: {pkg.dirname} too many failures checking update')
|
||||
if rebuild_package is None:
|
||||
|
@ -509,6 +516,7 @@ class updateManager:
|
|||
self.__pkgerrs[pkg.dirname] = self.__pkgerrs.get(pkg.dirname, 0) + 1
|
||||
print_exc_plus()
|
||||
self._save()
|
||||
self.__rebuilding = False
|
||||
return updates
|
||||
|
||||
updmgr = updateManager()
|
||||
|
|
Loading…
Reference in a new issue