]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
package_rpm: Check if file exists before open()
authorPavel Zhukov <pavel@zhukoff.net>
Thu, 10 Oct 2024 17:45:45 +0000 (19:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Oct 2024 11:16:59 +0000 (12:16 +0100)
commit4ad9a0e0b11eb7bc5a3dd45fc8945e094ea949e9
treeab7674b8437761db724a7f7d174a2ad0ee8f5293
parent78db9e79e1a307ffb8436e26656bfb98efb513bc
package_rpm: Check if file exists before open()

Exception handler tries to read() /etc/passwd file in sysroot
and if file doesn't exist for any reason then it raises FileNotFoundError
exception which mask the original source of the problem and makes
debugging of the issue more difficult.

Fixes:
Exception: FileNotFoundError: [Errno 2] No such file or directory:
'/codebuild/output/src1899304708/src/build/tmp-container/work/core2-64-oe-linux/emqx-bin/4.3.12/recipe-sysroot/etc/passwd'

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/package_rpm.bbclass