2023-11-23 12:48 AM
I have a simple recipes, which used to install certain files to rootfs, as below:
DESCRIPTION = "A hello world example"
SECTION = "appauto"
DEPENDS = ""
LICENSE = "CLOSED"
FILESEXTRAPATHS:append := ":${THISDIR}/file"
SRC_URI = "file://hello.service \
"
do_install() {
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/hello.service ${D}${systemd_unitdir}/system
}
FILES_${PN} += "${systemd_unitdir}/system"
When bitbake this recipes, it will generate error message as:
NOTE: Executing Tasks
ERROR: appauto-1.0-r0 do_package: QA Issue: appauto: Files/directories were installed but not shipped in any package:
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/hello.service
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
However, if I change directories installation variables from "systemd_unitdir" to "base_bindir", then everything is OK.
Then I try many different directory variable, then I see "prefix", "base_prefix", "exec_prefix" is not working,
"base_bindir", "sysconfdir" and "localstatedir" is OK. Why?
In this case, I have to install my service to /lib/systemd/system/ to enable automatic execution.
Any comments are appreciated
Thanks.
HY
Solved! Go to Solution.
2023-11-23 01:34 AM
Hello @HYC ,
Can you try with replacing FILE_${PN} by FILE:${PN} ? You will find example in existing recipes. I think you get inspired by an old recipe online that was formatted with the old syntax.
Kind regards,
Erwan.
2023-11-23 01:34 AM
Hello @HYC ,
Can you try with replacing FILE_${PN} by FILE:${PN} ? You will find example in existing recipes. I think you get inspired by an old recipe online that was formatted with the old syntax.
Kind regards,
Erwan.
2023-11-23 05:51 PM
It is working, thank you @Erwan SZYMANSKI .