summaryrefslogtreecommitdiff
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>2013-04-03 10:11:41 +0300
commite73485bcff692fa0f157a8e131b5a949a6d533db (patch)
treeeaeb6bb6b546a2ebdcde94bbd572596e4aca54dc
parent7b749bcdf027fabdf756dd0b8e129073600eb816 (diff)
downloadgit-buildpackage-e73485bcff692fa0f157a8e131b5a949a6d533db.tar.gz
git-buildpackage-e73485bcff692fa0f157a8e131b5a949a6d533db.tar.bz2
git-buildpackage-e73485bcff692fa0f157a8e131b5a949a6d533db.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>
-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 5b1007ec..86fb84da 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -517,7 +517,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