OK, Gerry, I have addressed your concerns.
1) Note that the release number is still squelched in the case of RPMs compiled from SVN checkouts of distutils packages. This is so that alpha, beta or release candidate packages can upgrade SVN checkouts without extra intervention from the packager. Alpha, beta and rc packages do obey the release variable just fine. The whole intention here is to put a sensible release variable and a sensible version variable when no release variable was specified. 2) I have used a relsep variable that you can tweak to use a dot or an elephant if your package policy wants that (note that the Mandrake policy says nothing about that). 3) If anything non-numeric is specified in the release, then you as a packager are indicating that you do not want this automatic behavior and the modifications are automatically skipped. Note that the whole point of the patch is to AVOID this extra work of specifying the release for prerelease packages. 4) The cases you spoke about are addressed.
Attached is the patch. Here is a map table with the default release (which happens to be "1":
----------------------- [rudd-o@tobey ~]$ for a in `cat versions` ; do python bdist_rpm.py rewrite $a 1 ; done 1.0-1 1.0-1 1.1-1 1.1-1 1.1a-1 1.1-0.1.a 1.1a2-1 1.1-0.1.a2 1.1b1-1 1.1-0.1.b1 1.1dev-1 1.1-0.0.dev 1.1svn-1 1.1-0.0.svn 1.1dev-r56554-1 1.1-0.0.56554dev 1.1svn-r400-1 1.1-0.0.400svn 1.1svn-r401-1 1.1-0.0.401svn 1.2svn-r34-1 1.2-0.0.34svn 5.5rc2-1 5.5-0.1.rc2 0.9-1 0.9-1 0.9.8-1 0.9.8-1 20080706-1 20080706-1 A2005-1 A2005-1 ABCDEF15-1 ABCDEF15-1 abc45-1 abc45-1 0.9alpha23-1 0.9-0.1.alpha23 A2-1 A2-1 --------------------
Now here is a map table with a release with a non-integer release:
---------------- [rudd-o@tobey ~]$ for a in `cat versions` ; do python bdist_rpm.py rewrite $a 0_1 ; done 1.0-0_1 1.0-0_1 1.1-0_1 1.1-0_1 1.1a-0_1 1.1a-0_1 1.1a2-0_1 1.1a2-0_1 1.1b1-0_1 1.1b1-0_1 1.1dev-0_1 1.1dev-0_1 1.1svn-0_1 1.1svn-0_1 1.1dev-r56554-0_1 1.1dev_r56554-0_1 1.1svn-r400-0_1 1.1svn_r400-0_1 1.1svn-r401-0_1 1.1svn_r401-0_1 1.2svn-r34-0_1 1.2svn_r34-0_1 5.5rc2-0_1 5.5rc2-0_1 0.9-0_1 0.9-0_1 0.9.8-0_1 0.9.8-0_1 20080706-0_1 20080706-0_1 A2005-0_1 A2005-0_1 ABCDEF15-0_1 ABCDEF15-0_1 abc45-0_1 abc45-0_1 0.9alpha23-0_1 0.9alpha23-0_1 A2-0_1 A2-0_1 ------------------
I hope the next note you have about this patch is as constructive as the last one. The intention here is to solve a problem, not to bikeshed.