UpstreamSource: introduce is_tarball() method
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 9 Jul 2012 14:19:27 +0000 (17:19 +0300)
committerJun Wang <junbill.wang@samsung.com>
Wed, 27 Jan 2016 10:03:49 +0000 (18:03 +0800)
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 <markus.lehtonen@linux.intel.com>
gbp/scripts/common/import_orig.py

index 576c7e5a7a35fe355313c9c1d78fde11a5294f76..42c3d24db850019bcb2b3f4e1e443aa510a6cf52 100644 (file)
@@ -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)