devchk problems with upstream header direct-inclusion protection
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb |
In Progress
|
Medium
|
Unassigned | ||
Mandriva |
In Progress
|
Medium
|
Bug Description
Some upstream components have recently begun adding an additional level of
protection - in addition to protecting against multiple inclusions, in the case
where there's only one or a small number of user-intended headers, subsidiary
headers (which may be included by this main header) are protected so they
cannot be included directly.
This provides a problem for the devchk design, which is that for each header
that is specified in LSB, a file of test code is generated which includes that
header as well as any other dependencies that can be determined. So assume:
Component Foo now describes the official header to include as foo.h
foo.h includes foo-pieces.h
LSB import picks up both headers
devchk generates foo-pieces_h.c which does #include <foo-pieces.h>
native build of devchk fails on "do not include <foo-pieces.h> directly"
protection
This is believed to affect the import script libtodb2 as well
Solutions?
One approach - this was used in the original gtk import to an extent - is to
not expose the subsidiary headers, but instead include all the the data in the
main, "official" header in LSB. To do this, though, we have to know there's
such a "only include this header" and need to flag it to libtodb2 when it's
doing the imports, somehow. Possibly the include/exclude logic for the script
can already handle this if we know about it, and set it up right.
Changed in mandriva: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |