diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-05-13 10:39:55 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-05-14 18:49:05 +0200 |
commit | 8897b5181458af0f4237fbc0344c1ba9ceb9ddcd (patch) | |
tree | 1feb26f97ba7fe197a9054a2716547ce258c159e | |
parent | 2ba3140affdff258716b0f156c2c205ee9fcdd2f (diff) | |
download | freeipa-8897b5181458af0f4237fbc0344c1ba9ceb9ddcd.tar.gz freeipa-8897b5181458af0f4237fbc0344c1ba9ceb9ddcd.tar.xz freeipa-8897b5181458af0f4237fbc0344c1ba9ceb9ddcd.zip |
Remove leading zero from IPA_NUM_VERSION
The numeric IPA_NUM_VERSION contained a leading zero, so it was treated
as octal value in Python code instead of decimal.
https://fedorahosted.org/freeipa/ticket/3622
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | ipapython/version.py.in | 17 |
2 files changed, 18 insertions, 1 deletions
@@ -10,7 +10,7 @@ TARGET ?= master SUPPORTED_PLATFORM ?= redhat -IPA_NUM_VERSION ?= $(shell printf %02d%02d%02d $(IPA_VERSION_MAJOR) $(IPA_VERSION_MINOR) $(IPA_VERSION_RELEASE)) +IPA_NUM_VERSION ?= $(shell printf %d%02d%02d $(IPA_VERSION_MAJOR) $(IPA_VERSION_MINOR) $(IPA_VERSION_RELEASE)) # After updating the version in VERSION you should run the version-update # target. diff --git a/ipapython/version.py.in b/ipapython/version.py.in index 9cf8ddbe8..04cf5f81f 100644 --- a/ipapython/version.py.in +++ b/ipapython/version.py.in @@ -20,9 +20,26 @@ # The full version including strings VERSION="__VERSION__" + # Just the numeric portion of the version so one can do direct numeric # comparisons to see if the API is compatible. +# +# How NUM_VERSION was generated changed over time: +# Before IPA 3.1.3, it was simply concatenated decimal numbers: +# IPA 2.2.2: NUM_VERSION=222 +# IPA 2.2.99: NUM_VERSION=2299 (development version) +# IPA 3.1.0: NUM_VERSION=310 +# IPA 3.1.3: NUM_VERSION=313 +# In IPA 3.1.4 and 3.2.0, the version was taken as an octal number due to a bug +# (https://fedorahosted.org/freeipa/ticket/3622): +# IPA 3.1.4: NUM_VERSION=12356 (octal 030104) +# IPA 3.2.0: NUM_VERSION=12416 (octal 030200) +# After IPA 3.2.0, it is decimal number where each part has two digits: +# IPA 3.2.1: NUM_VERSION=30201 +# IPA 3.2.99: NUM_VERSION=30299 (development version) +# IPA 3.3.0: NUM_VERSION=30300 NUM_VERSION=__NUM_VERSION__ + # The version of the API. API_VERSION=u'__API_VERSION__' |