On Thursday, September 26, 2019 7:30 AM, James Clarke <[email protected]> pondered: >>On 26 Sep 2019, at 03:05, Aaron M. Ucko <[email protected]> wrote: >> >> "Getz, Robin" <[email protected]> writes: >> >>> which that means when someone installs the base library (libiio), >>> they can't actually use any USB devices (as a non-root user), since >>> the udev rule isn't installed, and the udev rule is dependent on the >>> libiio-utils package. >> >> I'd suggest putting the udev rule in the -utils package and having the >> runtime library package (libiio0) recommend that package. (A hard >> dependency would create a cycle, but downgrading the relationship is >> sufficient to stay out of trouble.) This approach has three big >> things going for it: >> >> * The rule will be in the same binary package as the tool it needs. >> >> * APT will then automatically encourage users of the library to >> install the -utils package, complete with the rule and the tool. >> >> * If and when the shared library's SONAME advances, old and new >> versions will still be coinstallable as needed to allow for smooth >> transitions. >> >> I suppose you could consider splitting iio_info and the rule out into >> their own binary package and having the runtime package recommend just >> that package, but the whole -utils package is small enough that I >> wouldn't bother. > > Personally I'd do this, especially since it sounds like the library isn't > much use without any devices. In particular, I would make libiio0 > have a hard dependency on libiio-common.
It does - you can build applications using libiio for deployment on other machines, without the udev rule, without the utilities. We do this on travis-CI all the time... Splitting into it's own package seems like overkill on a single line of text (udev rule) and a 27k application (iio_info). I think I like Aarons suggestion (include the udev rule in the -utils package). So, the proposal is: libiio0 (the shared object), recommends libiio-utils libiio-utils (all the utilities and the udev), requires libiio libiio-dev (header files), requires libiio, recommends libiio-utils That works for me - if it works for Maitland (he is the person doing the work 😊) -Robin

