summaryrefslogtreecommitdiffstats
path: root/mgagnome
diff options
context:
space:
mode:
authorOlav Vitters <ovitters@mageia.org>2012-03-19 14:26:13 +0000
committerOlav Vitters <ovitters@mageia.org>2012-03-19 14:26:13 +0000
commitbb9952bf132c3ef74f714ecd52c04395644207d0 (patch)
treeff0d2eead4112a0cb9f50a233f124d6431a627cd /mgagnome
parent817c742dba44d94b96ac248b7a17978fe02cbea8 (diff)
downloadmgagnome-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-xmgagnome4
1 files changed, 3 insertions, 1 deletions
diff --git a/mgagnome b/mgagnome
index 944b373..ac2339f 100755
--- a/mgagnome
+++ b/mgagnome
@@ -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