All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Marc Ferland <ferlandm@sonatest.com>
Cc: yocto@yoctoproject.org
Subject: Re: Revision file in images
Date: Mon, 15 Oct 2012 20:28:35 +0100	[thread overview]
Message-ID: <1661373.rtvAV8l5QM@helios> (raw)
In-Reply-To: <87k3urmuov.fsf@sonatest.com>

On Monday 15 October 2012 14:55:28 Marc Ferland wrote:
> Anders Darander <anders@chargestorm.se> writes:
> > * Marc Ferland <ferlandm@sonatest.com> [121012 17:40]:
> >> Hi,
> >> 
> >> Is a revision file populated in the images produced by the build process?
> >> Something listing the revisions of the different layers used. Just like
> >> the "OE Build Configuration" summary.
> > 
> > As Saul wrote, I don't know any way of getting this info.
> > 
> >> I'd like to easily identify what a target system currently runs.
> > 
> > In my own project, I'm using something like:
> > 
> > 
> > IMAGE_PREPROCESS_COMMAND += "rootfs_update_timestamp ;\
> > 
> >              git describe --dirty --long --always
> >>
> >>${IMAGE_ROOTFS}/etc/build ;\
> >>
> >              "
> > 
> > This doesn't explicitly put the SHA1's of the included layers into the
> > rootfs, but it does put my the most recent tag from my top-layer,
> > together with the number of commits after that tag, and an abreviated
> > version of the current commits SHA1 into the file /etc/build. This will
> > give me all info I need.
> 
> FYI, I was able to put the SHA1 of each meta data layer by doing:
> 
> def print_layers_version(d):
> 	layertext = "Configured metadata layers:\n%s\n" %
> '\n'.join(get_layers_branch_rev(d)) return layertext
> 
> IMAGE_PREPROCESS_COMMAND += "echo "${@print_layers_version(d)}" > /
> ${IMAGE_ROOTFS}/etc/build; "

I was going to say earlier I'm planning on adding something like this to OE-
Core for 1.4.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


  reply	other threads:[~2012-10-15 19:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12 15:42 Revision file in images Marc Ferland
2012-10-12 21:51 ` Saul Wold
2012-10-15  6:01 ` Anders Darander
2012-10-15 18:55   ` Marc Ferland
2012-10-15 19:28     ` Paul Eggleton [this message]
2012-10-16  5:50     ` Anders Darander

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=1661373.rtvAV8l5QM@helios \
    --to=paul.eggleton@linux.intel.com \
    --cc=ferlandm@sonatest.com \
    --cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.