New issue
Advanced search Search tips

Issue 659245 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

zip_build.py doesn't appear to support symlinks

Project Member Reported by jbudorick@chromium.org, Oct 25 2016

Issue description

Several android build products built with the host toolchain are symlinked in the top-level build directory (e.g. out/Debug/md5sum_bin_host will be a symlink to out/Debug/clang_x64/md5sum_bin). zip_build.py doesn't maintain these symlinks, which can cause problems on component builds.

Starting with I>C>A since symlinked build products are mostly used in Android builds.
 

Comment 1 by stip@chromium.org, Oct 27 2016

When you say it doesn't maintain them, do you mean it flattens them out? Or do you mean it doesn't have them at all?
I think the former?

In the above example in which out/Debug/md5sum_bin_host is a symlink to out/Debug/clang_x64/md5sum_bin on the builder, it'd wind up instead being a copy of the binary on the tester.
Owner: bpastene@chromium.org
Status: Assigned (was: Untriaged)
Can you link to builder that doesn't get symlinks into its resulting zip? Some quick local testing indicates that the vanilla zip command appropriately packs the targets of symlinks into the archive. We must be doing something quirky.
Here's the builder that seems to be giving us issues: https://build.chromium.org/p/chromium.fyi/builders/Android%20Builder%20%28dbg%29?numbuilds=200

And the associated test builder having issues when trying to run the component build: https://build.chromium.org/p/chromium.fyi/builders/Android%20VR%20Tests?numbuilds=200
Thanks for the links. I see what's going on now. On zipping, the symlink gets replaced by the file it points to. This can cause problems when it has run time dependencies on libraries it expects to be nearby. (The failure on the VR bot is due to the library being there but of the device's arch, not the host's)

I can confirm that simply passing the '--symlinks' arg to zip keeps the symlink, which can then be used to checksum files on the host from the host. I'm weary of adding that option however, since it seems fairly intuitive to me that it would simply replace the symlink at zip-time. And since a lot of bots use zip_build.py to transfer their binaries/tests, I'm also weary of breaking any bots out there that depend on the current behavior.

I wonder why this doesn't show up anywhere else. FWIU, all of our android tester bots get a host and device md5sum binary shipped to them.
(Doesn't devil's dependency system pin a bunch of host/device binaries, md5sum included, and fetch them from gs?)
Components: Infra>Client>Chrome
Labels: OS-Android
Moving Infra>Client>Android -> Infra>Client>Chrome+OS=Android
Components: -Infra>Client>Android

Sign in to add a comment