src_install has: rm -rf "${D}"/usr/include # part of linux-headers But this is an error. i2c-tools exclusively includes /usr/include/linux/i2c-dev.h; it is NOT installed by linux-headers. This confusion is likely because the Linux kernel itself contains a *different* i2c-dev.h file, usable only for kernel internals. Per /usr/src/linux/Documentation/i2c/dev-interface: So let's say you want to access an i2c adapter from a C program. The first thing to do is "#include <linux/i2c-dev.h>". Please note that there are two files named "i2c-dev.h" out there, one is distributed with the Linux kernel and is meant to be included from kernel driver code, the other one is distributed with i2c-tools and is meant to be included from user-space programs. You obviously want the second one here.
Correction: linux-headers does install the Linux i2c-dev, but as mentioned, it is the wrong one for userspace...
This package has no maintainer so this bug may go unnoticed for a long time. Gentoo has a dedicated team[1] for assisting users in maintaining orphaned packages. If you are interested in maintaining this package, please contact proxy-maint@gentoo.org. [1]: http://www.gentoo.org/proj/en/qa/proxy-maintainers/index.xml
it isn't "the wrong one", it's just not as useful this conversation should happen on the i2c linux lists imo and see if the i2c-tools version couldn't be merged into the mainline kernel itself
When Linux upstream is already saying to use the one in i2c-tools for userspace, I'm not sure what there is to discuss upstream. Every other distro seems to get this right, so I don't know what's holding back Gentoo.
Petalinux (or bitbake?) approaches this issue by installing i2c-tools' i2c-dev.h to /usr/include/linux/i2c-dev-user.h; this seems like a reasonable alternative that at least provides the userland i2c-dev.h *somewhere* that applications can use. Using m4 magic an application could at least check for the presence of <linux/i2c-dev-user.h> if possible; otherwise check <linux/i2c-dev.h> and test whether the i2c_smbus_xxx functions are present.
Hi, Mike, I don't think there's anything kernel maintainers can do here. As maintainer of i2c-tools I believe it's your choice to implement the below suggestion of a rename or not. -Mike
Linux headers currently ships almost the same i2c-dev.h, not worth any installation changes.