gorgeous-winter-99296
10/09/2022, 5:57 PM/tmp/sandbox/image/fs
there'll be symlinks that are relative to that fs root, like this: /tmp/sandbox/image/fs/lib/foo.2.3 -> /lib/foo.2
. Trying to output this from a process makes Pants understandably barf.
Error expanding output globs: Failed to read link "/tmp/pants-sandbox-Qipcu3/unpacked_image/rootfs/lib64/ld-linux-x86-64.so.2": Absolute symlink: "/lib/x86_64-linux-gnu/ld-2.31.so"
Optimally unpack + run would be a single step; but I can't see how I can use Process
to achieve that without writing scripts.happy-kitchen-89482
10/09/2022, 6:10 PMhappy-kitchen-89482
10/09/2022, 6:10 PMfast-nail-55400
10/09/2022, 6:40 PMsetup_go_sdk_process
and the Coursier jar resolution rulesgorgeous-winter-99296
10/09/2022, 6:41 PMfast-nail-55400
10/09/2022, 6:42 PMgorgeous-winter-99296
10/09/2022, 6:43 PMgorgeous-winter-99296
10/09/2022, 6:44 PMfast-nail-55400
10/09/2022, 6:49 PMDigest
into the Pants cache?fast-nail-55400
10/09/2022, 6:51 PMoutput_directories
or output_files
on Process
gorgeous-winter-99296
10/09/2022, 6:52 PMfast-nail-55400
10/09/2022, 6:52 PMfast-nail-55400
10/09/2022, 6:52 PMfast-nail-55400
10/09/2022, 6:53 PMfast-nail-55400
10/09/2022, 6:54 PMfast-nail-55400
10/09/2022, 6:54 PMDigest
later it'll just be as filesgorgeous-winter-99296
10/09/2022, 6:56 PMgorgeous-winter-99296
10/09/2022, 6:58 PMfast-nail-55400
10/09/2022, 7:13 PMProcess
tries to capture them as an output.fast-nail-55400
10/09/2022, 7:14 PMProcess
.fast-nail-55400
10/09/2022, 7:16 PMPants will just refuse to capture symlinks currently.Or for valid symlinks only, read through to the destination file and capture that content instead.
fast-nail-55400
10/09/2022, 7:18 PMgorgeous-winter-99296
10/09/2022, 7:18 PMwhen unpacking Pants ends up writing them as normal files
was that a captured symlink would be replaced with its content. But if you mean it'll be written back to disk as a regular file but flagged as a symlink, then that sounds like what I want. 🙂 Just need to make it work for absolute links.
OTOH (and this'll be problematic for image builds too) - it isn't unfeasible that we'll have some massive trees generated from this. The largest container build I run at work today comes out to a total of 9GB, squashed, cleansed, purged and compressed.fast-nail-55400
10/09/2022, 7:21 PMgorgeous-winter-99296
10/09/2022, 7:27 PMgorgeous-winter-99296
10/09/2022, 7:30 PMhappy-kitchen-89482
10/10/2022, 5:43 AMhappy-kitchen-89482
10/10/2022, 5:43 AMgorgeous-winter-99296
10/10/2022, 7:57 AM