Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Christopher Larson <kergoth@gmail.com>
Cc: Christopher Larson <chris_larson@mentor.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [RFC 1/2] os-release: add new operating system identification recipe
Date: Fri, 13 Dec 2013 16:08:26 +0100	[thread overview]
Message-ID: <20131213150826.GC3715@jama> (raw)
In-Reply-To: <6122710ad05d4a2c1fa2d42fba3025cae6dab5ed.1386946335.git.kergoth@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2452 bytes --]

On Fri, Dec 13, 2013 at 07:56:37AM -0700, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
> 
> This is needed by systemd, among other useful applications. All fields are
> metadata driven, and initial values come from our DISTRO variables.
> 
> Signed-off-by: Christopher Larson <kergoth@gmail.com>
> ---
>  meta/recipes-core/os-release/os-release.bb | 42 ++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 meta/recipes-core/os-release/os-release.bb
> 
> diff --git a/meta/recipes-core/os-release/os-release.bb b/meta/recipes-core/os-release/os-release.bb
> new file mode 100644
> index 0000000..0f67597
> --- /dev/null
> +++ b/meta/recipes-core/os-release/os-release.bb
> @@ -0,0 +1,42 @@
> +inherit allarch
> +
> +SUMMARY = "Operating system identification"
> +DESCRIPTION = "The /etc/os-release file contains operating system identification data."
> +LICENSE = "MIT"
> +INHIBIT_DEFAULT_DEPS = "1"
> +
> +do_fetch[noexec] = "1"
> +do_unpack[noexec] = "1"
> +do_patch[noexec] = "1"
> +do_configure[noexec] = "1"
> +
> +# Other valid fields: BUILD_ID ANSI_COLOR CPE_NAME HOME_URL SUPPORT_URL BUG_REPORT_URL
> +OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME"
> +
> +export ID = "${DISTRO}"
> +export NAME = "${DISTRO_NAME}"
> +export VERSION = "${DISTRO_VERSION}${@' (%s)' % DISTRO_CODENAME if 'DISTRO_CODENAME' in d else ''}"
> +export VERSION_ID = "${DISTRO_VERSION}"
> +export PRETTY_NAME = "${DISTRO_NAME} ${VERSION}"
> +
> +export BUILD_ID ?= "${DATETIME}"
> +export ID_LIKE
> +export ANSI_COLOR
> +export CPE_NAME
> +export HOME_URL
> +export SUPPORT_URL
> +export BUG_REPORT_URL
> +
> +do_compile () {
> +    for field in ${OS_RELEASE_FIELDS}; do
> +        if eval "test -n \"\$$field\""; then
> +            eval "printf \"%s=%s\n\" \"\$field\" \"\$$field\""
> +        fi
> +    done >os-release
> +}
> +do_compile[vardeps] += "${OS_RELEASE_FIELDS}"

Isn't this dependency picked automatically?

> +do_install () {
> +    install -d ${D}${sysconfdir}
> +    install -m 0644 os-release ${D}${sysconfdir}/
> +}
> -- 
> 1.8.3.4
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2013-12-13 15:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 14:56 [RFC PATCH 0/2] Add /etc/os-release Christopher Larson
2013-12-13 14:56 ` [RFC 1/2] os-release: add new operating system identification recipe Christopher Larson
2013-12-13 15:08   ` Martin Jansa [this message]
2013-12-13 15:12     ` Chris Larson
2013-12-13 15:18       ` Chris Larson
2013-12-13 16:33       ` Martin Jansa
2013-12-13 15:56   ` Mark Hatle
2013-12-13 16:14     ` Chris Larson
2013-12-13 16:30       ` Koen Kooi
2013-12-13 16:27   ` Enrico Scholz
2013-12-13 16:31   ` Koen Kooi
2013-12-13 14:56 ` [RFC 2/2] systemd: rrecommend os-release Christopher Larson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131213150826.GC3715@jama \
    --to=martin.jansa@gmail.com \
    --cc=chris_larson@mentor.com \
    --cc=kergoth@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox