Re-apply "Fix the write_source_info after merge."

This reverts commit 4b0c1d0f.

Change-Id: I77c72d7d9c556618b46a69db78b75a6069b16416
7 jobs for !8 with patch-215912 in 145 minutes and 15 seconds (queued for 3 seconds)
latest detached
Status Job ID Name Coverage
  Build Stage1
passed #86201
build-firmware

00:03:52

 
  Build Stage2
passed #86203
build-android-nano

01:04:10

passed #86202
build-android-swr

01:12:26

 
  Generate Test
passed #86204
generate-test

00:00:43

 
  Test
passed test

failed #86206
arm64
test-tuxsuite-android-swr-boottest

01:08:55

 
  Publish Artifacts
passed #86207
publish_artifacts

00:01:25

 
Name Stage Failure
failed
test-tuxsuite-android-swr-boottest Test
real	68m29.170s
user 0m4.607s
sys 0m0.520s
Uploading artifacts for failed job
Uploading artifacts...
*.xml: found 2 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=86206 responseStatus=201 Created token=pQaETyQ_
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1