[OE-core] [PATCH] os-release: fix to install in the expected location

Martin Jansa martin.jansa at gmail.com
Wed Sep 5 10:31:22 UTC 2018


On Tue, Sep 04, 2018 at 01:19:28PM -0700, Andre McCurdy wrote:
> On Tue, Sep 4, 2018 at 8:50 AM, Ross Burton <ross.burton at intel.com> wrote:
> > From: Joshua Lock <joshua.g.lock at intel.com>
> >
> > os-release (5) recommends that the os-release file be installed in
> > /usr/lib/os-release and that /etc/os-release be a relative symlink to it.
> >
> > Signed-off-by: Joshua Lock <joshua.g.lock at intel.com>
> > Signed-off-by: Ross Burton <ross.burton at intel.com>
> > ---
> >  meta/recipes-core/os-release/os-release.bb | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/recipes-core/os-release/os-release.bb b/meta/recipes-core/os-release/os-release.bb
> > index f9887047561..c6e36001dc5 100644
> > --- a/meta/recipes-core/os-release/os-release.bb
> > +++ b/meta/recipes-core/os-release/os-release.bb
> > @@ -1,7 +1,7 @@
> >  inherit allarch
> >
> >  SUMMARY = "Operating system identification"
> > -DESCRIPTION = "The /etc/os-release file contains operating system identification data."
> > +DESCRIPTION = "The /usr/lib/os-release file contains operating system identification data."
> >  LICENSE = "MIT"
> >  INHIBIT_DEFAULT_DEPS = "1"
> >
> > @@ -42,6 +42,7 @@ python do_compile () {
> >  do_compile[vardeps] += "${OS_RELEASE_FIELDS}"
> >
> >  do_install () {
> > -    install -d ${D}${sysconfdir}
> > -    install -m 0644 os-release ${D}${sysconfdir}/
> > +    install -d ${D}${libdir}
> > +    install -m 0644 os-release ${D}${libdir}/
> > +    lnr ${D}${libdir}/os-release ${D}${sysconfdir}
> 
> This probably needs an "rm -f ${D}${sysconfdir}/os-release" too to
> prevent problems if install is run twice as lnr doesn't handle the
> case where the target already exists.

Why do we need ${D} in first place? Doesn't

ln -snf ${libdir}/os-release ${D}${sysconfdir}

solve both issues?

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180905/120e1235/attachment-0002.sig>


More information about the Openembedded-core mailing list