After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 477709 - Use libtool versioning info
Use libtool versioning info
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 697398 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-09-17 10:01 UTC by Emmanuele Bassi (:ebassi)
Modified: 2013-04-06 14:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use macros to derive the libtool -version-info argument (3.59 KB, patch)
2007-09-17 10:01 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
Add Libtool versioning (2.38 KB, patch)
2013-03-22 21:37 UTC, Sébastien Wilmet
reviewed Details | Review

Description Emmanuele Bassi (:ebassi) 2007-09-17 10:01:05 UTC
here's a small patch for generating and using the versioning information for libtool from the gtksourceview version.

the patch requires that each time the API changes (additions, removals, changes), the gtksourceview_interface_age is reset to 0, while for every release that doesn't change the API, the number is increased by one. everything else needed by libtool is generated by m4 macros and from the gtksourceview version numbers.

the patch also removes AM_MAINTAINER_MODE which doesn't do what the name implies and should never be used in any project:

  http://www.mcs.vuw.ac.nz/cgi-bin/info2www?(automake)maintainer-mode
  http://www.ecos.sourceware.org/ml/automake/2002-04/msg00094.html

and friends (really: just search AM_MAINTAINER_MODE on google and you'll see what I mean).
Comment 1 Emmanuele Bassi (:ebassi) 2007-09-17 10:01:44 UTC
Created attachment 95718 [details] [review]
Use macros to derive the libtool -version-info argument
Comment 2 Sébastien Wilmet 2013-03-22 21:37:07 UTC
Created attachment 239579 [details] [review]
Add Libtool versioning
Comment 3 Sébastien Wilmet 2013-03-22 21:41:08 UTC
The normal algorithm for updating the Libtool -version-info is not really complicated. The advantage is that smaller numbers are used.

Since -version-info was not used, it was the version 0:0:0. The algorithm has been applied to the current situation (ABI break), see bug #696412.
Comment 4 Ignacio Casal Quinteiro (nacho) 2013-03-22 21:41:09 UTC
Review of attachment 239579 [details] [review]:

Looks good to me but you need approval from the release team, so ask for permission.
Comment 5 Sébastien Wilmet 2013-03-23 00:28:23 UTC
> # For development releases, keep the same numbers.

It seems that for dev releases the numbers are also updated, except for REVISION which is set to 0. But the reason remains unclear to me, the documentation doesn't explain what to do for development releases.

Maybe it's better to update the numbers wrt the previous _stable_ version, I don't know.
Comment 6 Sébastien Wilmet 2013-03-23 12:34:22 UTC
Approved:

https://mail.gnome.org/archives/release-team/2013-March/msg00226.html
Comment 7 Emmanuele Bassi (:ebassi) 2013-03-23 14:11:35 UTC
good lord, I forgot about this patch.

(In reply to comment #5)
> > # For development releases, keep the same numbers.
> 
> It seems that for dev releases the numbers are also updated, except for
> REVISION which is set to 0. But the reason remains unclear to me, the
> documentation doesn't explain what to do for development releases.
> 
> Maybe it's better to update the numbers wrt the previous _stable_ version, I
> don't know.

for what it's worth, this is the documentation I use for the same pattern in Clutter:

# • for stable releases: increase the interface age by 1 for each release;
#   if the API changes, set to 0. interface_age and binary_age are used to
#   create the soname of the shared object:
#
#  (<minor> * 100 + <micro>) - <interface_age>
#
# this allows using the same soname for different micro-releases in case
# no API was added or deprecated. for instance:
#
#   clutter 1.2.0  -> 100 * 2 + 0  = 200, interface age = 0 -> 200
#   clutter 1.2.2  -> 100 * 2 + 2  = 202, interface age = 2 -> 200
#   clutter 1.2.4  -> 100 * 2 + 4  = 204, interface age = 4 -> 200
#   [ API addition, deprecation ]
#   clutter 1.2.6  -> 100 * 2 + 6  = 206, interface age = 0 -> 206
#   clutter 1.2.8  -> 100 * 2 + 8  = 208, interface age = 2 -> 206
#   clutter 1.2.10 -> 100 * 2 + 10 = 210, interface age = 4 -> 206
#   ...
#
# • for development releases: keep clutter_interface_age to 0
m4_define([clutter_interface_age], [0])

though, strictly speaking, we only allow API addition and deprecation during development cycles, so the interface_age value should monotonically increase during stable cycles.
Comment 8 Sébastien Wilmet 2013-03-24 18:24:09 UTC
For development releases, I finally think it's better to keep the same -version-info. If a public function is added, a dev release is made, and then the function is renamed before the stable version, if the -version-info is updated for each dev release, we end up with a soname version bump for the next stable release, although from the point of view of stable releases, only one function was added.

Anyway there was no -version-info for years, so it's not really a problem to not update it for dev releases.
Comment 9 Tony Houghton 2013-04-06 14:54:54 UTC
*** Bug 697398 has been marked as a duplicate of this bug. ***