import-srpm: don't assume that source0 is orig_tarball
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 5 Jun 2012 01:19:03 +0000 (09:19 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Tue, 5 Jun 2012 01:19:03 +0000 (09:19 +0800)
when importing unpacked sources.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/scripts/import_srpm.py

index ab81a7196dad55c6e5653b02241a7d1e6b626c89..0e0cfd517f6c98cf7ee300192517e45ec89ebcf7 100755 (executable)
@@ -212,7 +212,7 @@ def main(argv):
             if options.unpacked:
                files = [os.path.basename(patch['filename']) for patch in spec.patches.itervalues()]
                for src in spec.sources.itervalues():
-                  if src['num']:
+                  if not spec.orig_file or src.filename != spec.orig_file:
                      files.append(src['filename'])
                files.append(os.path.basename(pkg))
                for fname in files: