During SDK build: environment-setup.d/ conflicts between attempted installs

限于喜欢 提交于 2019-12-05 15:41:34

I'm building an SDK with cmake and Qt5 without any problem...

Your issue seems to stem from dnf, and as I'm building with ipk without any issue, there might very well be a bug in the rpm handling in OpenEmbedded.

Could you try to rebuild with:

PACKAGE_CLASSES = "package_ipk"

in your local.conf and see it that helps?

Edit: Anders' answer provides a more elegant solution by switching the packaging class. If you can, check out his approach before trying this workaround.

I found a workaround that worked for me but is no ideal solution. I am posting it anyway, in case it helps someone:

I figured out, that the nativesdk-cmake package somehow collided with the Qt one. Therefor I created a nativesdk-packagegroup-sdk-host.bbappend file in my custom layer, with the following content:

RDEPENDS_${PN}_remove = "\
    nativesdk-cmake \
"

This removes the cmake dependency from the SDK build, which works for my purposes. But this merely solves the symptoms not the problem. So I am glad for any other solution.

Just try and add DIRFILES = "" in nativesdk-qtbase.bb (you should rather set up a clean and tidy nativesdk-qtbase.bbappend in your custom layer with DIRFILES = ""). This works around clashes due to RPM directory ownership for this RPM, which is a default policy in standard RPM packaging. See package_rpm.bbclass for details @ python write_specfile () { .... walk_files method. Note: DIRFILES must be defined but left empty for this to work on the current package. Voila.

Cheers.

As so61pi mentioned, RPM has strict checking for files/directories. In my case, after installing nativesdk-qtbase the environment.d folder had permissions 775 whereas nativesk-cmake created that same folder with 755.

I don't know if this was caused due to the fact that the function generate_qt_environment_file is being executed in a fakeroot environment, but I fixed it by adding its function body to the do_install function and removing generate_qt_environment_file.

Not sure if this is the correct fix though. I noticed some other recipes use the fakeroot keyword and others don't. I wonder why...

RPM has strict checking for files/directories. environment-setup.d directory in your question may have different mode or user between the 2 packages.

You could check function rpmfilesCompare for the exact checks that RPM performs.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!