SourceCodeRepositories » History » Version 5

« Previous - Version 5/16 (diff) - Next » - Current version
Joonas Kylmälä, 09/26/2018 09:02 PM
Add instructions how to add new repository

LineageOS Mirror

Initial setup

Initialize the repository and sync:

mkdir lineage_mirror
cd lineage_mirror
repo init -u -b LineageOS-mirror
repo sync


  1. Check the LineageOS manifest for newly added repos
  2. If there are any, add them in the LineageOS-mirror manifest and push the changes to
  3. If there are any, create the newly added repos in the LineageOS-mirror group (using the exact same names the repos have in LineageOS)
    sudo -iu git
    mkdir repositories/LineageOS-mirror/<repo-name>.git
    cd repositories/LineageOS-mirror/<repo-name>.git
    git --bare init
    touch git-daemon-export-ok
  4. Update the local mirror with repo sync
  5. If there are newly added repos, you need to manually push them the first time in order to create the branch on the remote:
    cd path/to/new/repo
    git push HEAD:refs/heads/cm-13.0

    Repeat these steps for all newly added repos.

  6. Push the updated branches to
    repo forall -c ' echo "Pushing $REPO_PROJECT"; git push$( echo $REPO_PROJECT | cut -c11- ).git HEAD:cm-13.0 '

    Check for errors during the push and fix them!



It's worth to check if all mirror repos have bundles in place.

CAF variants

If we ever add support for a device that uses CAF branches of Qualcomm repos, we need to figure out how the mirror can still be updated and how releases can be tagged.

CAF branches are in the same repos as the default branches. So two or more local repos are created for one remote repo when the default branch and the CAF branches are checked out. The current setup for tagging a new release and updating the mirror assumes that there is one local repo for one remote repo.