diff options
author | Mehdi Dogguy <dogguy@pps.jussieu.fr> | 2009-06-12 12:37:55 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2009-06-13 22:20:13 +0200 |
commit | 7de9f129883b95374240fa177948e12ddd17a342 (patch) | |
tree | 65e3c5cd1715e5d5265b1c0b71b310307ea823b3 /gbp/command_wrappers.py | |
parent | 882f9716762fb086046f58b5c22ff658e69a2298 (diff) | |
download | git-buildpackage-7de9f129883b95374240fa177948e12ddd17a342.tar.gz git-buildpackage-7de9f129883b95374240fa177948e12ddd17a342.tar.bz2 git-buildpackage-7de9f129883b95374240fa177948e12ddd17a342.zip |
add filter-pristine-tar
to filter upstream tarball before passing it to pristine-tar
Closes: #520722
Diffstat (limited to 'gbp/command_wrappers.py')
-rw-r--r-- | gbp/command_wrappers.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py index 1439cc59..8cfa7cb9 100644 --- a/gbp/command_wrappers.py +++ b/gbp/command_wrappers.py @@ -132,6 +132,19 @@ class UnpackTarArchive(Command): Command.__init__(self, 'tar', exclude + ['-C', dir, decompress, '-xf', archive ]) self.run_error = 'Couldn\'t unpack "%s"' % self.archive +class RepackTarArchive(Command): + """Wrap tar to Repack a gzipped tar archive""" + def __init__(self, archive, dir, dest): + self.archive = archive + self.dir = dir + + if archive.lower().endswith(".bz2"): + compress = "--bzip2" + else: + compress = "--gzip" + + Command.__init__(self, 'tar', ['-C', dir, compress, '-cf', archive, dest]) + self.run_error = 'Couldn\'t repack "%s"' % self.archive class RemoveTree(Command): "Wrap rm to remove a whole directory tree" |