From: <Mikko.Rapeli@bmw.de>
To: <ayoub.zaki@googlemail.com>
Cc: <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] Custom DISTRO_VERSION with git describe
Date: Thu, 28 Apr 2022 11:52:08 +0000 [thread overview]
Message-ID: <Ymp/526iIco9iMuV@korppu> (raw)
In-Reply-To: <CA+-BmJY1jCPuv=iUnvKghVZ48MosAEfbn5Nx5DopW6H8BmvjXg@mail.gmail.com>
Hi,
On Thu, Apr 28, 2022 at 01:38:35PM +0200, Ayoub Zaki wrote:
> I'm also suing dunfell branch, I did a small modification in
> my_distro_version.bbclass:
>
> def my_distro_version(d):
> > import subprocess
> > project_path = d.getVar('MY_LAYER_BASE', True)
> > cmd = "git describe --tags"
> > proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True,
> > cwd=project_path)
> > out, err = proc.communicate()
> > return out.decode("utf-8").rstrip()
> > MY_DISTRO_VERSION := "${@my_distro_version(d)}"
>
>
>
> Then in meta-mylayer/conf/distro/my_distro.conf I used:
>
> > INHERIT += "my_distro_version"
> > DISTRO_VERSION := "${MY_DISTRO_VERSION}"
>
>
> It seems to be working now :-)
Good! Just a hint that you might want to set SDK_VERSION to the same.
Cheers,
-Mikko
prev parent reply other threads:[~2022-04-28 11:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 11:04 Custom DISTRO_VERSION with git describe Ayoub Zaki
2022-04-28 11:15 ` [yocto] " Mikko.Rapeli
2022-04-28 11:25 ` Ayoub Zaki
2022-04-28 11:32 ` Mikko.Rapeli
2022-04-28 11:38 ` Ayoub Zaki
2022-04-28 11:52 ` Mikko.Rapeli [this message]
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=Ymp/526iIco9iMuV@korppu \
--to=mikko.rapeli@bmw.de \
--cc=ayoub.zaki@googlemail.com \
--cc=yocto@lists.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.