Preserve symlinks during store copy
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
mkdir -p "$CLAN_TEST_STORE/nix/store"
|
mkdir -p "$CLAN_TEST_STORE/nix/store"
|
||||||
mkdir -p "$CLAN_TEST_STORE/nix/var/nix/gcroots"
|
mkdir -p "$CLAN_TEST_STORE/nix/var/nix/gcroots"
|
||||||
if [[ -n "''${closureInfo-}" ]]; then
|
if [[ -n "''${closureInfo-}" ]]; then
|
||||||
${pkgs.findutils}/bin/xargs -P"$(nproc)" ${pkgs.coreutils}/bin/cp --recursive --reflink=auto --target-directory "$CLAN_TEST_STORE/nix/store" < "$closureInfo/store-paths"
|
${pkgs.findutils}/bin/xargs -r -P"$(nproc)" ${pkgs.coreutils}/bin/cp --recursive --no-dereference --reflink=auto --target-directory "$CLAN_TEST_STORE/nix/store" < "$closureInfo/store-paths"
|
||||||
${pkgs.nix}/bin/nix-store --load-db --store "$CLAN_TEST_STORE" < "$closureInfo/registration"
|
${pkgs.nix}/bin/nix-store --load-db --store "$CLAN_TEST_STORE" < "$closureInfo/registration"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -53,8 +53,10 @@ def setup_nix_in_nix(closure_info: str | None) -> None:
|
|||||||
subprocess.run( # noqa: S603
|
subprocess.run( # noqa: S603
|
||||||
[
|
[
|
||||||
XARGS_BIN,
|
XARGS_BIN,
|
||||||
|
"-r",
|
||||||
f"-P{num_cpus}", # Use all available CPUs
|
f"-P{num_cpus}", # Use all available CPUs
|
||||||
CP_BIN,
|
CP_BIN,
|
||||||
|
"--no-dereference",
|
||||||
"--recursive",
|
"--recursive",
|
||||||
"--reflink=auto", # Use copy-on-write if available
|
"--reflink=auto", # Use copy-on-write if available
|
||||||
"--target-directory",
|
"--target-directory",
|
||||||
|
|||||||
Reference in New Issue
Block a user