On 05/11/2018 01:39 PM, Peter Kjellerstedt wrote:
However, I gave this some more thought, and maybe it would be better to let bitbake set the soft limit for max open files to, e.g., 1024. That way we would not need to modify the code in rpm as it would adapt itself automatically. I tried adding the following to bitbake_main and it worked:import resource # Set the maximum number of open files as there are performance problems # with, e.g., rpm if this is unlimited (which it may be if running inside # a Docker container). (soft, hard) = resource.getrlimit(resource.RLIMIT_NOFILE) soft = int(os.environ.get("BB_LIMIT_NOFILE", "1024")) resource.setrlimit(resource.RLIMIT_NOFILE, (min(soft, hard), hard))
That's right, this is the best solution. Alex -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
