ubuntu-projects can be created with unpackagable names

Bug #414218 reported by Rick Spencer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quickly
Fix Released
Medium
Didier Roche-Tolomelli

Bug Description

Steps:
1. create a project such as "super_text"
2. run quickly package

Result:
The package command fails:
...
echo "2" >debian/pycompat
rm -rf debian/python-module-stampdir
find . -name '*.pyc' -exec rm '{}' ';'
 dpkg-source -I.bzr -b super_text
dpkg-source: error: source package name `super_text' contains illegal character `_'
dpkg-buildpackage: error: dpkg-source -I.bzr -b super_text gave error exit status 255
debuild: fatal error at line 1334:
dpkg-buildpackage -rfakeroot -D -us -uc -tc -I.bzr failed
An error has occurred during package building
ERROR: package command failed

Expected:
Either the command should succeed, or the ubuntu-project create script should not create an unpackagable command.

Version info:
Quickly 0.1
  Python interpreter: /usr/bin/python 2.6.2
  Python standard library: /usr/lib/python2.6

  Quickly used library: /usr/lib/python2.6/dist-packages/quickly
  Quickly data path: /usr/share/quickly
  Quickly detected template directories:
          /usr/share/quickly/templates/

Copyright 2009 Canonical Ltd.
  #Author 2009 Rick Spencer
  #Author 2009 Didier Roche
https://launchpad.net/quickly

quickly comes with ABSOLUTELY NO WARRANTY. quickly is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 3 or later.

Related branches

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

thoughts on how to handle this?

Changed in quickly:
assignee: nobody → Didier Roche (didrocks)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I think we can substitute for the package name "_ "by "-" (which is allowed in package name). We keep the project name as it is, with _, just the package name got this substitution.
What do you think about that workaround?

PS: don't try to create a "test" project neither, python-mkdebian fails with this name. I opened a bug on pitti for that :)

Changed in quickly:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 0.2
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Tuis issue is a little more complex than excepted.

I think, the easier choice is to forbide project with _ and replace it with -. (so, the contrary of today's behavior). What do you think about it?

All project directories in a installed ubuntu system are with hyphens and not with underscore.

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

well ... python disallows -, but allows _. So we would need to use _ when creating python names.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

python disallows - in variable and function name. Not as a value (hopefully!). So, we can still enforce - for "project_name" (and not naming the variable project_name but project-name).

The issue with keeping _ is that all directories will be using - once the package installed (it's a mandatory). So, nothing fun for the developer…

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

This bug is fixed. I prevented _ and - and added digits.

It's quite difficult to use _ for python and - for package as for distutilsextra, we need to have the module name the same than the package one.

Changed in quickly:
status: Triaged → Fix Committed
Changed in quickly:
status: Fix Committed → Fix Released
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.