diff options
author | Olav Vitters <ovitters@mageia.org> | 2012-03-19 14:26:13 +0000 |
---|---|---|
committer | Olav Vitters <ovitters@mageia.org> | 2012-03-19 14:26:13 +0000 |
commit | bb9952bf132c3ef74f714ecd52c04395644207d0 (patch) | |
tree | ff0d2eead4112a0cb9f50a233f124d6431a627cd /mgagnome | |
parent | 817c742dba44d94b96ac248b7a17978fe02cbea8 (diff) | |
download | mgagnome-bb9952bf132c3ef74f714ecd52c04395644207d0.tar mgagnome-bb9952bf132c3ef74f714ecd52c04395644207d0.tar.gz mgagnome-bb9952bf132c3ef74f714ecd52c04395644207d0.tar.bz2 mgagnome-bb9952bf132c3ef74f714ecd52c04395644207d0.tar.xz mgagnome-bb9952bf132c3ef74f714ecd52c04395644207d0.zip |
show last 15 lines of log output when 'bm -p --nodeps' fails
Diffstat (limited to 'mgagnome')
-rwxr-xr-x | mgagnome | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -337,7 +337,9 @@ class SpecFile(object): # Check patches still apply subprocess.check_call(['bm', '-p', '--nodeps'], cwd=self.cwd) except subprocess.CalledProcessError: - # XXX tail -n 15 SPECS/log.$PACKAGE + logfile = os.path.join(os.path.dirname(self.path), 'log.%s' % os.path.splitext(os.path.basename(self.path))[0]) + if os.path.exists(logfile) + subprocess.call(['tail', '-n', '15', logfile]) return False return True |