| 113 | [=#repo] |
| 114 | === Working with the repo tool |
| 115 | |
| 116 | ==== Updating to the latest code |
| 117 | When working with the {{{repo}}} tool you can update to the latest code using the {{{repo sync}}} command: |
| 118 | {{{#!bash |
| 119 | $ repo sync |
| 120 | Fetching: 100% (8/8), done in 5.258s |
| 121 | Garbage collecting: 100% (8/8), done in 0.188s |
| 122 | repo sync has finished successfully. |
| 123 | }}} |
| 124 | |
| 125 | The {{{repo}}} tool works off of a manifest file in {{{.repo/manifests/default.xml}}} which specifies the various projects, what repo they are in, and where they are checked out in your directory structure. If a branch has changed, a project added, or a project removed the manifest file will be updated when you run {{{repo sync}}} then it will update the various project repos. If a branch has changed to something new you can encounter an error such as: |
| 126 | {{{#!bash |
| 127 | $ repo sync |
| 128 | remote: Enumerating objects: 5, done. |
| 129 | remote: Counting objects: 100% (5/5), done. |
| 130 | remote: Compressing objects: 100% (1/1), done. |
| 131 | remote: Total 3 (delta 1), reused 3 (delta 1), pack-reused 0 |
| 132 | Unpacking objects: 100% (3/3), done. |
| 133 | project .repo/manifests/ |
| 134 | Updating 5c981dac1797..0b0055e7445e |
| 135 | Fast-forward |
| 136 | |
| 137 | error: in `sync`: revision v5.10.76-venice in Gateworks/linux-venice not found |
| 138 | }}} |
| 139 | |
| 140 | This specific error is saying that the 'v5.10.76-venice' revision (or branch) is not in the current working copy of the repo. To resolve this you need to do a {{{git remote update}}} for that project: |
| 141 | {{{#!bash |
| 142 | git -C linux remote update |
| 143 | }}} |
| 144 | |
| 145 | |
| 146 | ==== Using the latest version |
| 147 | The {{{repo}}} tool is updated frequently. While it is rarely necessary to have the latest version it will inform you if there is an update and how to install that update in the current working directory: |
| 148 | {{{#!bash |
| 149 | $ repo sync |
| 150 | |
| 151 | ... A new version of repo (2.17) is available. |
| 152 | ... You should upgrade soon: |
| 153 | cp /usr/src/venice/bsp/.repo/repo/repo /home/user/bin/repo |
| 154 | ... |
| 155 | }}} |
| 156 | |
| 157 | To update the {{{repo}}} tool just copy the file as mentioned above: |
| 158 | {{{#!bash |
| 159 | cp .repo/repo/repo $HOME/bin/repo |
| 160 | }}} |
| 161 | |
| 162 | |
| 163 | |