| diff -rU2 gobject-introspection-1.50.0.orig/giscanner/gdumpparser.py gobject-introspection-1.50.0/giscanner/gdumpparser.py |
| --- gobject-introspection-1.50.0.orig/giscanner/gdumpparser.py 2016-10-30 23:06:04.593000000 +0000 |
| +++ gobject-introspection-1.50.0/giscanner/gdumpparser.py 2016-10-30 23:56:17.679914000 +0000 |
| @@ -29,4 +29,5 @@ |
| import shutil |
| import subprocess |
| +import time |
| from xml.etree.cElementTree import parse |
| |
| @@ -151,4 +152,7 @@ |
| blob containing data gleaned from GObject's primitive introspection.""" |
| in_path = os.path.join(self._binary.tmpdir, 'functions.txt') |
| + |
| + assert os.path.isdir(self._binary.tmpdir), "tmpdir missing!" |
| + |
| with open(in_path, 'w') as f: |
| for func in self._get_type_functions: |
| @@ -160,4 +164,12 @@ |
| f.write(func) |
| f.write('\n') |
| + |
| + for i in range(10): |
| + if os.path.exists(in_path): |
| + break |
| + message.warn("functions.txt missing, waiting 2s (%s/10)" % (i+1,)) |
| + time.sleep(2) |
| + assert os.path.exists(in_path), "functions.txt still missing!" |
| + |
| out_path = os.path.join(self._binary.tmpdir, 'dump.xml') |
| |
| @@ -179,4 +191,12 @@ |
| # Clean up temporaries |
| raise SystemExit(e) |
| + |
| + for i in range(10): |
| + if os.path.exists(out_path): |
| + break |
| + message.warn("dump.xml missing, waiting 2s (%s/10)" % (i+1,)) |
| + time.sleep(2) |
| + assert os.path.exists(out_path), "dump.xml still missing" |
| + |
| return parse(out_path) |
| finally: |