PBR

pbr should use dev prefix instead of a for git versions

Bug #1200984 reported by Dirk Mueller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
Fix Released
Medium
Unassigned
oslo-incubator
Invalid
Undecided
Unassigned

Bug Description

http://tarballs.openstack.org/oslo.config/oslo.config-master.tar.gz currently has a auto-generated version of 1.2.0a2

due to wrong version being hardcoded in setup.cfg (version = 1.2.0, while git tag version is 1.2.0a3-2, aka 1.2.0a3.a2)

Revision history for this message
Dirk Mueller (dmllr) wrote :

master tarball is 1.2.0.a2.g4f44b97
release tarball is 1.2.0a3

>>> parse_version('1.2.0a2.g4f44b97') < parse_version('1.2.0a3')
True

while the pbr generated version would be

1.2.0a3.2.g4f44b97

>>> parse_version('1.2.0a3.2.g4f44b97') < parse_version('1.2.0a3')
False

Revision history for this message
Mark McLoughlin (markmc) wrote :

I think this is more of an issue with pbr's use of the 'a' prefix

From the review:

  I guess the version in setup.cfg is really there for the period after 1.1.0 was released and the work we were doing was doing to end up in 1.2.0 rather than 1.1.1 ... pbr can't figure that out for itself

  So, yeah - we could remove this ... but then I'm likely to forget to bump it to 1.3.0 after 1.2.0 is released

  Also, when i *do* bump it to 1.3.0, I'll do a bunch of commits and the version will go to e.g. 1.3.0a8.gabcedf and then I'll tag 1.3.0.a1

  i.e. the version that pbr generates is fundamentally incompatible. Removing the version from setup.cfg really just defers the issue

  Just looking at http://www.python.org/dev/peps/pep-0386/#the-new-versioning-algorithm I reckon it would be more correct to do:

    1.2.0.dev2.g4f44b97

i.e. if you build from git, it's a pre-release not an alpha-release

Changed in oslo:
status: New → Invalid
Revision history for this message
Monty Taylor (mordred) wrote :

This is important, and like Mark said, we should change the generated versions to have dev prefixes, not alpha. It's too late in this cycle to make that kind of change, but we should definitely do it next cycle.

summary: - oslo.config versioning incompatible with pbr versioning
+ pbr should use dev prefix instead of a for git versions
Changed in pbr:
status: New → Triaged
importance: Undecided → Medium
Changed in pbr:
status: Triaged → Confirmed
Revision history for this message
Ben Nemec (bnemec) wrote :

To my knowledge, pbr is now generating dev versions in this case so I believe this is fixed.

Changed in pbr:
status: Confirmed → 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.