@@ -301,20 +301,28 @@ function evaluate_test(config::Configuration, pkg::Package; use_cache::Bool=true
301
301
# we create our own workdir so that we can reuse it
302
302
workdir = mktempdir (prefix= " pkgeval_$(pkg. name) _" )
303
303
304
- # caches are mutable, so they can get corrupted during a run. that's why it's possible
305
- # to run without them (in case of a retry), and is also why we set them up here rather
306
- # than in `sandboxed_julia` (because we know we've verified caches before entering here)
304
+ local_depot_path = joinpath (config. home, " .julia" )
305
+ local_depot = joinpath (workdir, " depot" )
306
+ mkdir (local_depot)
307
+ mounts[local_depot_path * " :rw" ] = local_depot
308
+
309
+ # shared files are mounted using a layered depot
307
310
if use_cache
308
- depot_dir = joinpath (config . home, " . julia" )
311
+ shared_depot_path = " /usr/local/share/ julia"
309
312
310
313
shared_compilecache = get_compilecache (config)
311
- mounts[joinpath (depot_dir , " compiled" )] = shared_compilecache
314
+ mounts[joinpath (shared_depot_path , " compiled" ) * " :ro " ] = shared_compilecache
312
315
313
316
shared_packages = joinpath (storage_dir, " packages" )
314
- mounts[joinpath (depot_dir , " packages" )] = shared_packages
317
+ mounts[joinpath (shared_depot_path , " packages" ) * " :ro " ] = shared_packages
315
318
316
319
shared_artifacts = joinpath (storage_dir, " artifacts" )
317
- mounts[joinpath (depot_dir, " artifacts" )] = shared_artifacts
320
+ mounts[joinpath (shared_depot_path, " artifacts" ) * " :ro" ] = shared_artifacts
321
+
322
+ # XXX : we also need to append the bundled depot path (JuliaLang/julia#51448)
323
+ bundled_depot_path = joinpath (config. julia_install_dir, " share" , " julia" )
324
+ env[" JULIA_DEPOT_PATH" ] =
325
+ join ([local_depot_path, shared_depot_path, bundled_depot_path], " :" )
318
326
end
319
327
320
328
# structured output will be written to the /output directory. this is to avoid having to
@@ -487,10 +495,9 @@ function evaluate_test(config::Configuration, pkg::Package; use_cache::Bool=true
487
495
488
496
# (cache and) clean-up output created by this package
489
497
if use_cache
490
- depot_dir = joinpath (workdir, " upper" , " home" , " pkgeval" , " .julia" )
491
- local_compilecache = joinpath (depot_dir, " compiled" )
492
- local_packages = joinpath (depot_dir, " packages" )
493
- local_artifacts = joinpath (depot_dir, " artifacts" )
498
+ local_compilecache = joinpath (local_depot, " compiled" )
499
+ local_packages = joinpath (local_depot, " packages" )
500
+ local_artifacts = joinpath (local_depot, " artifacts" )
494
501
495
502
# verify local resources
496
503
registry_dir = get_registry (config)
@@ -507,8 +514,7 @@ function evaluate_test(config::Configuration, pkg::Package; use_cache::Bool=true
507
514
(local_artifacts, shared_artifacts),
508
515
(local_compilecache, shared_compilecache)]
509
516
if isdir (src)
510
- # NOTE: removals (whiteouts) are represented as char devices
511
- run (` $(rsync ()) --no-specials --no-devices --archive --quiet $(src) / $(dst) /` )
517
+ run (` $(rsync ()) --archive --quiet $(src) / $(dst) /` )
512
518
end
513
519
end
514
520
end
0 commit comments