Mailinglist Archive: opensuse-buildservice (239 mails)

< Previous Next >
[opensuse-buildservice] [PATCH] get build log starting from the offset
  • From: "Ming Xi Wu" <mxwu@xxxxxxxxxx>
  • Date: Thu, 14 May 2009 03:16:23 -0600
  • Message-id: <4A0C51E7020000A500010C3E@xxxxxxxxxxxxxxxxxxxxxxx>
Hi,
When I fix some building errors on our build service, it's very painfull to
wait for loading all the build log especially Firefox's 38M bytes log, while I
only want to see the last few lines where the error meets. Luckily, web API
provides a parameter to set the offset which is not included in the CLI, so I
just add an option for the CLI to set the it.
Moreover, I hope osc can provide an API & option for only access the last
lines of build log. From my experience, it makes sense for 80% time.

BR,
Mingxi


diff --git a/osc/commandline.py b/osc/commandline.py
index cdcea14..5dec514 100755
--- a/osc/commandline.py
+++ b/osc/commandline.py
@@ -1801,6 +1801,8 @@


@cmdln.alias('bl')
+ @cmdln.option('-s', '--start', metavar='START',
+ help='get log starting from the offset')
def do_buildlog(self, subcmd, opts, platform, arch):
"""${cmd_name}: Shows the build log of a package

@@ -1820,7 +1822,11 @@
project = store_read_project(wd)
apiurl = store_read_apiurl(wd)

- print_buildlog(apiurl, project, package, platform, arch)
+ offset=0
+ if opts.start:
+ offset = int(opts.start)
+
+ print_buildlog(apiurl, project, package, platform, arch, offset)


@cmdln.alias('rbl')
< Previous Next >
Follow Ups