+39
−19
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
When repo init runs from inside the Android tree (which the kernel dir
is nested under), repo walks up and finds the Android .repo checkout,
reusing it instead of creating a new kernel checkout. Previous attempts
to fix this by copying .repo/repo or passing --repo-dir failed because
it is main.py itself (not the launcher) that walks up looking for a
valid .repo with manifests.git.
Fix by running the initial repo init from a temp dir outside the Android
tree where there is no parent .repo to find. The resulting .repo (with
a proper manifests.git) is then moved into the kernel dir. All internal
paths inside .repo are relative, so the move is safe.
On subsequent runs manifests.git already exists in the kernel dir, so
the regular repo init from inside the tree finds the kernel checkout
correctly without walking up.
Signed-off-by:
Jackeagle <jackeagle102@gmail.com>