libversion update question

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Max msuraev at sysmocom.de
Fri Oct 20 11:23:27 UTC 2017


Hi.

When we're making new library release we got to make sure that the API/ABI versions
are properly updated by correctly setting *_LIBVERSION which has 3 components:
current[:revision[:age]].

That's documented in
https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

The rules are as follows:

1. If the library source code has changed at all since the last update, r++;
2. If any interfaces have been added, removed, or changed since the last update, c++,
r=0;
3. If any interfaces have been added since the last public release, a++;
4. If any interfaces have been removed or changed since the last public release, a=0.

What's not clear to me is how those rules should be used. Do we apply them sequentially?

For example, I've added function lol_what() to public API of my library with previous
LIBVERSION=3:2:1 and would like to compute new LIBVERSION properly.

According to rule #1 I've got to update revision: 3:3:1

According to rule #2 I've got to update current and reset revision: 4:0:1

The rules are conflicting so let's assume latest rule wins and apply further rules:

According to rule #3 I've got to increase age: 4:0:2

So far so good but do correct me if I'm misunderstanding it.

Now LIBVERSION=4:0:2 is released, I've removed lol_what() and added foobar()
functions. Let's bump the LIBVERSION:

#1: 4:1:2

#2: 5:0:2

#3: 5:0:3

#4: 5:0:0

Am I interpreting this right? We only increase revision if no interfaces have been
added, removed, or changed since the last update? This means that "current" and
"revision" increments are mutually exclusive.

-- 
Max Suraev <msuraev at sysmocom.de> http://www.sysmocom.de/
======================================================================= 
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93 
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B 
* Geschaeftsfuehrer / Managing Director: Harald Welte 







More information about the OpenBSC mailing list