Using base name of source file in spec
authorZhang Qiang <qiang.z.zhang@intel.com>
Thu, 31 May 2012 08:02:55 +0000 (16:02 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Thu, 31 May 2012 08:02:55 +0000 (16:02 +0800)
As some sources are url style, so basename should be extraced to
be used.

gbp/scripts/import_srpm.py

index 59fe6ce6da05da32c3c94c11e24ea9a21e54260c..e57976103001f3b85377105ab7353369fb785a66 100755 (executable)
@@ -210,7 +210,7 @@ def main(argv):
 
             orig_tarball = None
             if options.unpacked:
-               files = [patch['filename'] for patch in spec.patches.itervalues()]
+               files = os.path.basename([patch['filename']) for patch in spec.patches.itervalues()]
                for src in spec.sources.itervalues():
                   if src['num']:
                      files.append(src['filename'])