[OE-core] [PATCH] e2fsprogs: add packageconfig for -file-

Christopher Larson clarson at kergoth.com
Mon Sep 19 02:37:09 UTC 2016


On Sun, Sep 18, 2016 at 7:32 PM, Randy MacLeod <randy.macleod at windriver.com>
wrote:

> On 2016-09-17 01:09 AM, Christopher Larson wrote:
>
>>
>> On Fri, Sep 16, 2016 at 6:37 PM, Randy MacLeod
>> <Randy.MacLeod at windriver.com <mailto:Randy.MacLeod at windriver.com>> wrote:
>>
>>     Without a packageconfig dependency for the file utility, there's
>>     a very rare compile faiure caused by a race where the magic.h
>>     header file is not found:
>>
>>      ../../../git/lib/support/plausible.c:33:19: fatal error: magic.h:
>>     No such file or directory
>>
>>     This file, plausible.c, is part of libsupport.a which is used by
>>     many binaries produced by the e2fsprogs package. plausible.c attempts
>>     to dynamically load libmagic.so if the e2fsprogs configure detects
>>     that magic was available. Adding the packageconfig will eliminate
>>     the build as well as the possible configure-time race condition.
>>
>>     Signed-off-by: Randy MacLeod <Randy.MacLeod at windriver.com
>>     <mailto:Randy.MacLeod at windriver.com>>
>>     ---
>>      meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb
>>     <http://e2fsprogs_1.43.bb> | 1 +
>>      1 file changed, 1 insertion(+)
>>
>>     diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb
>>     <http://e2fsprogs_1.43.bb>
>>     b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb
>>     <http://e2fsprogs_1.43.bb>
>>     index f4855bc..1707cb9 100644
>>     --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb
>>     <http://e2fsprogs_1.43.bb>
>>     +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb
>>     <http://e2fsprogs_1.43.bb>
>>     @@ -23,6 +23,7 @@ EXTRA_OECONF += "--libdir=${base_libdir}
>>     --sbindir=${base_sbindir} \
>>      EXTRA_OECONF_darwin = "--libdir=${base_libdir}
>>     --sbindir=${base_sbindir} --enable-bsd-shlibs"
>>
>>      PACKAGECONFIG ??= ""
>>     +PACKAGECONFIG[file] = ',,file'
>>
>>
>> This isn’t going to be good enough. You aren’t explicitly
>> enabling/disabling the option, so it’ll still detect based on what’s in
>> the sysroot, so recipe build order will result in non-deterministic
>> behavior.
>>
>
> Hi Christopher,
>
> Thanks for the response but I don't understand.
> I'm probably wrong so please explain.
> It seems that you're suggesting that I add:
>  --with[out]-magic to e2fsprogs configure, and while
> I could do that, it does not seem to be needed.
>
>
> Short response:
>
>   This change forces 'file' to be built before e2fsprogs if 'file'
>   is present in the image or world build. Then e2fsprogs will
>   detect magic.h,libmagic.so and  the race is eliminated.


That’s only the case if ‘file’ is in PACKAGECONFIG, if not, it’ll still
behave the way it did before, and change its deps based on build order. Our
policy is to avoid floating deps period, regardless of PACKAGECONFIG. If a
given packageconfig is not enabled, then explicitly disable the dependency,
don’t detect and use it anyway.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160918/43a4705f/attachment-0002.html>


More information about the Openembedded-core mailing list