rpm.SpecFile: return correct patch file path in patchseries()
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 9 Jan 2013 12:44:36 +0000 (14:44 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 5 Jun 2014 11:20:06 +0000 (14:20 +0300)
Fixes importing patches when the 'Patch:' tag contains an URI.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/rpm/__init__.py

index 05b40e3cfd95c35d27615cdcc95cd2da720c8a27..88ccea32e9d2d8dd1cb2efc641f9c368b2aa1d4e 100644 (file)
@@ -518,7 +518,9 @@ class SpecFile(object):
         patchdir = os.path.dirname(self.specfile)
         for n, p in sorted(self.patches.iteritems()):
             if p['autoupdate'] and p['apply']:
-                series.append(Patch(os.path.join(patchdir, p['filename']), strip = int(p['strip'])))
+                fname = os.path.basename(p['filename'])
+                series.append(Patch(os.path.join(patchdir, fname),
+                                    strip = int(p['strip'])))
         return series