Inside repo's manifest xml file, beside source code checkout, each project could perform additional actions like <linkfile> and <copyfile>. The extra files created by <linkfile> and <copyfile> will not be undone when repo sync with manifest without those tags. This may result in build break.
ChromeOS only uses <copyfile> for AUTHORS and LICENSE file and these files exist for all versions, no problem.
Android started to use <linkfile> to symlink build rules for some projects recently. For example, ag/4907502 added entries like
<project path="vendor/xxx/oooo/proprietary/common" name="platform/vendor/xxx/oooo/proprietary/common" groups="vendor,xxx">
<linkfile src="prop_pickup.mk" dest="vendor/xxx/oooo/Android.mk" />
<linkfile src="prop_pickup.bp" dest="vendor/xxx/oooo/Android.bp" />
</project>
In other words, repo sync to code after 4907502, a symlink Android.bp is created, pointing to prop_pickup.bp in the new folder. If then repo sync back to code before 4907502, Android.bp still exists but prop_pickup.bp disappeared.
This results in dangling symlink problem. "lunch" will fail when it is trying to parse build rules.
FAILED: out/soong/.bootstrap/build.ninja
out/soong/.minibootstrap/minibp -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/.bootstrap/build.ninja.d -o out/soong/.bootstrap/build.ninja Android.bp
internal error: could not open symlink vendor/xxx/oooo/Android.bp; its target (proprietary/common/prop_pickup.bp) cannot be opened
internal error: could not open symlink hardware/xxx/oooo/Android.bp; its target (data/oooo/os_pickup.bp) cannot be opened
15:33:15 soong minibootstrap failed with: exit status 1
ninja: build stopped: subcommand failed.
Because we do repo sync back and forth during bisection, this problem blocks us bisecting Android P branch.
Fresh checkout the whole tree is too slow, we need lighter weight solution/workaround.
Comment 1 by bugdroid1@chromium.org
, Oct 4