[OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

Mark Hatle mark.hatle at windriver.com
Mon Jun 25 16:47:04 UTC 2018


On 6/25/18 8:25 AM, Alexander Kanavin wrote:
> 2018-06-25 11:27 GMT+02:00 Olof Johansson <olof.johansson at axis.com>:
>> RPM writes each package scriptlet (post-/preinstall) to /var/tmp/rpm-tmp.XXXXXX
>>  --- a lot of files get created. When debugging is enabled, these temporary
>> scriptlet files aren't cleaned up at all and after a while this results in the
>> filesystem resources are eaten up (like running out of available inodes).
>>
>> This is a quick fix to avoid this. It does degrade functionality for
>> those working with debugging pre-/postintall scripts.
> 
> It's better to clean them up in meta/lib/oe/rootfs.py, instead of
> forever carrying a custom patch to rpm.

My question is "why is this a problem"?  (Why is debugging on for normal usage?)

If you want to enable debugging with RPM, leaving the files is the right answer.
 Otherwise, as mentioned in the post it's REALLY hard to debug scriptlet failures.

As for the rootfs.py cleaning them up, it's simply not possible -- assuming they
end up in a shared tmp dir, as you wouldn't have any idea who created them..
this build, or another, or a system process....  (Now if they only install into
the image's /var/tmp, thats a completely different case -- but I still question
why debug is enabled at all.)

--Mark

> Alex
> 




More information about the Openembedded-core mailing list