Doesn't handle invalid version numbers

Bug #248447 reported by James Westby
4
Affects Status Importance Assigned to Milestone
Ubuntu Distributed Development
Fix Released
Undecided
Unassigned
bzr-builddeb
Fix Released
High
Unassigned

Bug Description

python-debian doesn't handle invalid revision numbers:

Traceback (most recent call last):
  File "./import_package.py", line 364, in <module>
    sys.exit(main(*sys.argv[1:]))
  File "./import_package.py", line 351, in main
    import_package(package, distro, package_url)
  File "./import_package.py", line 327, in import_package
    update_db.import_package(local_dsc_path)
  File "plugins/builddeb/import_dsc.py", line 1707, in import_package
    versions = cl.versions
  File "/srv/package-import.canonical.com/scripts/python-debian/debian_bundle/changelog.py", line 476, in get_versions
    return [block.version for block in self._blocks]
  File "/srv/package-import.canonical.com/scripts/python-debian/debian_bundle/changelog.py", line 143, in _get_version
    return Version(self._raw_version)
  File "/srv/package-import.canonical.com/scripts/python-debian/debian_bundle/changelog.py", line 64, in __init__
    self.full_version = version
  File "/srv/package-import.canonical.com/scripts/python-debian/debian_bundle/changelog.py", line 93, in __setattr__
    raise VersionError(version)
debian_bundle.changelog.VersionError: Could not parse version: 2.0.37+cvs.JCW_PRE2_2037-1

e.g. apache2

Related branches

Revision history for this message
James Westby (james-w) wrote :

Hi,

There should be some way to avoid this, hopefully without
python-debian changes.

Thanks,

James

Changed in bzr-builddeb:
importance: Undecided → High
status: New → Confirmed
James Westby (james-w)
Changed in bzr-builddeb:
status: Confirmed → Triaged
James Westby (james-w)
Changed in bzr-builddeb:
milestone: none → 2.0.1
James Westby (james-w)
Changed in bzr-builddeb:
status: Triaged → Fix Committed
James Westby (james-w)
Changed in bzr-builddeb:
status: Fix Committed → Fix Released
James Westby (james-w)
Changed in udd:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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