Comment 1 for bug 314575

Revision history for this message
Gerry Reno (greno-verizon) wrote :

I have opened a thread on distutils-sig and have proposed changes to distutils to properly handle 'version' and 'release' strings between all the various distutils targets. This has been a big problem that has plagued distro packagers of python apps for RPM-based distros and caused them to use mechanisms other than 'bdist_rpm' for generating RPMS which has led to much confusion. If the proposed changes are made to distutils then distro packagers will find coordinated behavior between the targets such as 'sdist' and 'bdist_XXX'.
In the meantime I have created a solution that can be used immediately and will work with 'sdist' and 'bdist_XXX' for OpenERP.
The names generated will match with the proposed distutils changes.

Patches against client revision 878:
===========================================================
Client Patch for bin/release.py:
25c25,32
< version = '5.0.0_rc3'
---
> # here the version must always be set to numeric: 'N.N.N', eg: '5.0.0'
> version = '5.0.0'
> # pre-release candidates: release='0_rcX'(X=rc version), eg: '0_rc2', we preface with '0_' to ensure lexical ordering
> # final release: release='1', ensures final release is always lexically greater than the pre-release candidates.
> # in setup.cfg in [bdist_rpm] make sure 'release' matches release as set here.
> release = '0_rc3'
> if sys.argv[1] != 'bdist_rpm':
> version = version+'-'+release
===========================================================
Client Patch for setup.cfg:
8c8,9
< release=1
---
> # release must match 'release' as set in bin/release.py
> release=0_rc3
===========================================================

Patches against server revision 1596
===========================================================
Server Patch for bin/release.py:
25c25,32
< version = '5.0.0_rc3'
---
> # here the version must always be set to numeric: 'N.N.N', eg: '5.0.0'
> version = '5.0.0'
> # pre-release candidates: release='0_rcX'(X=rc version), eg: '0_rc2', we preface with '0_' to ensure lexical ordering
> # final release: release='1', ensures final release is always lexically greater than the pre-release candidates.
> # in setup.cfg in [bdist_rpm] make sure 'release' matches release as set here.
> release = '0_rc3'
> if sys.argv[1] != 'bdist_rpm':
> version = version+'-'+release
===========================================================
Server Patch for setup.cfg:
8c8,9
< release=1
---
> # release must match 'release' as set in bin/release.py
> release=0_rc3
===========================================================

These patches solve the conflicting RPM ordering for OpenERP client and server.
There also needs to be a similar mechanism created for client-web as well. I did not have time to look into that.
-Gerry