[projects/pld-builder.new] Process log from end and stop at first 'Processing files' occurence. Fixes case when it incorrectly
arekm
arekm at pld-linux.org
Sat Dec 5 10:36:08 CET 2015
commit 7a454cb55b6be6275ee008d1ec6000462817d38c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Dec 5 10:36:03 2015 +0100
Process log from end and stop at first 'Processing files' occurence. Fixes case when it incorrectly found 'Wote: xyz' (and tried to copy to ftp) files from %build or %install section (for example python3 builds own small rpm packages in distutils test).
PLD_Builder/util.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/PLD_Builder/util.py b/PLD_Builder/util.py
index 9051878..b623115 100644
--- a/PLD_Builder/util.py
+++ b/PLD_Builder/util.py
@@ -52,8 +52,11 @@ def clean_tmp(dir):
def collect_files(log, basedir = "/home"):
f = open(log, 'r')
rx = re.compile(r"^Wrote: (%s.*\.rpm)$" % basedir)
+ proc = re.compile(r"^Processing (files):.*$")
files = []
- for l in f.xreadlines():
+ for l in reversed(list(f.xreadlines())):
+ if proc.match(l):
+ break
m = rx.search(l)
if m:
files.append(m.group(1))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/7a454cb55b6be6275ee008d1ec6000462817d38c
More information about the pld-cvs-commit
mailing list