Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Andreas Müller" <schnitzeltony@gmail.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] image-buildinfo: drop more verbose build configuration
Date: Sat, 29 Sep 2018 15:17:50 +0100	[thread overview]
Message-ID: <35422df46140ffbb6e2676691cd74a14a2a41013.camel@linuxfoundation.org> (raw)
In-Reply-To: <20180928094813.10862-1-schnitzeltony@gmail.com>

On Fri, 2018-09-28 at 11:48 +0200, Andreas Müller wrote:
> * before DISTRO and DISTRO_VERSION were written only - this is not
> enough to
>   get a complete picture in which environmet an image was build. Now
> same
>   information as displayed on console is written.
> * code fragment was based on bass.bbclass
> 
> Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
> ---
> 
> I know timing is not the best - we are already feature freezed. But I
> think it is an enhancement worth to have an exception...

It sounds good from the commit message but anyone IMAGE_BUILDINFO_VARS
or IMAGE_BUILDINFO_LVARS is going to find a significant change in
behaviour? At the point past feature freeze I'm not sure we can do
that...

Cheers,

Richard

>  meta/classes/image-buildinfo.bbclass | 28 ++++++++++++------------
> ----
>  1 file changed, 12 insertions(+), 16 deletions(-)
> 
> diff --git a/meta/classes/image-buildinfo.bbclass
> b/meta/classes/image-buildinfo.bbclass
> index 213fb9cf9b..fbb3188040 100644
> --- a/meta/classes/image-buildinfo.bbclass
> +++ b/meta/classes/image-buildinfo.bbclass
> @@ -15,18 +15,6 @@ IMAGE_BUILDINFO_VARS ?= "DISTRO DISTRO_VERSION"
>  # Desired location of the output file in the image.
>  IMAGE_BUILDINFO_FILE ??= "${sysconfdir}/build"
>  
> -# From buildhistory.bbclass
> -def image_buildinfo_outputvars(vars, listvars, d): 
> -    vars = vars.split()
> -    listvars = listvars.split()
> -    ret = ""
> -    for var in vars:
> -        value = d.getVar(var) or ""
> -        if (d.getVarFlag(var, 'type') == "list"):
> -            value = oe.utils.squashspaces(value)
> -        ret += "%s = %s\n" % (var, value)
> -    return ret.rstrip('\n')
> -
>  # Gets git branch's status (clean or dirty)
>  def get_layer_git_status(path):
>      import subprocess
> @@ -57,10 +45,18 @@ def buildinfo_target(d):
>          # Get context
>          if d.getVar('BB_WORKERCONTEXT') != '1':
>                  return ""
> -        # Single and list variables to be read
> -        vars = (d.getVar("IMAGE_BUILDINFO_VARS") or "")
> -        listvars = (d.getVar("IMAGE_BUILDINFO_LVARS") or "")
> -        return image_buildinfo_outputvars(vars, listvars, d)
> +        # taken from base.bbclass
> +        localdata = bb.data.createCopy(d)
> +        statuslines = []
> +        g = globals()
> +        func = 'buildcfg_vars'
> +        if func not in g:
> +            bb.warn("Build configuration function '%s' does not
> exist" % func)
> +        else:
> +            flines = g[func](localdata)
> +            if flines:
> +                statuslines.extend(flines)
> +        return ('\n%s\n' % '\n'.join(statuslines))
>  
>  # Write build information to target filesystem
>  python buildinfo () {
> -- 
> 2.14.4
> 


  reply	other threads:[~2018-09-29 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28  9:48 [PATCH] image-buildinfo: drop more verbose build configuration Andreas Müller
2018-09-29 14:17 ` Richard Purdie [this message]
2018-11-07 22:24   ` Andreas Müller

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=35422df46140ffbb6e2676691cd74a14a2a41013.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=schnitzeltony@gmail.com \
    /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