summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
diff options
context:
space:
mode:
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.rst44
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
26something like the following: src_uri = (d.getVar('SRC_URI') or 26something 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()
28This code sets up an instance of the fetch class. The instance uses a 28This code sets up an instance of the fetch class. The instance uses a
29space-separated list of URLs from the ```SRC_URI`` <#var-bb-SRC_URI>`__ 29space-separated list of URLs from the :term:`SRC_URI`
30variable and then calls the ``download`` method to download the files. 30variable and then calls the ``download`` method to download the files.
31 31
32The instantiation of the fetch class is usually followed by: rootdir = 32The 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
63For each URL passed to the fetcher, the fetcher calls the submodule that 63For each URL passed to the fetcher, the fetcher calls the submodule that
@@ -88,7 +88,7 @@ previous example does.
88Since network accesses are slow, BitBake maintains a cache of files 88Since network accesses are slow, BitBake maintains a cache of files
89downloaded from the network. Any source files that are not local (i.e. 89downloaded from the network. Any source files that are not local (i.e.
90downloaded from the Internet) are placed into the download directory, 90downloaded from the Internet) are placed into the download directory,
91which is specified by the ```DL_DIR`` <#var-bb-DL_DIR>`__ variable. 91which is specified by the :term:`DL_DIR` variable.
92 92
93File integrity is of key importance for reproducing builds. For 93File integrity is of key importance for reproducing builds. For
94non-local archive downloads, the fetcher code can verify SHA-256 and MD5 94non-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
115If ```BB_STRICT_CHECKSUM`` <#var-bb-BB_STRICT_CHECKSUM>`__ is set, any 115If :term:`BB_STRICT_CHECKSUM` is set, any
116download without a checksum triggers an error message. The 116download 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
118make any attempted network access a fatal error, which is useful for 118make any attempted network access a fatal error, which is useful for
119checking that mirrors are complete as well as other things. 119checking that mirrors are complete as well as other things.
120 120
@@ -170,9 +170,9 @@ Local file fetcher (``file://``)
170This submodule handles URLs that begin with ``file://``. The filename 170This submodule handles URLs that begin with ``file://``. The filename
171you specify within the URL can be either an absolute or relative path to 171you specify within the URL can be either an absolute or relative path to
172a file. If the filename is relative, the contents of the 172a 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
175assumed that it is available in ```DL_DIR`` <#var-bb-DL_DIR>`__ by the 175assumed that it is available in :term:`DL_DIR` by the
176time the ``download()`` method is called. 176time the ``download()`` method is called.
177 177
178If you specify a directory, the entire directory is unpacked. 178If you specify a directory, the entire directory is unpacked.
@@ -194,7 +194,7 @@ The executable and parameters used are specified by the
194fetcher supports a parameter "downloadfilename" that allows the name of 194fetcher supports a parameter "downloadfilename" that allows the name of
195the downloaded file to be specified. Specifying the name of the 195the downloaded file to be specified. Specifying the name of the
196downloaded file is useful for avoiding collisions in 196downloaded 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
198have the same name. 198have the same name.
199 199
200Some example URLs are as follows: SRC_URI = 200Some 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://``)
304This fetcher submodule fetches code from the Subversion source control 304This fetcher submodule fetches code from the Subversion source control
305system. The executable used is specified by ``FETCHCMD_svn``, which 305system. The executable used is specified by ``FETCHCMD_svn``, which
306defaults to "svn". The fetcher's temporary working directory is set by 306defaults 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
309The supported parameters are as follows: 309The supported parameters are as follows:
310 310
@@ -345,7 +345,7 @@ Git Fetcher (``git://``)
345 345
346This fetcher submodule fetches code from the Git source control system. 346This fetcher submodule fetches code from the Git source control system.
347The fetcher works by creating a bare clone of the remote into 347The 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
349bare clone is then cloned into the work directory during the unpack 349bare clone is then cloned into the work directory during the unpack
350stage when a specific tree is checked out. This is done using alternates 350stage when a specific tree is checked out. This is done using alternates
351and by reference to minimize the amount of duplicate data on the disk 351and by reference to minimize the amount of duplicate data on the disk
@@ -416,7 +416,7 @@ Git Submodule Fetcher (``gitsm://``)
416 416
417This fetcher submodule inherits from the `Git fetcher <#git-fetcher>`__ 417This fetcher submodule inherits from the `Git fetcher <#git-fetcher>`__
418and extends that fetcher's behavior by fetching a repository's 418and extends that fetcher's behavior by fetching a repository's
419submodules. ```SRC_URI`` <#var-bb-SRC_URI>`__ is passed to the Git 419submodules. :term:`SRC_URI` is passed to the Git
420fetcher as described in the "`Git Fetcher 420fetcher 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
441repository. 441repository.
442 442
443To use this fetcher, make sure your recipe has proper 443To 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"
447SRCREV = "EXAMPLE_CLEARCASE_TAG" PV = "${@d.getVar("SRCREV", 447SRCREV = "EXAMPLE_CLEARCASE_TAG" PV = "${@d.getVar("SRCREV",
448False).replace("/", "+")}" The fetcher uses the ``rcleartool`` or 448False).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
511executable used is specified by ``FETCHCMD_p4``, which defaults to "p4". 511executable used is specified by ``FETCHCMD_p4``, which defaults to "p4".
512The fetcher's temporary working directory is set by 512The 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".
514The fetcher does not make use of a perforce client, instead it 514The fetcher does not make use of a perforce client, instead it
515relies on ``p4 files`` to retrieve a list of 515relies on ``p4 files`` to retrieve a list of
516files and ``p4 print`` to transfer the content 516files and ``p4 print`` to transfer the content
517of those files locally. 517of those files locally.
518 518
519To use this fetcher, make sure your recipe has proper 519To 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
522config file defined by your system's ``P4CONFIG`` environment variable 522config file defined by your system's ``P4CONFIG`` environment variable
523in order to define the Perforce server URL and port, username, and 523in order to define the Perforce server URL and port, username, and
524password if you do not wish to keep those values in a recipe itself. If 524password if you do not wish to keep those values in a recipe itself. If
@@ -584,8 +584,8 @@ Repo Fetcher (``repo://``)
584 584
585This fetcher submodule fetches code from ``google-repo`` source control 585This fetcher submodule fetches code from ``google-repo`` source control
586system. The fetcher works by initiating and syncing sources of the 586system. The fetcher works by initiating and syncing sources of the
587repository into ```REPODIR`` <#var-bb-REPODIR>`__, which is usually 587repository into :term:`REPODIR`, which is usually
588```DL_DIR`` <#var-bb-DL_DIR>`__\ ``/repo``. 588:term:`DL_DIR`\ ``/repo``.
589 589
590This fetcher supports the following parameters: 590This fetcher supports the following parameters:
591 591