All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] doc: Fix append/prepend/remove references
@ 2021-08-04  9:55 Richard Purdie
  2021-08-04  9:55 ` [PATCH 2/2] fetch/tests/toaster: Override conversion fixups Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2021-08-04  9:55 UTC (permalink / raw)
  To: bitbake-devel

Fix some references missed during the overrides syntax migration.
Thanks to Quentin Schulz <foss@0leil.net> for the patch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../bitbake-user-manual-metadata.rst          | 26 +++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
index 6b88fd11e0..b0494d0809 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
@@ -325,14 +325,14 @@ Surrounding spaces and spacing are preserved. Here is an example::
 The variable ``FOO`` becomes
 "  789 123456    " and ``FOO2`` becomes "    abcdef     ".
 
-Like "_append" and "_prepend", "_remove" is applied at variable
+Like ":append" and ":prepend", ":remove" is applied at variable
 expansion time.
 
 Override Style Operation Advantages
 -----------------------------------
 
-An advantage of the override style operations "_append", "_prepend", and
-"_remove" as compared to the "+=" and "=+" operators is that the
+An advantage of the override style operations ":append", ":prepend", and
+":remove" as compared to the "+=" and "=+" operators is that the
 override style operators provide guaranteed operations. For example,
 consider a class ``foo.bbclass`` that needs to add the value "val" to
 the variable ``FOO``, and a recipe that uses ``foo.bbclass`` as follows::
@@ -347,14 +347,14 @@ not what is desired::
    FOO += "val"
 
 If, on the other hand, ``foo.bbclass``
-uses the "_append" operator, then the final value of ``FOO`` will be
+uses the ":append" operator, then the final value of ``FOO`` will be
 "initial val", as intended::
 
    FOO:append = " val"
 
 .. note::
 
-   It is never necessary to use "+=" together with "_append". The following
+   It is never necessary to use "+=" together with ":append". The following
    sequence of assignments appends "barbaz" to FOO::
 
        FOO:append = "bar"
@@ -379,8 +379,8 @@ You can find more out about variable flags in general in the
 
 You can define, append, and prepend values to variable flags. All the
 standard syntax operations previously mentioned work for variable flags
-except for override style syntax (i.e. "_prepend", "_append", and
-"_remove").
+except for override style syntax (i.e. ":prepend", ":append", and
+":remove").
 
 Here are some examples showing how to set variable flags::
 
@@ -581,7 +581,7 @@ variable.
    ``do_compile`` task.
 
    You can also use this syntax with other combinations (e.g.
-   "``_prepend``") as shown in the following example::
+   "``:prepend``") as shown in the following example::
 
       EXTRA_OEMAKE:prepend:task-compile = "${PARALLEL_MAKE} "
 
@@ -613,7 +613,7 @@ users.
 
 There is often confusion concerning the order in which overrides and
 various "append" operators take effect. Recall that an append or prepend
-operation using "_append" and "_prepend" does not result in an immediate
+operation using ":append" and ":prepend" does not result in an immediate
 assignment as would "+=", ".=", "=+", or "=.". Consider the following
 example::
 
@@ -671,7 +671,7 @@ For this case, the type of append
 operators are affecting the order of assignments as BitBake passes
 through the code multiple times. Initially, ``A`` is set to "1 45"
 because of the three statements that use immediate operators. After
-these assignments are made, BitBake applies the "_append" operations.
+these assignments are made, BitBake applies the ":append" operations.
 Those operations result in ``A`` becoming "1 4523".
 
 Sharing Functionality
@@ -908,7 +908,7 @@ rules. The scripts are executed by ``/bin/sh``, which may not be a bash
 shell but might be something such as ``dash``. You should not use
 Bash-specific script (bashisms).
 
-Overrides and override-style operators like ``_append`` and ``_prepend``
+Overrides and override-style operators like ``:append`` and ``:prepend``
 can also be applied to shell functions. Most commonly, this application
 would be used in a ``.bbappend`` file to modify functions in the main
 recipe. It can also be used to modify functions inherited from classes.
@@ -1135,7 +1135,7 @@ equivalent to the following snippet::
 values set for the variables within the anonymous functions become
 available to tasks, which always run after parsing.
 
-Overrides and override-style operators such as "``_append``" are applied
+Overrides and override-style operators such as "``:append``" are applied
 before anonymous functions run. In the following example, ``FOO`` ends
 up with the value "foo from anonymous"::
 
@@ -1165,7 +1165,7 @@ To understand the benefits of this feature, consider the basic scenario
 where a class defines a task function and your recipe inherits the
 class. In this basic scenario, your recipe inherits the task function as
 defined in the class. If desired, your recipe can add to the start and
-end of the function by using the "_prepend" or "_append" operations
+end of the function by using the ":prepend" or ":append" operations
 respectively, or it can redefine the function completely. However, if it
 redefines the function, there is no means for it to call the class
 version of the function. ``EXPORT_FUNCTIONS`` provides a mechanism that
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] fetch/tests/toaster: Override conversion fixups
  2021-08-04  9:55 [PATCH 1/2] doc: Fix append/prepend/remove references Richard Purdie
@ 2021-08-04  9:55 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2021-08-04  9:55 UTC (permalink / raw)
  To: bitbake-devel

Fix some references that missed during the overrides syntax migration or
were incorrect. Thanks to Quentin Schulz <foss@0leil.net> for the patch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/fetch2/__init__.py       | 2 +-
 lib/bb/tests/parse.py           | 2 +-
 lib/bb/utils.py                 | 2 +-
 lib/toaster/toastergui/views.py | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 60aaf3902a..ad898680ff 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1146,7 +1146,7 @@ def srcrev_internal_helper(ud, d, name):
     pn = d.getVar("PN")
     attempts = []
     if name != '' and pn:
-        attempts.append("SRCREV_%s_pn-%s" % (name, pn))
+        attempts.append("SRCREV_%s:pn-%s" % (name, pn))
     if name != '':
         attempts.append("SRCREV_%s" % name)
     if pn:
diff --git a/lib/bb/tests/parse.py b/lib/bb/tests/parse.py
index 1b6b6d412e..4d17f82edc 100644
--- a/lib/bb/tests/parse.py
+++ b/lib/bb/tests/parse.py
@@ -99,7 +99,7 @@ exportD = "d"
 
     overridetest = """
 RRECOMMENDS:${PN} = "a"
-RRECOMMENDS:${PN}_libc = "b"
+RRECOMMENDS:${PN}:libc = "b"
 OVERRIDES = "libc:${PN}"
 PN = "gtk+"
 """
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 6ba1d2a376..e6e82d1118 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -1178,7 +1178,7 @@ def edit_metadata(meta_lines, variables, varfunc, match_overrides=False):
         variables: a list of variable names to look for. Functions
             may also be specified, but must be specified with '()' at
             the end of the name. Note that the function doesn't have
-            any intrinsic understanding of _append, _prepend, _remove,
+            any intrinsic understanding of :append, :prepend, :remove,
             or overrides, so these are considered as part of the name.
             These values go into a regular expression, so regular
             expression syntax is allowed.
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 04ab8bcb04..74f9d56963 100644
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -1840,7 +1840,7 @@ if True:
             pass
         try:
             context['image_install:append'] =  ProjectVariable.objects.get(project = prj, name = "IMAGE_INSTALL:append").value
-            context['image_install:append_defined'] = "1"
+            context['image_install_append_defined'] = "1"
         except ProjectVariable.DoesNotExist:
             pass
         try:
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-04  9:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04  9:55 [PATCH 1/2] doc: Fix append/prepend/remove references Richard Purdie
2021-08-04  9:55 ` [PATCH 2/2] fetch/tests/toaster: Override conversion fixups Richard Purdie

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.