summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-01-09 14:44:36 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-06-05 14:20:06 +0300
commit9f0acd1e691518cb031707bc4affdd262a5e5335 (patch)
tree9439b7788cd310d6a5b62af59974ccb18a9eb23f /gbp
parentf521ffaf513e58a0607b2e4e1645449e2e648393 (diff)
downloadgit-buildpackage-9f0acd1e691518cb031707bc4affdd262a5e5335.tar.gz
git-buildpackage-9f0acd1e691518cb031707bc4affdd262a5e5335.tar.bz2
git-buildpackage-9f0acd1e691518cb031707bc4affdd262a5e5335.zip
rpm.SpecFile: return correct patch file path in patchseries()
Fixes importing patches when the 'Patch:' tag contains an URI. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp')
-rw-r--r--gbp/rpm/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py
index 05b40e3c..88ccea32 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -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