From a6b97e34129efe6ae802af2019870352a8bdc93c Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 9 Jul 2012 17:19:27 +0300 Subject: [PATCH] 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 --- gbp/scripts/common/import_orig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gbp/scripts/common/import_orig.py b/gbp/scripts/common/import_orig.py index 576c7e5..42c3d24 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) -- 2.7.4