From 1ef1c3a0668a4e3067f28bcbffab6bba3e95dae7 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sun, 8 Sep 2019 18:33:02 +0800 Subject: [PATCH] add missing commands --- buildbot.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/buildbot.py b/buildbot.py index af3e9b2..98e4940 100755 --- a/buildbot.py +++ b/buildbot.py @@ -511,17 +511,13 @@ updmgr = updateManager() -def info(retf='human'): - if retf == 'pkgconfigs': - ret = jobsmgr.pkgconfigs - elif retf == 'jobsmgr': - ret = jobsmgr - else: - # retf = 'human' - ret = str(jobsmgr) +def info(human=False): + ret = "" + if human is False: + ret += str(jobsmgr) ret += '\nhuman-readable:\n' - ret += "".join([f"{k} = {jobsmgr.jobs[k]}\n" for k in jobsmgr.jobs]) - ret += f"idle: {jobsmgr.idle}" + ret += "".join([f"{k} = {jobsmgr.jobs[k]}\n" for k in jobsmgr.jobs]) + ret += f"idle: {jobsmgr.idle}" return ret def rebuild_package(pkgdirname, clean=False): @@ -558,7 +554,10 @@ def extras(action, pkgname=None): return extra_readmainlog(debug=True) elif action == "readpkglog": pkgname = str(pkgname) - return extra_readpkglog(pkgname) + return extra_readpkglog(pkgname, update=False) + elif action == "readpkgupdlog": + pkgname = str(pkgname) + return extra_readpkglog(pkgname, update=True) return False def run(funcname, args=list(), kwargs=dict()):