mirror of
https://github.com/archlinux-jerry/buildbot
synced 2024-11-25 06:20:40 +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:
|
if updates and len(updates) == 1:
|
||||||
(pkgconfig, ver, buildarchs) = updates[0]
|
(pkgconfig, ver, buildarchs) = updates[0]
|
||||||
fakejob = Job(buildarchs[0], pkgconfig, ver)
|
fakejob = Job(buildarchs[0], pkgconfig, ver)
|
||||||
|
self.__sign(fakejob)
|
||||||
if self.__upload(fakejob, overwrite=overwrite):
|
if self.__upload(fakejob, overwrite=overwrite):
|
||||||
ret = f'done force_upload {pkgdirname}'
|
ret = f'done force_upload {pkgdirname}'
|
||||||
logger.info(ret)
|
logger.info(ret)
|
||||||
|
@ -408,6 +409,7 @@ class updateManager:
|
||||||
self.__pkgerrs = dict()
|
self.__pkgerrs = dict()
|
||||||
self.__pkgvers = dict()
|
self.__pkgvers = dict()
|
||||||
self.__load()
|
self.__load()
|
||||||
|
self.__rebuilding = False
|
||||||
@property
|
@property
|
||||||
def pkgvers(self):
|
def pkgvers(self):
|
||||||
return self.__pkgvers
|
return self.__pkgvers
|
||||||
|
@ -456,11 +458,16 @@ class updateManager:
|
||||||
updates = list()
|
updates = list()
|
||||||
for pkg in jobsmgr.pkgconfigs:
|
for pkg in jobsmgr.pkgconfigs:
|
||||||
try:
|
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 \
|
if rebuild_package and \
|
||||||
rebuild_package != pkg.dirname:
|
rebuild_package != pkg.dirname:
|
||||||
continue
|
continue
|
||||||
pkgdir = REPO_ROOT / pkg.dirname
|
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:
|
if self.__pkgerrs.get(pkg.dirname, 0) >= 2:
|
||||||
logger.warning(f'package: {pkg.dirname} too many failures checking update')
|
logger.warning(f'package: {pkg.dirname} too many failures checking update')
|
||||||
if rebuild_package is None:
|
if rebuild_package is None:
|
||||||
|
@ -509,6 +516,7 @@ class updateManager:
|
||||||
self.__pkgerrs[pkg.dirname] = self.__pkgerrs.get(pkg.dirname, 0) + 1
|
self.__pkgerrs[pkg.dirname] = self.__pkgerrs.get(pkg.dirname, 0) + 1
|
||||||
print_exc_plus()
|
print_exc_plus()
|
||||||
self._save()
|
self._save()
|
||||||
|
self.__rebuilding = False
|
||||||
return updates
|
return updates
|
||||||
|
|
||||||
updmgr = updateManager()
|
updmgr = updateManager()
|
||||||
|
|
Loading…
Reference in a new issue