Bug 13425

Summary: Add bblock and bbunlock helper tools
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Richard Purdie <richard.purdie>
Component: Scripts and ToolsAssignee: Julien Stephan <jstephan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: bluelightning, duy.dang.yw, jstephan, randy.macleod, ross.burton
Version: 2.7   
Target Milestone: 4.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: NEWCOMER
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Richard Purdie 2019-07-02 16:03:49 UTC
It would be nice to be able to lock specific recipes against changes when doing development work. This could be in the form of the bblock X and bbunlock X commands.

The mechanism would use the locked-sigs mechanism which can be seen by:

"bitbake bash -S none"
then looking at the locked-sigs.inc file it generated. These are activated by including the inc file in local.conf.

The lock/unlock commands would use entries of this syntax, probably in a separate file they could maniululate, included from local.conf.

When locked sigs are in operation, a note to the user, similar to the way the "-f" taint files trigger notes to the user would be desirable.
Comment 1 Paul Eggleton 2019-07-04 10:02:54 UTC
*** Bug 6425 has been marked as a duplicate of this bug. ***
Comment 2 Richard Purdie 2019-07-04 10:05:17 UTC
As a note, tinfoil would have APIs which could implement this (or we'd add them)
Comment 3 Ross Burton 2019-10-23 15:24:01 UTC
I hacked up this last week.

https://github.com/rossburton/bb/blob/master/libexec/bb-lockdown

basically uses -S to generate a locked-sigs.inc, removes the lines that we still want to rebuild, then writes an auto.conf to pull the file in.
Comment 4 Duy Dang 2023-04-07 07:38:33 UTC
Hi Richard,

I can handle this Bug.
But in what case do people need to lock a specific recipe?
Comment 5 Duy Dang 2023-04-10 02:36:08 UTC
Hi Richard, Ross,

Do we create a new parameter for bitbake to do this feature? Or just a script same as Ross' one in poky/scripts ?
Comment 6 Richard Purdie 2023-04-12 10:34:06 UTC
If for example someone wants to make changes to the rust recipe but doesn't want rust-native to rebuild every time, they only want to rebuild rust itself. In this case they would lock rust-native.

I think this should be a separate tool and not an option to bitbake. We can use the tinfoil bitbake API if needed though.
Comment 7 Julien Stephan 2023-07-17 13:11:31 UTC
Hi Duy, Richard and Ross, 
I would be happy to help on this. Duy did you make any progress on this?
Comment 8 Ross Burton 2023-07-17 13:40:30 UTC
I'm unaware of any progress beyond my scripts being a demonstration that the concept works.
Comment 9 Julien Stephan 2023-07-17 13:48:17 UTC
Ok, so I'll take a look at this
Comment 10 Duy Dang 2023-07-18 03:17:35 UTC
Hi Julien,
I'm busy recently and cannot handle it. So that's OK if you can take this bug
Comment 11 Randy MacLeod 2023-07-26 21:29:36 UTC
Bulk move to 4.3 M3.
Comment 12 Ross Burton 2023-11-16 15:56:26 UTC
Merged in 2d9ab0cfd7f3cacc347954676f1323342a6b286f.