1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
Ctk version numbers are based around the libtool & debian packaging system.
------------------------------------------------------------------------------
Library versioning
------------------------------------------------------------------------------
Ctk provides various interfaces (functions, public variables, etc) which a
program linked against it may use. To guarantee that these interfaces are
available we assign a number to each new interface. The 'current' version
number of ctk is the latest interface that ctk provides. Ever time, I add a
feature, I increase the 'current' version number. Sometimes, I remove an
interface because it is useless, old, crufy, ugly, or for any number of
petty reasons. When this happens people who link against ctk need to still
function, so we have an 'age' version number which is how many interfaces
back ctk supports.
To draw a picture:
0 1 2 3 4 5 6 7 8 9 10 11 <-- current = 11
------------------------[++++++++++++++++++++]
<----- age = 5 --->
Here we see a ctk release that supports interfaces 6 through 11. So, the
current version number is 11, and the age is 5. Notice that this system only
allows for a range to be specified. (eg: ctk can't provide 2-4 & 10-11)
Another version 'revision' is used by me when I fix bugs that do not impact
what interfaces are available. (eg: core dump on ctk_window_new)
Further, I am not so inconsiderate that I will remove interfaces very
frequently. I will queue up functions I intend to remove in ctk/BLACKLIST.
Then I will kill them all in one fell swoop when I get angry.
These versions are arranged as <current>.<age>.<revision>.
Be warned that this is completely different from <major>.<minor>.<patch> as
<age> increases with <current> except when I destroy old interfaces.
------------------------------------------------------------------------------
Packages and versions
------------------------------------------------------------------------------
In the interest of allowing programs compiled with older ctk versions to
run, and empowering developers to work on older versions I will be including
a 'death count' (my term) in the package name. Whenever I change something
that breaks binary compatability (flush the BLACKLIST or change an
interface), I will increase the death count.
Note, libtool uses a major of: current - age (on debian linux), which means
happiness, the soname doesn't change until I change the death count and want
it to change. It will not be the same number as the death count
unfortunately, but.. oh well!
Ctk packages will be named:
libctk<death count>_<current>.<age>.<revision>_<arch>.deb
Includes /usr/lib/libctk-<death count>.so.<major>.<age>.<revision>
With soname: libctk-<death count>.so.<major>
User docs (when/if they're written) [ ctrl-o and ctrl-r, etc ]
libctk<death count>-dev_<current>.<age>.<revision>_<arch>.deb
Includes /usr/include/ctk-<death count>/ctk*.h
/usr/lib/libctk-<death count>.a.<major>.<age>.<revision>
/usr/lib/libctk-<death count>.la.<major>.<age>.<revision>
Symlink:
/usr/lib/libctk-<death count>.a to the above
/usr/lib/libctk-<death count>.la to the above
/usr/lib/libctk-<death count>.so to libctk-<dc>.so.<major>
Developer docs
Depends on above.
libctk-dev_<current>.<age>.<revision>_all.deb
Includes symlinks:
/usr/include/ctk to newest /usr/include/ctk-<dc>
/usr/lib/libctk.so to newest /usr/lib/libctk-<dc>.so
/usr/lib/libctk.la to newest /usr/lib/libctk-<dc>.la
/usr/lib/libctk.a to newest libctk-<dc>.a
Depends on above
------------------------------------------------------------------------------
Changing ctk version numbers (recipe)
------------------------------------------------------------------------------
When an bug is fixed:
increment CTK_REVISION
When a function is added:
increment CTK_CURRENT
increment CTK_AGE
zero CTK_REVISION
When the BLACKLIST is flushed or a interface is changed:
increment CTK_DEATHCOUNT
increment CTK_CURRENT
zero CTK_AGE
zero CTK_REVISION
-- Wesley Terpstra <wterpstra@stormix.com>
|