diff options
Diffstat (limited to 'bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst')
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst index 4285a73afe..20451738a6 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst | |||
@@ -26,7 +26,7 @@ The code to execute the first part of this process, a fetch, looks | |||
26 | something like the following: src_uri = (d.getVar('SRC_URI') or | 26 | something like the following: src_uri = (d.getVar('SRC_URI') or |
27 | "").split() fetcher = bb.fetch2.Fetch(src_uri, d) fetcher.download() | 27 | "").split() fetcher = bb.fetch2.Fetch(src_uri, d) fetcher.download() |
28 | This code sets up an instance of the fetch class. The instance uses a | 28 | This code sets up an instance of the fetch class. The instance uses a |
29 | space-separated list of URLs from the ```SRC_URI`` <#var-bb-SRC_URI>`__ | 29 | space-separated list of URLs from the :term:`SRC_URI` |
30 | variable and then calls the ``download`` method to download the files. | 30 | variable and then calls the ``download`` method to download the files. |
31 | 31 | ||
32 | The instantiation of the fetch class is usually followed by: rootdir = | 32 | The instantiation of the fetch class is usually followed by: rootdir = |
@@ -51,13 +51,13 @@ URLs by looking for source files in a specific search order: | |||
51 | 51 | ||
52 | - *Pre-mirror Sites:* BitBake first uses pre-mirrors to try and find | 52 | - *Pre-mirror Sites:* BitBake first uses pre-mirrors to try and find |
53 | source files. These locations are defined using the | 53 | source files. These locations are defined using the |
54 | ```PREMIRRORS`` <#var-bb-PREMIRRORS>`__ variable. | 54 | :term:`PREMIRRORS` variable. |
55 | 55 | ||
56 | - *Source URI:* If pre-mirrors fail, BitBake uses the original URL (e.g | 56 | - *Source URI:* If pre-mirrors fail, BitBake uses the original URL (e.g |
57 | from ``SRC_URI``). | 57 | from ``SRC_URI``). |
58 | 58 | ||
59 | - *Mirror Sites:* If fetch failures occur, BitBake next uses mirror | 59 | - *Mirror Sites:* If fetch failures occur, BitBake next uses mirror |
60 | locations as defined by the ```MIRRORS`` <#var-bb-MIRRORS>`__ | 60 | locations as defined by the :term:`MIRRORS` |
61 | variable. | 61 | variable. |
62 | 62 | ||
63 | For each URL passed to the fetcher, the fetcher calls the submodule that | 63 | For each URL passed to the fetcher, the fetcher calls the submodule that |
@@ -88,7 +88,7 @@ previous example does. | |||
88 | Since network accesses are slow, BitBake maintains a cache of files | 88 | Since network accesses are slow, BitBake maintains a cache of files |
89 | downloaded from the network. Any source files that are not local (i.e. | 89 | downloaded from the network. Any source files that are not local (i.e. |
90 | downloaded from the Internet) are placed into the download directory, | 90 | downloaded from the Internet) are placed into the download directory, |
91 | which is specified by the ```DL_DIR`` <#var-bb-DL_DIR>`__ variable. | 91 | which is specified by the :term:`DL_DIR` variable. |
92 | 92 | ||
93 | File integrity is of key importance for reproducing builds. For | 93 | File integrity is of key importance for reproducing builds. For |
94 | non-local archive downloads, the fetcher code can verify SHA-256 and MD5 | 94 | non-local archive downloads, the fetcher code can verify SHA-256 and MD5 |
@@ -112,9 +112,9 @@ comparing a checksum for the file again. | |||
112 | It is assumed that local storage is safe from data corruption. If | 112 | It is assumed that local storage is safe from data corruption. If |
113 | this were not the case, there would be bigger issues to worry about. | 113 | this were not the case, there would be bigger issues to worry about. |
114 | 114 | ||
115 | If ```BB_STRICT_CHECKSUM`` <#var-bb-BB_STRICT_CHECKSUM>`__ is set, any | 115 | If :term:`BB_STRICT_CHECKSUM` is set, any |
116 | download without a checksum triggers an error message. The | 116 | download without a checksum triggers an error message. The |
117 | ```BB_NO_NETWORK`` <#var-bb-BB_NO_NETWORK>`__ variable can be used to | 117 | :term:`BB_NO_NETWORK` variable can be used to |
118 | make any attempted network access a fatal error, which is useful for | 118 | make any attempted network access a fatal error, which is useful for |
119 | checking that mirrors are complete as well as other things. | 119 | checking that mirrors are complete as well as other things. |
120 | 120 | ||
@@ -170,9 +170,9 @@ Local file fetcher (``file://``) | |||
170 | This submodule handles URLs that begin with ``file://``. The filename | 170 | This submodule handles URLs that begin with ``file://``. The filename |
171 | you specify within the URL can be either an absolute or relative path to | 171 | you specify within the URL can be either an absolute or relative path to |
172 | a file. If the filename is relative, the contents of the | 172 | a file. If the filename is relative, the contents of the |
173 | ```FILESPATH`` <#var-bb-FILESPATH>`__ variable is used in the same way | 173 | :term:`FILESPATH` variable is used in the same way |
174 | ``PATH`` is used to find executables. If the file cannot be found, it is | 174 | ``PATH`` is used to find executables. If the file cannot be found, it is |
175 | assumed that it is available in ```DL_DIR`` <#var-bb-DL_DIR>`__ by the | 175 | assumed that it is available in :term:`DL_DIR` by the |
176 | time the ``download()`` method is called. | 176 | time the ``download()`` method is called. |
177 | 177 | ||
178 | If you specify a directory, the entire directory is unpacked. | 178 | If you specify a directory, the entire directory is unpacked. |
@@ -194,7 +194,7 @@ The executable and parameters used are specified by the | |||
194 | fetcher supports a parameter "downloadfilename" that allows the name of | 194 | fetcher supports a parameter "downloadfilename" that allows the name of |
195 | the downloaded file to be specified. Specifying the name of the | 195 | the downloaded file to be specified. Specifying the name of the |
196 | downloaded file is useful for avoiding collisions in | 196 | downloaded file is useful for avoiding collisions in |
197 | ```DL_DIR`` <#var-bb-DL_DIR>`__ when dealing with multiple files that | 197 | :term:`DL_DIR` when dealing with multiple files that |
198 | have the same name. | 198 | have the same name. |
199 | 199 | ||
200 | Some example URLs are as follows: SRC_URI = | 200 | Some example URLs are as follows: SRC_URI = |
@@ -243,7 +243,7 @@ system. You can configure it using a number of different variables: | |||
243 | special value of "now" causes the checkout to be updated on every | 243 | special value of "now" causes the checkout to be updated on every |
244 | build. | 244 | build. |
245 | 245 | ||
246 | - ```CVSDIR`` <#var-bb-CVSDIR>`__\ *:* Specifies where a temporary | 246 | - :term:`CVSDIR`\ *:* Specifies where a temporary |
247 | checkout is saved. The location is often ``DL_DIR/cvs``. | 247 | checkout is saved. The location is often ``DL_DIR/cvs``. |
248 | 248 | ||
249 | - *``CVS_PROXY_HOST``:* The name to use as a "proxy=" parameter to the | 249 | - *``CVS_PROXY_HOST``:* The name to use as a "proxy=" parameter to the |
@@ -269,14 +269,14 @@ The supported parameters are as follows: | |||
269 | default, the TAG is empty. | 269 | default, the TAG is empty. |
270 | 270 | ||
271 | - *"date":* Specifies a date. If no "date" is specified, the | 271 | - *"date":* Specifies a date. If no "date" is specified, the |
272 | ```SRCDATE`` <#var-bb-SRCDATE>`__ of the configuration is used to | 272 | :term:`SRCDATE` of the configuration is used to |
273 | checkout a specific date. The special value of "now" causes the | 273 | checkout a specific date. The special value of "now" causes the |
274 | checkout to be updated on every build. | 274 | checkout to be updated on every build. |
275 | 275 | ||
276 | - *"localdir":* Used to rename the module. Effectively, you are | 276 | - *"localdir":* Used to rename the module. Effectively, you are |
277 | renaming the output directory to which the module is unpacked. You | 277 | renaming the output directory to which the module is unpacked. You |
278 | are forcing the module into a special directory relative to | 278 | are forcing the module into a special directory relative to |
279 | ```CVSDIR`` <#var-bb-CVSDIR>`__. | 279 | :term:`CVSDIR`. |
280 | 280 | ||
281 | - *"rsh"* Used in conjunction with the "method" parameter. | 281 | - *"rsh"* Used in conjunction with the "method" parameter. |
282 | 282 | ||
@@ -304,7 +304,7 @@ Subversion (SVN) Fetcher (``svn://``) | |||
304 | This fetcher submodule fetches code from the Subversion source control | 304 | This fetcher submodule fetches code from the Subversion source control |
305 | system. The executable used is specified by ``FETCHCMD_svn``, which | 305 | system. The executable used is specified by ``FETCHCMD_svn``, which |
306 | defaults to "svn". The fetcher's temporary working directory is set by | 306 | defaults to "svn". The fetcher's temporary working directory is set by |
307 | ```SVNDIR`` <#var-bb-SVNDIR>`__, which is usually ``DL_DIR/svn``. | 307 | :term:`SVNDIR`, which is usually ``DL_DIR/svn``. |
308 | 308 | ||
309 | The supported parameters are as follows: | 309 | The supported parameters are as follows: |
310 | 310 | ||
@@ -345,7 +345,7 @@ Git Fetcher (``git://``) | |||
345 | 345 | ||
346 | This fetcher submodule fetches code from the Git source control system. | 346 | This fetcher submodule fetches code from the Git source control system. |
347 | The fetcher works by creating a bare clone of the remote into | 347 | The fetcher works by creating a bare clone of the remote into |
348 | ```GITDIR`` <#var-bb-GITDIR>`__, which is usually ``DL_DIR/git2``. This | 348 | :term:`GITDIR`, which is usually ``DL_DIR/git2``. This |
349 | bare clone is then cloned into the work directory during the unpack | 349 | bare clone is then cloned into the work directory during the unpack |
350 | stage when a specific tree is checked out. This is done using alternates | 350 | stage when a specific tree is checked out. This is done using alternates |
351 | and by reference to minimize the amount of duplicate data on the disk | 351 | and by reference to minimize the amount of duplicate data on the disk |
@@ -416,7 +416,7 @@ Git Submodule Fetcher (``gitsm://``) | |||
416 | 416 | ||
417 | This fetcher submodule inherits from the `Git fetcher <#git-fetcher>`__ | 417 | This fetcher submodule inherits from the `Git fetcher <#git-fetcher>`__ |
418 | and extends that fetcher's behavior by fetching a repository's | 418 | and extends that fetcher's behavior by fetching a repository's |
419 | submodules. ```SRC_URI`` <#var-bb-SRC_URI>`__ is passed to the Git | 419 | submodules. :term:`SRC_URI` is passed to the Git |
420 | fetcher as described in the "`Git Fetcher | 420 | fetcher as described in the "`Git Fetcher |
421 | (``git://``) <#git-fetcher>`__" section. | 421 | (``git://``) <#git-fetcher>`__" section. |
422 | 422 | ||
@@ -441,8 +441,8 @@ This fetcher submodule fetches code from a | |||
441 | repository. | 441 | repository. |
442 | 442 | ||
443 | To use this fetcher, make sure your recipe has proper | 443 | To use this fetcher, make sure your recipe has proper |
444 | ```SRC_URI`` <#var-bb-SRC_URI>`__, ```SRCREV`` <#var-bb-SRCREV>`__, and | 444 | :term:`SRC_URI`, :term:`SRCREV`, and |
445 | ```PV`` <#var-bb-PV>`__ settings. Here is an example: SRC_URI = | 445 | :term:`PV` settings. Here is an example: SRC_URI = |
446 | "ccrc://cc.example.org/ccrc;vob=/example_vob;module=/example_module" | 446 | "ccrc://cc.example.org/ccrc;vob=/example_vob;module=/example_module" |
447 | SRCREV = "EXAMPLE_CLEARCASE_TAG" PV = "${@d.getVar("SRCREV", | 447 | SRCREV = "EXAMPLE_CLEARCASE_TAG" PV = "${@d.getVar("SRCREV", |
448 | False).replace("/", "+")}" The fetcher uses the ``rcleartool`` or | 448 | False).replace("/", "+")}" The fetcher uses the ``rcleartool`` or |
@@ -510,15 +510,15 @@ This fetcher submodule fetches code from the | |||
510 | `Perforce <https://www.perforce.com/>`__ source control system. The | 510 | `Perforce <https://www.perforce.com/>`__ source control system. The |
511 | executable used is specified by ``FETCHCMD_p4``, which defaults to "p4". | 511 | executable used is specified by ``FETCHCMD_p4``, which defaults to "p4". |
512 | The fetcher's temporary working directory is set by | 512 | The fetcher's temporary working directory is set by |
513 | ```P4DIR`` <#var-bb-P4DIR>`__, which defaults to "DL_DIR/p4". | 513 | :term:`P4DIR`, which defaults to "DL_DIR/p4". |
514 | The fetcher does not make use of a perforce client, instead it | 514 | The fetcher does not make use of a perforce client, instead it |
515 | relies on ``p4 files`` to retrieve a list of | 515 | relies on ``p4 files`` to retrieve a list of |
516 | files and ``p4 print`` to transfer the content | 516 | files and ``p4 print`` to transfer the content |
517 | of those files locally. | 517 | of those files locally. |
518 | 518 | ||
519 | To use this fetcher, make sure your recipe has proper | 519 | To use this fetcher, make sure your recipe has proper |
520 | ```SRC_URI`` <#var-bb-SRC_URI>`__, ```SRCREV`` <#var-bb-SRCREV>`__, and | 520 | :term:`SRC_URI`, :term:`SRCREV`, and |
521 | ```PV`` <#var-bb-PV>`__ values. The p4 executable is able to use the | 521 | :term:`PV` values. The p4 executable is able to use the |
522 | config file defined by your system's ``P4CONFIG`` environment variable | 522 | config file defined by your system's ``P4CONFIG`` environment variable |
523 | in order to define the Perforce server URL and port, username, and | 523 | in order to define the Perforce server URL and port, username, and |
524 | password if you do not wish to keep those values in a recipe itself. If | 524 | password if you do not wish to keep those values in a recipe itself. If |
@@ -584,8 +584,8 @@ Repo Fetcher (``repo://``) | |||
584 | 584 | ||
585 | This fetcher submodule fetches code from ``google-repo`` source control | 585 | This fetcher submodule fetches code from ``google-repo`` source control |
586 | system. The fetcher works by initiating and syncing sources of the | 586 | system. The fetcher works by initiating and syncing sources of the |
587 | repository into ```REPODIR`` <#var-bb-REPODIR>`__, which is usually | 587 | repository into :term:`REPODIR`, which is usually |
588 | ```DL_DIR`` <#var-bb-DL_DIR>`__\ ``/repo``. | 588 | :term:`DL_DIR`\ ``/repo``. |
589 | 589 | ||
590 | This fetcher supports the following parameters: | 590 | This fetcher supports the following parameters: |
591 | 591 | ||