New issue
Advanced search Search tips

Issue 847333 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

autotest quickmerge may not sync files that were modified before running emerge / cros_workon

Project Member Reported by niwa@chromium.org, May 29 2018

Issue description

During autotest quickmerge process, files are synced by rsync command with -u option like this.

rsync -n -a --no-p '--chmod=ugo=rwX' -u -i '--exclude=**.pyc' '--exclude=**.pyo' '--exclude=** -> *' '--include-from=/mnt/host/source/chromite/scripts/autotest-quickmerge-includepatterns' '--exclude=*' -L /mnt/host/source/src/third_party/autotest/files/ /build/kevin-arcnext/usr/local/build/autotest/

Today I encountered a problem where a file I modified never got synced during quickmerge, and it turned out this file got excluded by rsync's -u option because the one in the sync target dir (/build/...) has a newer timestamp than the one in the source dir (/mnt/host/source/...)

This can happen if you modify a file before running build_packages / emerge / cros_workon.

1) modify file A to A'
2) Run build_packages / emerge
3) Run cros_workon on the package that contains A
4) Run test_that 

Expected : modified file A' should be sync'ed by quickmerge
Actual : file A' doesn't get sync'ed because the sync target file in /build/... has a newer timestamp (created in step 2) than the source file (modified in step 1)
 

Comment 1 by nya@chromium.org, May 29 2018

Cc: akes...@chromium.org
Owner: akes...@chromium.org
Status: Assigned (was: Untriaged)
+akeshet who first wrote autotest-quickmerge 5 years ago

Thanks niwa-san for finding this issue.

IIUC rsync skips copying files when size and mtime matches by default. Can we use the default behavior, or is it intentional that -u is used?

Status: WontFix (was: Assigned)
This is WAI. Files that were touched or modified in the board sysroot by build_packages are considered to be "more correct" than any older files in the source tree. This can lead to some unexpected behavior if you are not cros_workon'ing all of the packages that correspond to source code you are modifying. I believe if you had swapped steps 2 and 3 in your description, you would have gotten the results you expected.

Closing bug unless you have other questions in which case please reopen.


Sign in to add a comment