diff mbox series

[yocto-docs,09/14] Drop support for BB_DANGLINGAPPENDS_WARNONLY

Message ID 20241217-release-note-5-2-updates-v1-9-b189493b1b09@bootlin.com
State New
Headers show
Series Updates from recent core changes | expand

Commit Message

Antonin Godard Dec. 17, 2024, 9:27 a.m. UTC
Support for this variable was dropped in BitBake, see commit
fca9c9e3cb6f8e9f99bf51dc5e8a8d83f4c84c69 ("cooker: Drop support for
BB_DANGLINGAPPENDS_WARNONLY").

Drop this variable here as well and rewrite the "Appending Other Layers
Metadata With Your Layer" section to advise to rename the recipe and
check if the bbappend is still relevant - otherwise to use BBWARN.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/dev-manual/layers.rst    | 15 ++++++++++-----
 documentation/ref-manual/variables.rst | 18 ------------------
 2 files changed, 10 insertions(+), 23 deletions(-)

Comments

Quentin Schulz Dec. 17, 2024, 2:08 p.m. UTC | #1
Hi Antonin,

On 12/17/24 10:27 AM, Antonin Godard via lists.yoctoproject.org wrote:
> Support for this variable was dropped in BitBake, see commit
> fca9c9e3cb6f8e9f99bf51dc5e8a8d83f4c84c69 ("cooker: Drop support for
> BB_DANGLINGAPPENDS_WARNONLY").
> 
> Drop this variable here as well and rewrite the "Appending Other Layers
> Metadata With Your Layer" section to advise to rename the recipe and
> check if the bbappend is still relevant - otherwise to use BBWARN.
> 
> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
> ---
>   documentation/dev-manual/layers.rst    | 15 ++++++++++-----
>   documentation/ref-manual/variables.rst | 18 ------------------
>   2 files changed, 10 insertions(+), 23 deletions(-)
> 
> diff --git a/documentation/dev-manual/layers.rst b/documentation/dev-manual/layers.rst
> index 89c84669337c9ecdc90110fdf34b7949459a1b9f..365991c225159d051f6dc4122625616b81f01ee3 100644
> --- a/documentation/dev-manual/layers.rst
> +++ b/documentation/dev-manual/layers.rst
> @@ -470,11 +470,16 @@ corresponding recipe file. For example, the append file
>   means the original recipe and append filenames are version
>   number-specific. If the corresponding recipe is renamed to update to a
>   newer version, you must also rename and possibly update the
> -corresponding ``.bbappend`` as well. During the build process, BitBake
> -displays an error on starting if it detects a ``.bbappend`` file that
> -does not have a corresponding recipe with a matching name. See the
> -:term:`BB_DANGLINGAPPENDS_WARNONLY`
> -variable for information on how to handle this error.
> +corresponding ``.bbappend`` as well.
> +
> +During the build process, BitBake displays an error on startup if it detects a
> +``.bbappend`` file that does not have a corresponding recipe with a matching
> +name. To handle these errors, the better practice is to rename the ``.bbappend``

We usually say best practice in the docs (haven't found one occurrence 
of better practice with a naive grep search). Did you mean best practice 
maybe?

> +to match the original recipe version. This also gives you the opportunity to see
> +if the ``.bbappend`` is still relevant for the new version of the recipe.
> +
> +Another method to deal with these errors is to use the variable :term:`BBMASK`,
> +especially in cases where modifying the ``.bbappend`` is not possible.
>   

And another method is to make use of the % character in the filename 
where possible? E.g. for minor updates (I still like my gstreamer 
bbappend example since it continues to happen to me during rebases :) ), 
one could use someapp_3.%.bbappend.

Otherwise looks good to me, should be part of the migration manual I 
believe?

Cheers,
Quentin
Antonin Godard Dec. 20, 2024, 9:17 a.m. UTC | #2
Hi Quentin,

On Tue Dec 17, 2024 at 3:08 PM CET, Quentin Schulz wrote:
> Hi Antonin,
>
> On 12/17/24 10:27 AM, Antonin Godard via lists.yoctoproject.org wrote:
>> Support for this variable was dropped in BitBake, see commit
>> fca9c9e3cb6f8e9f99bf51dc5e8a8d83f4c84c69 ("cooker: Drop support for
>> BB_DANGLINGAPPENDS_WARNONLY").
>> 
>> Drop this variable here as well and rewrite the "Appending Other Layers
>> Metadata With Your Layer" section to advise to rename the recipe and
>> check if the bbappend is still relevant - otherwise to use BBWARN.
>> 
>> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
>> ---
>>   documentation/dev-manual/layers.rst    | 15 ++++++++++-----
>>   documentation/ref-manual/variables.rst | 18 ------------------
>>   2 files changed, 10 insertions(+), 23 deletions(-)
>> 
>> diff --git a/documentation/dev-manual/layers.rst b/documentation/dev-manual/layers.rst
>> index 89c84669337c9ecdc90110fdf34b7949459a1b9f..365991c225159d051f6dc4122625616b81f01ee3 100644
>> --- a/documentation/dev-manual/layers.rst
>> +++ b/documentation/dev-manual/layers.rst
>> @@ -470,11 +470,16 @@ corresponding recipe file. For example, the append file
>>   means the original recipe and append filenames are version
>>   number-specific. If the corresponding recipe is renamed to update to a
>>   newer version, you must also rename and possibly update the
>> -corresponding ``.bbappend`` as well. During the build process, BitBake
>> -displays an error on starting if it detects a ``.bbappend`` file that
>> -does not have a corresponding recipe with a matching name. See the
>> -:term:`BB_DANGLINGAPPENDS_WARNONLY`
>> -variable for information on how to handle this error.
>> +corresponding ``.bbappend`` as well.
>> +
>> +During the build process, BitBake displays an error on startup if it detects a
>> +``.bbappend`` file that does not have a corresponding recipe with a matching
>> +name. To handle these errors, the better practice is to rename the ``.bbappend``
>
> We usually say best practice in the docs (haven't found one occurrence 
> of better practice with a naive grep search). Did you mean best practice 
> maybe?

Oops, "best" it is yes :)

>> +to match the original recipe version. This also gives you the opportunity to see
>> +if the ``.bbappend`` is still relevant for the new version of the recipe.
>> +
>> +Another method to deal with these errors is to use the variable :term:`BBMASK`,
>> +especially in cases where modifying the ``.bbappend`` is not possible.
>>   
>
> And another method is to make use of the % character in the filename 
> where possible? E.g. for minor updates (I still like my gstreamer 
> bbappend example since it continues to happen to me during rebases :) ), 
> one could use someapp_3.%.bbappend.

Yes, that's right, I will also add this method. I'll mention matching the minor
version only if possible, not the entire version, to avoid masking too much when
updating. It's good to take a look at a bbappend every once and a while. :)

> Otherwise looks good to me, should be part of the migration manual I
> believe?

Yes absolutely, thanks!

Antonin
diff mbox series

Patch

diff --git a/documentation/dev-manual/layers.rst b/documentation/dev-manual/layers.rst
index 89c84669337c9ecdc90110fdf34b7949459a1b9f..365991c225159d051f6dc4122625616b81f01ee3 100644
--- a/documentation/dev-manual/layers.rst
+++ b/documentation/dev-manual/layers.rst
@@ -470,11 +470,16 @@  corresponding recipe file. For example, the append file
 means the original recipe and append filenames are version
 number-specific. If the corresponding recipe is renamed to update to a
 newer version, you must also rename and possibly update the
-corresponding ``.bbappend`` as well. During the build process, BitBake
-displays an error on starting if it detects a ``.bbappend`` file that
-does not have a corresponding recipe with a matching name. See the
-:term:`BB_DANGLINGAPPENDS_WARNONLY`
-variable for information on how to handle this error.
+corresponding ``.bbappend`` as well.
+
+During the build process, BitBake displays an error on startup if it detects a
+``.bbappend`` file that does not have a corresponding recipe with a matching
+name. To handle these errors, the better practice is to rename the ``.bbappend``
+to match the original recipe version. This also gives you the opportunity to see
+if the ``.bbappend`` is still relevant for the new version of the recipe.
+
+Another method to deal with these errors is to use the variable :term:`BBMASK`,
+especially in cases where modifying the ``.bbappend`` is not possible.
 
 Overlaying a File Using Your Layer
 ----------------------------------
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 08fb0f4d5666b80be153f39310826a7e1b9022fe..d54e1365fcf3dabd3868aa80089afda727b1415a 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -362,24 +362,6 @@  system and gives an overview of their function and contents.
    :term:`BB_CURRENTTASK`
       See :term:`bitbake:BB_CURRENTTASK` in the BitBake manual.
 
-   :term:`BB_DANGLINGAPPENDS_WARNONLY`
-      Defines how BitBake handles situations where an append file
-      (``.bbappend``) has no corresponding recipe file (``.bb``). This
-      condition often occurs when layers get out of sync (e.g. ``oe-core``
-      bumps a recipe version and the old recipe no longer exists and the
-      other layer has not been updated to the new version of the recipe
-      yet).
-
-      The default fatal behavior is safest because it is the sane reaction
-      given something is out of sync. It is important to realize when your
-      changes are no longer being applied.
-
-      You can change the default behavior by setting this variable to "1",
-      "yes", or "true" in your ``local.conf`` file, which is located in the
-      :term:`Build Directory`: Here is an example::
-
-         BB_DANGLINGAPPENDS_WARNONLY = "1"
-
    :term:`BB_DEFAULT_TASK`
       See :term:`bitbake:BB_DEFAULT_TASK` in the BitBake manual.