From: Markus Lehtonen Date: Mon, 9 Jul 2012 14:19:27 +0000 (+0300) Subject: UpstreamSource: introduce is_tarball() method X-Git-Tag: debian/0.6.26~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6b97e34129efe6ae802af2019870352a8bdc93c;p=tools%2Fgit-buildpackage.git UpstreamSource: introduce is_tarball() method New method for checking if the sources are a tarball (possibly for checking if the sources are committable by pristine-tar). Signed-off-by: Markus Lehtonen --- diff --git a/gbp/scripts/common/import_orig.py b/gbp/scripts/common/import_orig.py index 576c7e5a..42c3d24d 100644 --- a/gbp/scripts/common/import_orig.py +++ b/gbp/scripts/common/import_orig.py @@ -47,7 +47,7 @@ def orig_needs_repack(upstream_source, options): """ if ((options.pristine_tar and options.filter_pristine_tar and len(options.filters) > 0)): return True - elif not upstream_source.is_orig(): + elif not upstream_source.is_tarball(): if len(options.filters): return True elif options.pristine_tar: @@ -225,7 +225,7 @@ def prepare_sources(source, pkg_name, pkg_version, pristine_commit_name, def repack_source(source, new_name, unpack_dir, filters, new_prefix=None): """Repack the source tree""" repacked = source.pack(new_name, filters, new_prefix) - if source.is_orig(): # the tarball was filtered on unpack + if source.is_tarball(): # the tarball was filtered on unpack repacked.unpacked = source.unpacked else: # otherwise unpack the generated tarball get a filtered tree repacked.unpack(unpack_dir, filters)