[OE-core] Ensuring a task is re-ran when local.conf is updated

Paul Barker paul at paulbarker.me.uk
Fri May 2 21:51:32 UTC 2014


On 2 May 2014 22:34, Richard Purdie <richard.purdie at linuxfoundation.org> wrote:
> On Fri, 2014-05-02 at 17:43 +0100, Paul Barker wrote:
>>
>> Am I missing something here? Is it expected that this variable change
>> is detected and the relevant tasks re-executed? I know changing
>> variables like PREFERRED_PROVIDER_* in local.conf causes things to be
>> rebuilt, so why does that work and this not?
>
> This should work, I'm not sure why it wouldn't. The code should be able
> to detect the dependency on the IPK_HIERARCHICAL_FEED variable and
> notice when the value changes.
>
> I'd have to experiment with some builds to figure out anything further
> but its probably worth opening a bug report as it sounds broken.
>
> bitbake-dffsigs on a siginfo file of a do_package_write_ipk is where to
> start with debugging, it should show the dependency on the variable.

Looks like I found the issue quickly using bitbake-diffsigs.
do_package_write_ipk does:
    localdata = bb.data.createCopy(d)
Then uses localdata.

If I check localdata.getVar(), the variable name doesn't appear in the
list of dependencies.

If instead I check d.getVar(), it does appear in the list of dependencies.

It looks like localdata is used so that certain variables can be set
without the changes affecting anything else (PKG, OVERRIDES, ROOT,
etc). But there are also some calls to localdata.getVar() for
PACKAGE_ARCH and ALLOW_EMPTY.

With my check changed to d.getVar(), the dependencies are: (['PKGE',
'IPK_HIERARCHICAL_FEED', 'get_package_additional_metadata',
'PKGWRITEDIRIPK', 'OPKGBUILDCMD', 'mapping_rename_hook', 'PKGDEST',
'PACKAGES', 'HOMEPAGE'])

Does this mean changes to PACKAGE_ARCH and ALLOW_EMPTY may go unnoticed?

Thanks,

-- 
Paul Barker

Email: paul at paulbarker.me.uk
http://www.paulbarker.me.uk



More information about the Openembedded-core mailing list