From: "Denys Dmytriyenko" <denis@denix.org>
To: Bill.Kulp@azuresummit.com
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] How to dynamically set PKGV? #yocto #python
Date: Wed, 15 Jan 2020 15:50:26 -0500 [thread overview]
Message-ID: <20200115205026.GU4735@denix.org> (raw)
In-Reply-To: <YaI2.1579120699599107204.Yscm@lists.yoctoproject.org>
https://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html#var-AUTOREV
https://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html#var-SRCPV
--
Denys
On Wed, Jan 15, 2020 at 12:38:19PM -0800, Bill.Kulp@azuresummit.com wrote:
> I have a recipe that builds an application from the master branch of a local
> git repository. AUTOREV is working, so the recipe automatically rebuilds
> whenever the repository is updated. The source code has its own version
> number. I'm wondering if it is possible to grab that version number during
> the do_compile step, and set the package version based on that?
>
> As a first step, I tried to change the value of PKGV from a bitbake task.
>
> PKGV = "BadBad"
> python do_foo () {
> d.setVar( "PKGV" , "GoodGood" )
> print ( "PKGV set to " + d.getVar( "PKGV" ))
> }
> addtask foo after do_compile before do_package
>
> However, this did not work - the resulting RPM packages are named
> "my_package-BadBad-r0.noarch.rpm". Can anyone suggest a fix, or a different
> method?
>
> Thanks!
>
prev parent reply other threads:[~2020-01-15 20:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 20:38 How to dynamically set PKGV? #yocto #python Bill.Kulp
2020-01-15 20:50 ` Denys Dmytriyenko [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=20200115205026.GU4735@denix.org \
--to=denis@denix.org \
--cc=Bill.Kulp@azuresummit.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox