Skip to contentSkip to conversation

bitbake-user-manual: fix backslash issues

PATCH In review Michael Opdenacker 2 participants 2 messages Nov 19, 2021 – Nov 20, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake-user-manual: fix backslash issues

---
 .../bitbake-user-manual-fetching.rst          | 20 +++++++++----------
 .../bitbake-user-manual-metadata.rst          | 10 +++++-----
 2 files changed, 15 insertions(+), 15 deletions(-)
doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +10 -10
index 4396830a..260d43ab 100644
@@ -84,18 +84,18 @@ fetcher does know how to use HTTP as a transport.
 Here are some examples that show commonly used mirror definitions::
 
    PREMIRRORS ?= "\
-      bzr://.*/.\*  http://somemirror.org/sources/ \\n \
-      cvs://.*/.\*  http://somemirror.org/sources/ \\n \
-      git://.*/.\*  http://somemirror.org/sources/ \\n \
-      hg://.*/.\*   http://somemirror.org/sources/ \\n \
-      osc://.*/.\*  http://somemirror.org/sources/ \\n \
-      p4://.*/.\*   http://somemirror.org/sources/ \\n \
-     svn://.*/.\*   http://somemirror.org/sources/ \\n"
+      bzr://.*/.\*  http://somemirror.org/sources/ \n \
+      cvs://.*/.\*  http://somemirror.org/sources/ \n \
+      git://.*/.\*  http://somemirror.org/sources/ \n \
+      hg://.*/.\*   http://somemirror.org/sources/ \n \
+      osc://.*/.\*  http://somemirror.org/sources/ \n \
+      p4://.*/.\*   http://somemirror.org/sources/ \n \
+     svn://.*/.\*   http://somemirror.org/sources/ \n"
 
    MIRRORS =+ "\
-      ftp://.*/.\*   http://somemirror.org/sources/ \\n \
-      http://.*/.\*  http://somemirror.org/sources/ \\n \
-      https://.*/.\* http://somemirror.org/sources/ \\n"
+      ftp://.*/.\*   http://somemirror.org/sources/ \n \
+      http://.*/.\*  http://somemirror.org/sources/ \n \
+      https://.*/.\* http://somemirror.org/sources/ \n"
 
 It is useful to note that BitBake
 supports cross-URLs. It is possible to mirror a Git repository on an
doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +5 -5
index 119720d5..46bcfa60 100644
@@ -104,15 +104,15 @@ Line Joining
 
 Outside of :ref:`functions <bitbake-user-manual/bitbake-user-manual-metadata:functions>`,
 BitBake joins any line ending in
-a backslash character ("\") with the following line before parsing
-statements. The most common use for the "\" character is to split
+a backslash character ("\\") with the following line before parsing
+statements. The most common use for the "\\" character is to split
 variable assignments over multiple lines, as in the following example::
 
    FOO = "bar \
           baz \
           qaz"
 
-Both the "\" character and the newline
+Both the "\\" character and the newline
 character that follow it are removed when joining lines. Thus, no
 newline characters end up in the value of ``FOO``.
 
@@ -125,7 +125,7 @@ Consider this additional example where the two assignments both assign
 
 .. note::
 
-   BitBake does not interpret escape sequences like "\n" in variable
+   BitBake does not interpret escape sequences like "\\n" in variable
    values. For these to have an effect, the value must be passed to some
    utility that interprets escape sequences, such as
    ``printf`` or ``echo -n``.
@@ -159,7 +159,7 @@ behavior::
    C = "qux"
    *At this point, ${A} equals "qux bar baz"*
    B = "norf"
-   *At this point, ${A} equals "norf baz"\*
+   *At this point, ${A} equals "norf baz"*
 
 Contrast this behavior with the
 :ref:`bitbake-user-manual/bitbake-user-manual-metadata:immediate variable
Signature · 1 line
2.25.1
#1 lore raw
Quoted 33 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Michael Opdenacker
Sent: den 19 november 2021 18:06
To: [email protected]
Cc: [email protected]; Michael Opdenacker <[email protected]>
Subject: [bitbake-devel] [PATCH] bitbake-user-manual: fix backslash issues

---
 .../bitbake-user-manual-fetching.rst          | 20 +++++++++----------
 .../bitbake-user-manual-metadata.rst          | 10 +++++-----
 2 files changed, 15 insertions(+), 15 deletions(-)
doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +5 -7
index 4396830a..260d43ab 100644
@@ -84,18 +84,18 @@ fetcher does know how to use HTTP as a transport.
 Here are some examples that show commonly used mirror definitions::
 
    PREMIRRORS ?= "\
-      bzr://.*/.\*  http://somemirror.org/sources/ \\n \
-      cvs://.*/.\*  http://somemirror.org/sources/ \\n \
-      git://.*/.\*  http://somemirror.org/sources/ \\n \
-      hg://.*/.\*   http://somemirror.org/sources/ \\n \
-      osc://.*/.\*  http://somemirror.org/sources/ \\n \
-      p4://.*/.\*   http://somemirror.org/sources/ \\n \
-     svn://.*/.\*   http://somemirror.org/sources/ \\n"
+      bzr://.*/.\*  http://somemirror.org/sources/ \n \
+      cvs://.*/.\*  http://somemirror.org/sources/ \n \
+      git://.*/.\*  http://somemirror.org/sources/ \n \
+      hg://.*/.\*   http://somemirror.org/sources/ \n \
+      osc://.*/.\*  http://somemirror.org/sources/ \n \

doc/bitbake-user-manual/bitbake-user-manual-fetching.rst fetcher does know how to use HTTP as a transport. · line 98

Quoted 10 lines
doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +5 -3
+      p4://.*/.\*   http://somemirror.org/sources/ \n \
+     svn://.*/.\*   http://somemirror.org/sources/ \n"
 
    MIRRORS =+ "\
-      ftp://.*/.\*   http://somemirror.org/sources/ \\n \
-      http://.*/.\*  http://somemirror.org/sources/ \\n \
-      https://.*/.\* http://somemirror.org/sources/ \\n"
+      ftp://.*/.\*   http://somemirror.org/sources/ \n \
+      http://.*/.\*  http://somemirror.org/sources/ \n \
+      https://.*/.\* http://somemirror.org/sources/ \n"

These were all recently corrected in OE-Core to remove the \n as they have not been needed for a long time, so I suggest you do the same here.

Quoted 44 lines
doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +0 -0
 It is useful to note that BitBake
 supports cross-URLs. It is possible to mirror a Git repository on an
doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +5 -6
index 119720d5..46bcfa60 100644
@@ -104,15 +104,15 @@ Line Joining
 
 Outside of :ref:`functions <bitbake-user-manual/bitbake-user-manual-metadata:functions>`,
 BitBake joins any line ending in
-a backslash character ("\") with the following line before parsing
-statements. The most common use for the "\" character is to split
+a backslash character ("\\") with the following line before parsing
+statements. The most common use for the "\\" character is to split
 variable assignments over multiple lines, as in the following example::
 
    FOO = "bar \
           baz \
           qaz"
 
-Both the "\" character and the newline
+Both the "\\" character and the newline
 character that follow it are removed when joining lines. Thus, no
 newline characters end up in the value of ``FOO``.
 
@@ -125,7 +125,7 @@ Consider this additional example where the two assignments both assign
 
 .. note::
 
-   BitBake does not interpret escape sequences like "\n" in variable
+   BitBake does not interpret escape sequences like "\\n" in variable
    values. For these to have an effect, the value must be passed to some
    utility that interprets escape sequences, such as
    ``printf`` or ``echo -n``.
@@ -159,7 +159,7 @@ behavior::
    C = "qux"
    *At this point, ${A} equals "qux bar baz"*
    B = "norf"
-   *At this point, ${A} equals "norf baz"\*
+   *At this point, ${A} equals "norf baz"*
 
 Contrast this behavior with the
 :ref:`bitbake-user-manual/bitbake-user-manual-metadata:immediate variable
--
Quoted 1 line

2.25.1

//Peter