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_publish.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_publish.py')
-rw-r--r-- | icklib/step_debian_publish.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/icklib/step_debian_publish.py b/icklib/step_debian_publish.py index 94d4934..2820959 100644 --- a/icklib/step_debian_publish.py +++ b/icklib/step_debian_publish.py @@ -41,6 +41,7 @@ class PublishDebianPackages(icklib.BuildStep): with self.run_state.logger: tempdir = self._copy_packages() self._remove_dbgsym_packages_from_changes_files(tempdir) + self._remove_buildinfo_from_changes_files(tempdir) self._debsign(tempdir) self._dput_targets(tempdir) self._dput_unstable(tempdir) @@ -65,6 +66,17 @@ class PublishDebianPackages(icklib.BuildStep): with open(filename, 'w') as f: f.write(modified) + def _remove_buildinfo_from_changes_files(self, tempdir): + for filename in self._changes_files(tempdir): + with open(filename) as f: + text = f.read() + modified = ''.join( + '{}\n'.format(line) + for line in text.splitlines() + if '.buildinfo' not in line) + with open(filename, 'w') as f: + f.write(modified) + def _changes_files(self, tempdir): return glob.glob(os.path.join(tempdir, '*.changes')) |