We discussed this with Phil on #oe" When some .inc file is included twice (for some reason) then it has bad side effects especially when the .inc is appending to some variables. Sometimes it's not so easy to notice 2nd+ inclusion, I've seen some distro configs which were including stuff like tcmode after it was included by default-setup.inc and that was duplicating all *FLAGS in environment.. Or with some cortexa9 machines I would like to include also tune-cortexa8.inc, this way distro can use some common DEFAULTTUNE like cortexa8t-neon when building couple of cortexa[89] MACHINEs. But I cannot include whole tune-cortexa9.inc, because it would include arch-armv7a.inc twice with bad side-effects. So I have to use constructs like this: https://github.com/shr-distribution/meta-smartphone/blob/shr/meta-samsung/conf/machine/tuna.conf I'm wondering how many times something is included/required for 2nd+ time and replaces some assignment, but if we really need such use-case then we can introduce include_once/require_once. Maybe we can start with warning to see how many times something is included more then once and if we don't find case where such behavior is needed, then change behavior to ignore 2nd+ inclusion.
There is a patch on bitbake-devel which adds the warning. We'd likely make it an error after a while. There was one case in OE-Core of this which I'd sent a patch to fix.
Warnings added in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f5f3ef7b09ab3790da92f8bef83835033bbeb0ac Martin: Please remind me to change this to an error at some appropriate point in the future.
(In reply to comment #2) > Martin: Please remind me to change this to an error at some appropriate > point in the future. OK, thanks. FYI: in my broader world builds I've seen only the warning from eglibc-package, but on the other hand it doesn't many distro-layers which are more likely to have this problem.