summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorClaudius Heine <ch@denx.de>2022-04-05 12:13:26 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-05 22:23:40 +0100
commit498f9c58c8855eface861aa3fbf6df11d416f015 (patch)
tree4500149e06ed7ca01300ca115c8933aaf3df2646 /meta
parent4a77431efcffeeaef980c1533a2a39add64944b7 (diff)
downloadpoky-498f9c58c8855eface861aa3fbf6df11d416f015.tar.gz
os-release: add os-release-initrd package
When systemd is used inside an initramfs, it uses the presence of `/etc/initrd-release` to detect when the system is in the initrd phase. Otherwise `/etc/initrd-release` has the same format as `/etc/os-release`. Add `os-release-initrd` package to provide `/etc/initrd-release` as a symlink to the os-release file. To avoid adding this file to the `os-release` package, explicitly only add `/etc/os-release` to the `os-release` package. (From OE-Core rev: 6311fb6f412ef923cc0b34a821e875990fc043f5) Signed-off-by: Claudius Heine <ch@denx.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/os-release/os-release.bb7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/recipes-core/os-release/os-release.bb b/meta/recipes-core/os-release/os-release.bb
index 637d059e8b..caa2ed25aa 100644
--- a/meta/recipes-core/os-release/os-release.bb
+++ b/meta/recipes-core/os-release/os-release.bb
@@ -50,6 +50,11 @@ do_install () {
50 install -d ${D}${nonarch_libdir} ${D}${sysconfdir} 50 install -d ${D}${nonarch_libdir} ${D}${sysconfdir}
51 install -m 0644 os-release ${D}${nonarch_libdir}/ 51 install -m 0644 os-release ${D}${nonarch_libdir}/
52 ln -rs ${D}${nonarch_libdir}/os-release ${D}${sysconfdir}/os-release 52 ln -rs ${D}${nonarch_libdir}/os-release ${D}${sysconfdir}/os-release
53 ln -rs ${D}${nonarch_libdir}/os-release ${D}${sysconfdir}/initrd-release
53} 54}
54 55
55FILES:${PN} += "${nonarch_libdir}/os-release" 56FILES:${PN} = "${sysconfdir}/os-release ${nonarch_libdir}/os-release"
57
58PACKAGES += "${PN}-initrd"
59FILES:${PN}-initrd = "${sysconfdir}/initrd-release"
60RDEPENDS:${PN}-initrd += "${PN}"