summaryrefslogtreecommitdiff
path: root/icklib/step_debian_ci_upload.py
diff options
context:
space:
mode:
Diffstat (limited to 'icklib/step_debian_ci_upload.py')
-rw-r--r--icklib/step_debian_ci_upload.py17
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)