how_to_use_google_repo

This is an old revision of the document!


Tutorial on how to use Google repo tool, using AGL (Automotive Grade Linux) as an example.

Links:

Install the repo launcher tool in your personal ~/bin directory:

$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod +x ~/bin/repo

Note well that this is not the repo command itself; rather, it is the launcher tool that will, every time you initialize a new repo directory, copy the actual repo command into that new directory.

Do not confuse these two things; that is a common misunderstanding.

After creating a new directory:

$ mkdir repo_dir
$ cd repo_dir

initialize a new (in this case, AGL) repo directory:

$ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo

and note carefully what that accomplished.

The repo command you ran in the above command was the launcher tool in your home directory, and the end result is to populate your current directory with, well:

$ ls -AF
.repo/
$

If you examine that .repo directory, you'll see simply manifest files and directories for AGL, as well as a repo directory which contains, among other things, the repo command that will be used for subsequent operations:

$ ls -F repo
color.py        git_config.py  MANIFEST.in              __pycache__/   setup.py*
command.py      gitc_utils.py  manifest_xml.py          pyversion.py   subcmds/
docs/           git_refs.py    pager.py                 README.md      SUBMITTING_PATCHES.md
editor.py       git_ssh*       platform_utils.py        release/       tests/
error.py        hooks/         platform_utils_win32.py  repo*          tox.ini
event_log.py    LICENSE        progress.py              repo_trace.py  wrapper.py
git_command.py  main.py*       project.py               run_tests*
  • how_to_use_google_repo.1585146431.txt.gz
  • Last modified: 2020/03/25 14:27
  • by rpjday