New issue
Advanced search Search tips

Issue 903435 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Consider changing how CIPD handles relative symlink during package creation

Project Member Reported by vadimsh@chromium.org, Nov 8

Issue description

Right now when packaging a relative symlink that points somewhere outside of the package root CIPD complains "Error: Invalid symlink <path>: a relative symlink pointing to a file outside of the package root."

Maybe we should transparently just put the symlink target into the package in this case?

This happens when repackaging files already deployed by CIPD (using 'symlink' method), perhaps into a .cipd dir that are multiple level above, e.g.

$ cipd create --pkg-def cipd.yaml -tag version:4.0-cr0
...
Error: Invalid symlink lib/android-all-4.3_r2-robolectric-0.jar: a relative symlink pointing to a file outside of the package root.

$ ls clankium/src/third_party/robolectric/lib/ I get
...
android-all-4.3_r2-robolectric-0.jar -> ../../../../.cipd/pkgs/49/_current/lib/android-all-4.3_r2-robolectric-0.jar
...
 
If we do this, I would recommend doing it as an option in the yaml and/or CLI (i.e. 'follow_relative_symlinks').

This would probably be the less-surprising behavior.
(though this also sounds like the cipd packages are being made by hand by drag+dropping files into the existing unpacked cipd package, which seems like probably not a great thing to encourage... they should probably be built with an actual builder, no?)

Sign in to add a comment