UpstreamSource.unpack: return UpstreamSource instance
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 6 Jun 2013 12:19:37 +0000 (15:19 +0300)
committerJun Wang <junbill.wang@samsung.com>
Wed, 27 Jan 2016 10:47:48 +0000 (18:47 +0800)
Trying to keep UpstreamSource in consistent state so that unpacked and
packed sources are kept in sync.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Conflicts:
gbp/scripts/import_srpm.py

gbp/scripts/common/import_orig.py
gbp/scripts/import_orig.py

index 42c3d24db850019bcb2b3f4e1e443aa510a6cf52..177ec324c710aa35b9f3b70a7a4290b2d22683d1 100644 (file)
@@ -228,6 +228,6 @@ def repack_source(source, new_name, unpack_dir, filters, new_prefix=None):
     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)
+        repacked.unpack(unpack_dir)
     return repacked
 
index f31126af8f3e119dfe71f15c8e14635ce0393421..fa6b2cbaf635116dab9e6678a21612102f3820b0 100644 (file)
@@ -312,7 +312,7 @@ def main(argv):
                 options.filter_pristine_tar, None, tmpdir)
         if not source.is_dir():
             unpack_dir = tempfile.mkdtemp(prefix='unpack', dir=tmpdir)
-            source.unpack(unpack_dir, options.filters)
+            source = source.unpack(unpack_dir, options.filters)
             gbp.log.debug("Unpacked '%s' to '%s'" % (source.path, source.unpacked))
 
         if orig_needs_repack(source, options):