diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-12-25 12:34:38 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-12-25 12:34:38 +0200 |
commit | 2c4b176eb61db337e6cb9f08fa191fdd727f8664 (patch) | |
tree | ce8da464fcc057a825dfb87f48d3cd45a5220af5 /icklib/step_debian_ci_upload.py | |
parent | 1cb746e1495ba43eca99534871cfa0070d90c107 (diff) | |
download | ick-2c4b176eb61db337e6cb9f08fa191fdd727f8664.tar.gz |
Removve .buildinfo lines from .changes
These record the build environment for reproducible builds, which
is useful, but not they break reprepo 4.17.1-1, which is the newst
version available outside of Debian experimental.
Diffstat (limited to 'icklib/step_debian_ci_upload.py')
-rw-r--r-- | icklib/step_debian_ci_upload.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/icklib/step_debian_ci_upload.py b/icklib/step_debian_ci_upload.py index 06b3401..e474d01 100644 --- a/icklib/step_debian_ci_upload.py +++ b/icklib/step_debian_ci_upload.py @@ -49,6 +49,7 @@ class UploadDebianPackagesToCIRepo(icklib.BuildStep): # dget doesn't URL-decode file:// URLs. So we do that. changes_url = urllib.unquote(changes_url) self._fixup_dbgsym(changes_url) + self._fixup_buildinfo(changes_url) cliapp.runcmd( ['dget', '-du', changes_url], cwd=incoming, @@ -88,3 +89,19 @@ class UploadDebianPackagesToCIRepo(icklib.BuildStep): with open(path, 'w') as f: f.write(fixed) + + def _fixup_buildinfo(self, changes_url): + scheme, _, path, _, _, _ = urlparse.urlparse( + changes_url) + assert scheme == 'file' + + with open(path) as f: + text = f.read() + + fixed = ''.join( + '{}\n'.format(line) + for line in text.splitlines() + if '.buildinfo' not in line) + + with open(path, 'w') as f: + f.write(fixed) |