pydist-overrides ignores package names with hyphens

Bug #1140206 reported by Erica Windisch
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-defaults (Debian)
Fix Released
Unknown
python-defaults (Ubuntu)
Fix Released
Undecided
Unassigned
Quantal
Won't Fix
Undecided
Unassigned

Bug Description

This is a bug that has already been found and fixed in Debian. I have verified this bug exists in Quantal (python-defaults 2.7.3-0ubuntu7). Because Ubuntu's package is not based on Debian's, this fix has not made it into Ubuntu releases.

Here is a copy of the Debian bug report:

From: Vangelis Koukis <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: dh_python2 ignores package names with hyphens in
 debian/pydist-overrides
Date: Fri, 27 Jan 2012 21:51:19 +0200
Package: python
Version: 2.6.6-3+squeeze6
Severity: normal
Tags: patch

Hello,

dh_python2 parses debian/pydist-overrides incorrectly and ignores
lines referring to packages with hyphens in their names, which seem to be
totally valid names for python distributions, e.g.,

http://pypi.python.org/pypi/evasion-common/1.0.1
http://pypi.python.org/pypi/ls-thrift-py-hadoop/1-cdh3u2

So the following line:

My-package python-mypackage

is ignored.

Also see,
http://docs.python.org/distutils/examples.html#pure-python-distribution-by-module

which mentions the hyphen as an acceptable character:
"However, the distribution name is used to generate filenames, so you
should stick to letters, digits, underscores, and hyphens."

The problem seems to be with the definition of PYDIST_RE
in python-defaults-{2.6.6,2.7.2}/debpython/pydist.py:

PYDIST_RE = re.compile(r"""
    (?P<name>[A-Za-z][A-Za-z0-9_.]*) # Python distribution name

in which the name group is not allowed to contain hyphens.

Adding '\-' in the last bracket expression seems to be a fix for
the problem.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657665

Revision history for this message
Erica Windisch (ewindisch) wrote :

Likely fixed in Raring as that package is based on a newer Debian package.

Changed in python-defaults (Debian):
status: Unknown → Fix Released
Changed in python-defaults (Ubuntu):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in python-defaults (Ubuntu Quantal):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.