<div class="gmail_quote">On Tue, Mar 9, 2010 at 11:36 AM, Scott James Remnant <span dir="ltr"><<a href="mailto:scott@ubuntu.com">scott@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Tue, 2010-03-09 at 10:36 -0500, Evan wrote:<br>
<br>
> In a normal scenario, for a library X, we would have the package libX.<br>
> When a new version of the lib is released upstream, the new version<br>
> gets packaged,<br>
> and the version field of the package gets bumped appropriately.<br>
><br>
</div>No, not true at all.<br>
<br>
This is the scenario for *badly maintained* libraries, which do not<br>
maintain their ABI and instead consider the "upstream version"<br>
canonical. Sadly glib, GTK+, etc. were examples of this in the past<br>
which is why they have "2.0" in their names :-(<br>
<br>
The *correct* way for a library, and which the vast majority follow, is<br>
that each library has its ABI versioned, and this is reflected in the<br>
library's SONAME<br>
<br>
For example, the first version of a library would be:<br>
<br>
libexample.so.0<br>
<br>
The second version would be<br>
<br>
libexample.so.1<br>
<br>
The third version<br>
<br>
libexample.so.2<br>
<br>
etc.<br>
<br>
Minor versions are permitted in the library name, so if you add new<br>
API/ABI without breaking any existing, you might name it:<br>
<br>
libexample.so.2.1<br>
<br>
this still has a SONAME of<br>
<br>
libexample.so.2<br>
<br>
(since it is compatible)<br>
<br>
<br>
Packaging policy *always* includes the SONAME of the library in its<br>
binary package name, e.g. libexample0 libexample1 libexample2<br>
<br>
Thus libraries with different SONAMEs are always parallel installable.<br>
<br>
<br>
For the minor version example, both would be libexample2 but different<br>
versions of it. dpkg provides the "shlibs" and "symbols" systems for<br>
identifying the minimum required version of a library at build time, and<br>
encoding this in the dependencies.<br>
<br>
Thus a package built against libexample2 that actually required symbols<br>
from 2.1 would have libexample2 (>= 2.1) in its dependency list, while a<br>
package built against the earlier version (or that did not require<br>
symbols from 2.1) would have just libexample2<br>
<br>
Both can use the same library package<br></blockquote><div><br>Thank you so much for clarifying, that makes more sense.<br>Now let's throw symlinks into the mix :)<br><br>Suppose libexample is at version 1.0 upstream.<br>
The previous version was version 0.5.<br>The current package is named libexample0.5<br>It has a version field of 1.0<br></div></div>It installs libexample.so.1.0<br>It also installs the symlink libexample.so.0.5 -> libexample.so.1.0<br>
<br>Now as I see it the problem exists in one of two places:<br>Either upstream misincremented the major version number<br>(without changing the API/ABI), or it has been mispackaged.<br><br>Does this make sense?<br><br>Thanks,<br>
Evan<br>