From c473fa229239752367c5d573160fc8738cf1907e Mon Sep 17 00:00:00 2001 From: Nicolas Dechesne Date: Fri, 24 Jul 2020 16:27:54 +0200 Subject: sphinx: fix internal links Many of the internal links were not converted probably from DocBook using pandoc. After looking at the various patterns, the follow series of 'naive' Python regexp were used to perform some additional automatic conversion. Also, since we rely on built-in glossary, all links to terms need to use the sphinx :term: syntax. This commit is generated using the following Python series of regexp: line = re.sub("`+(\w+)`* <(\&YOCTO_DOCS_REF_URL;)?#var-\\1>`__", ":term:`\\1`", line) line = re.sub("`+do_([a-z_]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-tasks-\\1>`__", ":ref:`ref-tasks-\\1`", line) line = re.sub("`+([a-z_\-\*\.]+).bbclass`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__", ":ref:`\\1.bbclass `", line) line = re.sub("`+([a-z_\-\*\.]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__", ":ref:`\\1 `", line) line = re.sub("`Source Directory <(\&YOCTO_DOCS_REF_URL;)?#source-directory>`__", ":term:`Source Directory`", line) line = re.sub("`Build Directory <(\&YOCTO_DOCS_REF_URL;)?#build-directory>`__", ":term:`Build Directory`", line) line = re.sub("`Metadata <(\&YOCTO_DOCS_REF_URL;)?#metadata>`__", ":term:`Metadata`", line) line = re.sub("`BitBake <(\&YOCTO_DOCS_REF_URL;)?#bitbake-term>`__", ":term:`BitBake`", line) line = re.sub("`Images <(\&YOCTO_DOCS_REF_URL;)?#ref-images>`__", ":ref:`ref-manual/ref-images:Images`", line) line = re.sub("`Classes <(\&YOCTO_DOCS_REF_URL;)?#ref-classes>`__", ":ref:`ref-manual/ref-classes:Classes`", line) line = re.sub("`workspace <(\&YOCTO_DOCS_REF_URL;)?#devtool-the-workspace-layer-structure>`__", ":ref:`devtool-the-workspace-layer-structure`", line) line = re.sub("`Open-?Embedded b?B?uild s?S?ystem <(\&YOCTO_DOCS_REF_URL;)?#build-system-term>`__", ":term:`OpenEmbedded Build System`", line) line = re.sub("`(OpenEmbedded-Core )?(\(?OE-Core\)? )?<(\&YOCTO_DOCS_REF_URL;)?#oe-core>`__", ":term:`OpenEmbedded-Core (OE-Core)`", line) It won't catch multiline strings, but it catches a very large number of occurences! (From yocto-docs rev: 3f537d17de5b1fb76ba3bee196481984a4826378) Signed-off-by: Nicolas Dechesne Signed-off-by: Richard Purdie --- documentation/ref-manual/faq.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'documentation/ref-manual/faq.rst') diff --git a/documentation/ref-manual/faq.rst b/documentation/ref-manual/faq.rst index d3dac28b0f..07244a0311 100644 --- a/documentation/ref-manual/faq.rst +++ b/documentation/ref-manual/faq.rst @@ -8,7 +8,7 @@ FAQ **A:** The term "`Poky <#>`__" refers to the specific reference build system that the Yocto Project provides. Poky is based on -`OE-Core <#oe-core>`__ and `BitBake <#bitbake-term>`__. Thus, the +:term:`OpenEmbedded-Core (OE-Core)` and :term:`BitBake`. Thus, the generic term used here for the build system is the "OpenEmbedded build system." Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with changes always being merged to OE-Core or BitBake @@ -29,7 +29,7 @@ steps on how to update your build tools. **A:** There are three areas that help with stability; -- The Yocto Project team keeps `OE-Core <#oe-core>`__ small and +- The Yocto Project team keeps :term:`OpenEmbedded-Core (OE-Core)` small and focused, containing around 830 recipes as opposed to the thousands available in other OpenEmbedded community layers. Keeping it small makes it easy to test and maintain. @@ -227,19 +227,19 @@ meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend size, you need to set various configurations: - *Image Size:* The OpenEmbedded build system uses the - ```IMAGE_ROOTFS_SIZE`` <#var-IMAGE_ROOTFS_SIZE>`__ variable to define + :term:`IMAGE_ROOTFS_SIZE` variable to define the size of the image in Kbytes. The build system determines the size by taking into account the initial root filesystem size before any modifications such as requested size for the image and any requested additional free disk space to be added to the image. - *Overhead:* Use the - ```IMAGE_OVERHEAD_FACTOR`` <#var-IMAGE_OVERHEAD_FACTOR>`__ variable + :term:`IMAGE_OVERHEAD_FACTOR` variable to define the multiplier that the build system applies to the initial image size, which is 1.3 by default. - *Additional Free Space:* Use the - ```IMAGE_ROOTFS_EXTRA_SPACE`` <#var-IMAGE_ROOTFS_EXTRA_SPACE>`__ + :term:`IMAGE_ROOTFS_EXTRA_SPACE` variable to add additional free space to the image. The build system adds this space to the image after it determines its ``IMAGE_ROOTFS_SIZE``. @@ -281,8 +281,8 @@ environments if HTTP transport is available. When the build system searches for source code, it first tries the local download directory. If that location fails, Poky tries -```PREMIRRORS`` <#var-PREMIRRORS>`__, the upstream source, and then -```MIRRORS`` <#var-MIRRORS>`__ in that order. +:term:`PREMIRRORS`, the upstream source, and then +:term:`MIRRORS` in that order. Assuming your distribution is "poky", the OpenEmbedded build system uses the Yocto Project source ``PREMIRRORS`` by default for SCM-based @@ -409,7 +409,7 @@ my recipe is installing to the wrong place, or I am getting permissions errors during the do_install task in my recipe! What is wrong? **A:** This situation results when a build system does not recognize the -environment variables supplied to it by `BitBake <#bitbake-term>`__. The +environment variables supplied to it by :term:`BitBake`. The incident that prompted this FAQ entry involved a Makefile that used an environment variable named ``BINDIR`` instead of the more standard variable ``bindir``. The makefile's hardcoded default value of -- cgit v1.2.3-54-g00ecf