Skip to content
Snippets Groups Projects
Commit e2ea6d90 authored by Piotr Ożarowski's avatar Piotr Ożarowski
Browse files

warn if both XS-Python-Version and X-Python-Version are defined

parent 4d0051cb
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ python-defaults (2.7.2-2) UNRELEASED; urgency=low
(closes: 630502, thanks to Gediminas Paulauskas for the original patch)
- warn if public Python extension is linked to libpython2.X, fail if it's
linked to a wrong version
- warn if both XS-Python-Version and X-Python-Version are defined
-- Piotr Ożarowski <piotr@debian.org> Sun, 12 Jun 2011 13:28:48 +0200
......
......@@ -41,6 +41,7 @@ class DebHelper(object):
log.error('cannot find debian/control file')
exit(15)
xspv = xpv = False
for line in fp:
if not line.strip():
source_section = False
......@@ -74,10 +75,17 @@ class DebHelper(object):
elif line.startswith('Source:'):
self.source_name = line[7:].strip()
elif source_section:
if line.startswith('XS-Python-Version:') and not self.python_version:
self.python_version = line[18:].strip()
if line.startswith('XS-Python-Version:'):
xspv = True
if not self.python_version:
self.python_version = line[18:].strip()
if line.startswith('X-Python-Version:'):
xpv = True
self.python_version = line[17:].strip()
if xspv and xpv:
log.error('Please remove XS-Python-Version from debian/control')
log.debug('source=%s, binary packages=%s', self.source_name, \
self.packages.keys())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment