Add newline after CROS_WORKON_COMMIT="" line.

Currently, cros_mark_as_stable.py does not add a newline after its
CROS_WORKON_COMMIT="" line. This works fine for 9999 ebuilds that have a newline
after the EAPI="" line, but doesn't work for ebuilds that don't do this.

This should fix the preflight queue build.

TEST=Ran cros_mark_as_stable.py on the update engine and verified that the
     CROS_WORKON_COMMIT="" line was not joined together with the next line.
BUG=none

Review URL: http://codereview.chromium.org/3036029
This commit is contained in:
David James 2010-07-30 10:58:40 -07:00
parent 4a046b6ccb
commit 265588e4f4

View File

@ -282,7 +282,7 @@ class EBuildStableMarker(object):
elif line.startswith('EAPI'): elif line.startswith('EAPI'):
# Always add new commit_id after EAPI definition. # Always add new commit_id after EAPI definition.
redirect_file.write(line) redirect_file.write(line)
redirect_file.write('CROS_WORKON_COMMIT="%s"' % commit_id) redirect_file.write('CROS_WORKON_COMMIT="%s"\n' % commit_id)
elif not line.startswith('CROS_WORKON_COMMIT'): elif not line.startswith('CROS_WORKON_COMMIT'):
# Skip old CROS_WORKON_COMMIT definition. # Skip old CROS_WORKON_COMMIT definition.
redirect_file.write(line) redirect_file.write(line)