mirror of
https://github.com/archlinux-jerry/buildbot
synced 2024-12-04 19:00:41 +08:00
fix bugs
This commit is contained in:
parent
e4e81062fd
commit
af6c91ce6e
4 changed files with 11 additions and 3 deletions
|
@ -163,6 +163,7 @@ class updateManager:
|
|||
assert pkgdir.exists()
|
||||
pkglist = nspawn_shell(arch, MAKEPKG_PKGLIST_CMD, cwd=pkgdir)
|
||||
pkglist = pkglist.split('\n')
|
||||
pkglist = [line for line in pkglist if not line.startswith('+')]
|
||||
return pkglist
|
||||
def __get_new_ver(self, dirname, arch):
|
||||
pkgfiles = self.__get_package_list(dirname, arch)
|
||||
|
@ -201,7 +202,11 @@ updmgr = updateManager()
|
|||
@background
|
||||
def __main():
|
||||
while True:
|
||||
jobsmgr.tick()
|
||||
try:
|
||||
jobsmgr.tick()
|
||||
except:
|
||||
print_exc_plus()
|
||||
sleep(60)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ MAKEPKG_MAKE_CMD_CLEAN = 'makepkg --syncdeps --noextract --clean --cleanbuild'
|
|||
|
||||
MAKEPKG_PKGLIST_CMD = f'{MAKEPKG} --packagelist'
|
||||
|
||||
CONTAINER_BUILDBOT_ROOT = '~/shared/buildbot'
|
||||
CONTAINER_BUILDBOT_ROOT = 'shared/buildbot'
|
||||
# single quote may cause problem here
|
||||
SHELL_ARCH_X64 = 'sudo machinectl --quiet shell build@archlinux /bin/bash -c \'{command}\''
|
||||
SHELL_ARCH_ARM64 = 'sudo machinectl --quiet shell root@alarm /bin/bash -c $\'su -l alarm -c \\\'{command}\\\'\''
|
||||
|
|
3
utils.py
3
utils.py
|
@ -69,6 +69,7 @@ def run_cmd(cmd, cwd=None, keepalive=False, KEEPALIVE_TIMEOUT=30, RUN_CMD_TIMEOU
|
|||
self.__file = open(logfile, 'w')
|
||||
else:
|
||||
self.__file = None
|
||||
return self
|
||||
def __exit__(self, type, value, traceback):
|
||||
if self.__file:
|
||||
self.__file.close()
|
||||
|
@ -187,7 +188,7 @@ def get_pkg_details_from_name(name):
|
|||
def get_arch_from_pkgbuild(fpath):
|
||||
assert issubclass(type(fpath), os.PathLike)
|
||||
with open(fpath, 'r') as f:
|
||||
for line in f.readline():
|
||||
for line in f.read().split('\n'):
|
||||
if line.startswith('arch='):
|
||||
matches = re.findall('[\'\"]([^\'\"]+)[\'\"]', line)
|
||||
if not matches:
|
||||
|
|
|
@ -48,6 +48,8 @@ class pkgConfig:
|
|||
stages = ('prebuild', 'postbuild', 'update', 'failure')
|
||||
for stage in stages:
|
||||
setattr(self, stage, list())
|
||||
if not self.__extra:
|
||||
return
|
||||
for entry in self.__extra:
|
||||
assert type(entry) is dict and len(entry) == 1
|
||||
for k in entry:
|
||||
|
|
Loading…
Reference in a new issue