mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
make-disk-image.nix: Handle cptofs error explicitly
Because the copy process inside the VM does not reliably give "No space" error message leaving the user wondering what went wrong: unable to create directory /mnt/0000fe01///nix/store/yknzxx7w2ck9p30k81gpi5yfjlrq41lr-libsecret-0.18.7/share/locale/ro: Success [ 5.462365] reboot: Restarting system error processing entry /build/root/nix/store/yknzxx7w2ck9p30k81gpi5yfjlrq41lr-libsecret-0.18.7/share/locale/ro, aborting error processing entry /build/root/nix/store/yknzxx7w2ck9p30k81gpi5yfjlrq41lr-libsecret-0.18.7/share/locale, aborting error processing entry /build/root/nix/store/yknzxx7w2ck9p30k81gpi5yfjlrq41lr-libsecret-0.18.7/share, aborting error processing entry /build/root/nix/store/yknzxx7w2ck9p30k81gpi5yfjlrq41lr-libsecret-0.18.7, aborting error processing entry /build/root/nix/store, aborting error processing entry /build/root/nix, aborting builder for '/nix/store/fsdvqxq92iai7f3w8wcsncgfwag7cj2l-libvirtd-ssh-image.drv' failed with exit code 228
This commit is contained in:
parent
c6c7850321
commit
f664823a1a
|
@ -185,7 +185,8 @@ let format' = format; in let
|
|||
--system ${config.system.build.toplevel} --channel ${channelSources} --substituters ""
|
||||
|
||||
echo "copying staging root to image..."
|
||||
cptofs -p ${optionalString (partitionTableType != "none") "-P ${rootPartition}"} -t ${fsType} -i $diskImage $root/* /
|
||||
cptofs -p ${optionalString (partitionTableType != "none") "-P ${rootPartition}"} -t ${fsType} -i $diskImage $root/* / ||
|
||||
(echo "ERROR: cptofs failed. diskSize might be too small for closure."; exit 1)
|
||||
'';
|
||||
in pkgs.vmTools.runInLinuxVM (
|
||||
pkgs.runCommand name
|
||||
|
|
Loading…
Reference in a new issue