Hi!
How/can I let multiple recipes install files in the same directory without 
getting a conflict during bitbake process?

Recipe 1 creates a user and its homedir:
inherit useradd
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "-u 1000 -d /home/user1 -m -s /bin/bash -p 'XXX' user1"
do_install(){
install -d ${D}/home/user1
chown -R user1:user1 ${D}/home/user1
}

Recipe 2 wants to install some config-files inside /home/user1/.config/.
DEPENDS = "recipe1"
RDEPENDS:${PN} = "recipe1"
do_install(){
install -d ${D}/home/user1/.config/
install -m 0644 sourcefile ${D}/home/user1/.config/
chown -R user1:user1 ${D}/home/user1/.config/
}

There is also FILES directives at the end of each recipe for the corresponding 
files. For better readability I've removed everything that I deemed was 
irrelevant.
The problem I get when trying to bitbake the image is during the do_rootfs 
stage:
file /home/user1 conflicts between attempted installs of <recipe2> and <recipe1>

If I comment out the "chown" line from both recipes it seems to work but then I 
guess those directories will be owned by root during runtime, which will be a 
problem for user1.

Is there a proper way to do this?

Kind regards, Linus
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#62914): https://lists.yoctoproject.org/g/yocto/message/62914
Mute This Topic: https://lists.yoctoproject.org/mt/105458437/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to