Android source code build tool Overview (2)-list file

Source: Internet
Author: User

The previous Code has constructed an android source code library locally. Let's take a look at how the source code library is constructed.

 

All of this is based on the construction tool named repo. Go back to the initial command $ curl http://android.git.kernel.org/repo> ~ /Bin/Repo
This command downloads a script named repo from the website. It is actually a Python code segment. It is a bit interesting to look at it carefully. It is actually a small part of the code of the entire build tool, and the function of this small part of the code is mainly to download its other code and initialize the Build Environment.

When running this tool, it first checks. repo directory, and then from the built-in script (or the address specified by the command line) git: // android.kernel.org/tools/repo.git to use git to clone a complete version library of the latest repo tool. check the latest code in the repo/repo directory. These codes are the code of other parts of the repo. Here, Main. py is the main entry code of the repo build tool.

 

In the previous construction process, in the call command $ repo init-u git: // android.git.kernel.org/platform/manifest.git, the repo first completes the update and initialization of itself, then, call the code added later to complete the init operation. In this operation, the repo downloads a version library of the entire source code repository list from the GIT: // android.git.kernel.org/platform/manifest.git address, and checkout out the latest list, that is. repo/manifests/default. XML file. This file is an XML file that describes the remote version library address for getting code, the address of each project involved in it, and so on. Below are some of them:

  1. <Manifest branch = "master">
  2. <Remote name = "Korg"
  3. Fetch = "Git: // android.git.kernel.org /"
  4. Review = "review.source.android.com"/>
  5. <Project Path = "Bionic" name = "platform/bionic"/>
  6. <Project Path = "external/clearsilver" name = "platform/external/clearsilver">
  7. <Import>
  8. <Remap strip = "clearsilver-% version %/"/>
  9. <Mirror url = "http://android.git.kernel.org/pub/clearsilver-%version%.tar.gz"/>
  10. <Snapshot version = "0.10.5" Check = "ec5fff5d71_ddd29a619cf81ae1_687fde94c8"/>
  11. </Import>
  12. </Project>
  13. ......
  14. </Manifest>

A small part of the clip is intercepted to illustrate the problem.

The fetch attribute of the remote node describes the basic address of the remote version library, followed by a series of Project nodes. Each project node has a path and name attribute. path is the local storage address of the project, and bionic is stored locally. under/repo/projects/bionic, and the name attribute is the path in the remote version library, you can get the version library address of the project by combining with the remote fetch address, for example, the bionic version library is in git: // android.git.kernel.org/platform/bionic

The quota package. During synchronization, the repo will download it, decompress it, add it to the version library of the project, and mark it with a tag.

Through this inventory file, Repo can be used to update and synchronize the entire source code library at any time, which is also a unique advantage of Git-based version control.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.