* Best practice to debug a bbclass customization
@ 2020-05-06 16:47 Marco Cavallini
2020-05-06 17:03 ` [bitbake-devel] " Konrad Weihmann
0 siblings, 1 reply; 2+ messages in thread
From: Marco Cavallini @ 2020-05-06 16:47 UTC (permalink / raw)
To: bitbake-devel
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
Hello,
I am experimenting bbclass customization creating a very trivial task called do_marco() to get a list of the recipes built during a bitbake call.
I need to run this task each time bitbake is taking a recipe into account, adding INHERIT += "mycustom" in local.conf.
The problem is that whenever I modify the task source and I run bitbake I have a lot of recipes rebuilt as result.
Is this expected or there is anything to set to avoid that?
What is the best practice to debug a bbclass customization?
# mycustom.bbclass
python do_marco () {
package = d.getVar('PN', True)
version = d.getVar('PV', True)
s = "$ \"{0}\",\"{1}\"\n".format(package,version)
with open("marco.txt", "a") as logFile:
logFile.write(s);
}
do_package[postfuncs] += "do_marco"
Thank you
--
Marco
[-- Attachment #2: Type: text/html, Size: 1141 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bitbake-devel] Best practice to debug a bbclass customization
2020-05-06 16:47 Best practice to debug a bbclass customization Marco Cavallini
@ 2020-05-06 17:03 ` Konrad Weihmann
0 siblings, 0 replies; 2+ messages in thread
From: Konrad Weihmann @ 2020-05-06 17:03 UTC (permalink / raw)
To: bitbake-devel
Something like this does actually do the trick but isn't the most
charming way (as it influences hashing a lot)
do_foo[vardepvalue] = "1"
do_foo() {
bbwarn ${PN}
}
do_install[postfuncs] += "do_foo"
Now you can alter the "do_foo" function as much as you want for the
hashing part "do_foo" will always remain "1"
On 06.05.20 18:47, Marco Cavallini wrote:
> Hello,
> I am experimenting bbclass customization creating a very trivial task
> called do_marco() to get a list of the recipes built during a bitbake call.
> I need to run this task each time bitbake is taking a recipe into
> account, adding INHERIT += "mycustom" in local.conf.
>
> The problem is that whenever I modify the task source and I run bitbake
> I have a lot of recipes rebuilt as result.
> Is this expected or there is anything to set to avoid that?
> What is the best practice to debug a bbclass customization?
>
> # mycustom.bbclass
> python do_marco () {
> package = d.getVar('PN', True)
> version = d.getVar('PV', True)
> s = "$ \"{0}\",\"{1}\"\n".format(package,version)
> with open("marco.txt", "a") as logFile:
> logFile.write(s);
> }
> do_package[postfuncs] += "do_marco"
>
> Thank you
> --
> Marco
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-06 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 16:47 Best practice to debug a bbclass customization Marco Cavallini
2020-05-06 17:03 ` [bitbake-devel] " Konrad Weihmann
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.