Bug 13434 - checksum indirect cfg and scc flags
Summary: checksum indirect cfg and scc flags
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.2 M3
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-07-09 06:16 UTC by Zhaolong Zhang
Modified: 2020-08-28 20:07 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
proposed directory tracking patch (3.79 KB, application/octet-stream)
2019-07-17 14:04 UTC, Bruce Ashfield
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zhaolong Zhang 2019-07-09 06:16:26 UTC
Yocto can not realize the modification of the cfg / scc files indirectly introduced by scc files in custom layers.

Email thread: http://lists.openembedded.org/pipermail/openembedded-core/2019-July/284403.html
Comment 1 Bruce Ashfield 2019-07-17 14:03:34 UTC
Can you test the patch that I attached to the bug ?

It is essential your patch, and I'd like to add your Signed-off-by to the commit message before I send it.

After talking with Richard, I decided to not go for a few higher maintenance ideas and instead have changed your routine to only return directories with .scc and .cfg files. That allows us to re-run if a file is modified, added or removed from the directories, which addresses the concern that Richard had.

This still will trigger a few more re-executions of the meta-data + kernel build than I'd like, but I'll wait for some of the task equivalence changes to be complete before trying to check that although the meta-data task has re-run, the output is the same and hence we don't need to rebuild or repackage the kernel.
Comment 2 Bruce Ashfield 2019-07-17 14:04:52 UTC
Created attachment 4540 [details]
proposed directory tracking patch
Comment 3 Zhaolong Zhang 2019-07-22 10:03:51 UTC
Hi Bruce,

I got a weird result:

If I modify the testing fragment file poky/meta-yocto-bsp/recipes-kernel/linux/files/test.cfg, it works.
And if I `touch test2.cfg`, it also triggers kernel_metadata task.

But in 2 conditions it doesn't work:
1. mv test.cfg test.cfg.bak
2. rm test2.cfg

I also checked modification time of the dir poky/meta-yocto-bsp/recipes-kernel/linux/files/ using `stat` util, it changed in both conditions. Don't know why yocto didn't trigger kernel_metadata in these 2 cases.
Comment 4 Bruce Ashfield 2019-07-22 12:46:07 UTC
(In reply to comment #3)
> Hi Bruce,
> 
> I got a weird result:
> 
> If I modify the testing fragment file
> poky/meta-yocto-bsp/recipes-kernel/linux/files/test.cfg, it works.
> And if I `touch test2.cfg`, it also triggers kernel_metadata task.
> 
> But in 2 conditions it doesn't work:
> 1. mv test.cfg test.cfg.bak
> 2. rm test2.cfg
> 
> I also checked modification time of the dir
> poky/meta-yocto-bsp/recipes-kernel/linux/files/ using `stat` util, it
> changed in both conditions. Don't know why yocto didn't trigger
> kernel_metadata in these 2 cases.

Thanks for the update!

I'll try and reproduce those results here and will adjust things as necessary.
Comment 5 Bruce Ashfield 2019-07-22 13:53:13 UTC
Here's the results of my tests with the patch:

# all operations are in a layers kernel patch/fragment directory

% touch f.scc
% bitbake -c kernel_configme linux-yocto
# meta-data task re-runs

% rm f.scc
% bitbake -c kernel_configme linux-yocto
# meta-data task re-runs

% touch f.scc
% bitbake -c kernel_configme linux-yocto
# meta-data task re-runs
 
% mv f.scc f.scc.bak
% bitbake -c kernel_configme linux-yocto
# meta-data task does *not* run

% mv f.scc.bak f.scc
% bitbake -c kernel_configme linux-yocto
# meta-data task does *not* run

% rm f.scc
% bitbake -c kernel_configme linux-yocto
# meta-data task re-runs

So while I'm not seeing the same results as you on the 'rm' action. I am seeing the same thing with the 'mv' operation.

I've pinged Richard to comment if this is expected, since we are talking about bitbake behaviour here.
Comment 6 Bruce Ashfield 2019-08-27 15:18:19 UTC
just updating this to indicate that I'm waiting for RPs comment as to whether the behaviour is expected or not.
Comment 7 Richard Purdie 2019-10-03 15:20:22 UTC
No, at a quick glance those behaviours are not expected and we need to investigate further. Sounds like a potential bitbake fetcher issue.
Comment 8 Bruce Ashfield 2019-12-02 20:52:05 UTC
I can't put a milestone on this, since I unfortunately don't understand the current behaviour and hence to fix the bug. Once my other 3.1 features are done in the M3 timeframe, I'll take a closer look.
Comment 9 Bruce Ashfield 2020-08-28 20:07:49 UTC
The directory tracking variant of this has been merged into oe-core.

Corner cases will be handled in separate bugs.