mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-25 22:36:13 +01:00
Merge pull request #678 from adrianschroeter/lastsucceeded
add --lastsucceeded option for logfile display
This commit is contained in:
commit
8bebc13675
1
NEWS
1
NEWS
@ -1,4 +1,5 @@
|
||||
0.167
|
||||
- Added --lastsucceeded option for logfile display (requires OBS 2.11)
|
||||
- osc shell/chroot/wipe is now handled via build script (working for chroot and KVM only atm)
|
||||
- osc build --vm-type=qemu support for cross architecture builds
|
||||
|
||||
|
@ -5544,6 +5544,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
@cmdln.alias('remotebuildlogtail')
|
||||
@cmdln.option('-l', '--last', action='store_true',
|
||||
help='Show the last finished log file')
|
||||
@cmdln.option('--lastsucceeded', action='store_true',
|
||||
help='Show the last succeeded log file')
|
||||
@cmdln.option('-M', '--multibuild-package', metavar='MPAC',
|
||||
help='show log file for specified multibuild package')
|
||||
@cmdln.option('-o', '--offset', metavar='OFFSET',
|
||||
@ -5599,7 +5601,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
elif opts.offset:
|
||||
offset = int(opts.offset)
|
||||
strip_time = opts.strip_time or conf.config['buildlog_strip_time']
|
||||
print_buildlog(apiurl, project, package, repository, arch, offset, strip_time, opts.last)
|
||||
print_buildlog(apiurl, project, package, repository, arch, offset, strip_time, opts.last, opts.lastsucceeded)
|
||||
|
||||
def _find_last_repo_arch(self, repo=None, fatal=True):
|
||||
import glob
|
||||
|
@ -6118,7 +6118,7 @@ def buildlog_strip_time(data):
|
||||
return time_regex.sub(b'', data)
|
||||
|
||||
|
||||
def print_buildlog(apiurl, prj, package, repository, arch, offset=0, strip_time=False, last=False):
|
||||
def print_buildlog(apiurl, prj, package, repository, arch, offset=0, strip_time=False, last=False, lastsucceeded=False):
|
||||
"""prints out the buildlog on stdout"""
|
||||
|
||||
def print_data(data, strip_time=False):
|
||||
@ -6137,6 +6137,8 @@ def print_buildlog(apiurl, prj, package, repository, arch, offset=0, strip_time=
|
||||
query = {'nostream' : '1', 'start' : '%s' % offset}
|
||||
if last:
|
||||
query['last'] = 1
|
||||
if lastsucceeded:
|
||||
query['lastsucceeded'] = 1
|
||||
retry_count = 0
|
||||
while True:
|
||||
query['start'] = offset
|
||||
|
Loading…
Reference in New Issue
Block a user