I'm working on some shared library and now stuck with the problem that some software refused to pick the newer version, but some has to use the latest since it has some crucial changes. So I need to keep 2 different versions of the same library.

The problem is I use sort of "fat" package libel.deb that contains header files needed for developers as well as the actual binary so compatible with the header files. I'm thinking of splitting the libel.deb into libel-dev.deb and libel1-bin.deb, libel2-bin.deb.

But the problem is the libel-dev contains headers compatible with le latest version of the library so developers actually need to install 2 packages: libel-dev and libel2-bin which is error-prone (very easy to install incompatible dev and bin packages).

How to go about this issue? Probably it is possible for dev-package to contain binaries as well...?


The contents of -dev, -bin, etc. packages is entirely convention, the package manager doesn't actually care. If you were actually uploading to the Ubuntu (or Debian) archive, various tools (and people) might check if the conventions are being followed, but for local packages you don't have to follow them if you don't want to. That said, there is often good reason to follow them — reducing confusing if nothing else.

That said, the various package relationships headers (Depends, Breaks, etc.) all support versions; if you declare the relationships correctly, the package manager should stop you from installing an incompatible set. It doesn't even sound like you need versions; just that libel-dev needs to Depends: on libel2-bin and libel2-bin needs to Conflicts: libel1-bin (if they're not co-installable).

You may find the Debian Policy Manuals “Declaring relationships between packages” helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.