[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Dependency from a specific binary version



Hi,

in a library that I want to package for Debian, there is a runtime check
that another library has the same version number as at compile time:

-------------------------------8<-------------------------------------
float cfitsio_version;
const float cfitsio_version_diff = fits_get_version(&cfitsio_version)
    - (CPL_CFITSIO_VERSION);

if (cfitsio_version_diff < -100.0 * FLT_EPSILON) {
   // set error
} else if (cfitsio_version_diff > 100.0 * FLT_EPSILON) {
  // set error
}
-------------------------------8<-------------------------------------

This looks ugly enough to me :-) and should probably go into the package
dependency. How should one do that? The easiest way would be to put the
cfitsion version number directly into the control file:

-------------------------------8<-------------------------------------
Build-Depends: debhelper (>= 7.0.50), autotools-dev, libcfitsio3-dev (= 3.280)
....
Package: libcplcore12
Depends: ${misc:Depends}, ${shlibs:Depends}, libcfitsio3 (= 3.280)
....
-------------------------------8<-------------------------------------

This however requires editing the control file whenever a new version of
libcfitsio3 is available. Is there a better way to do this?

Ofcourse, the best way would be to remove the dependency at all, and
after looking into the libcfitsio3 development, binary compability seems
to be ensured for the latest versions. I am in contact with the upstream
authors to hear their position on that.

Best regards

Ole


Reply to: