Using the disk size can lead to errors, as it seems like it takes some time for it to be the real file size (at least when using ZFS). As an example, here is the size of mfsroot.gz just after it's created and then after 1s: 28705 /root/mfsbsd/tmp/disk/mfsroot.gz sleep 1; 31401 /root/mfsbsd/tmp/disk/mfsroot.gz In order to solve this, use the apparent size instead of the disk size.
pkg add fails on packages that don't have dependencies met. Say you have these packages: A, depends on nothing B, depends on nothing C, depends on B D, depends on E E, depends on nothing The current process involves going ASCIIbetically and pkg add'ing them one by one. In this case, A, B, C, and E would be installed. D would not install because E was not already installed. By putting them all on the line as arguments, they can be installed more reliably via pkgng's logic. Furthermore, should pkgng fail to resolve the dependencies when given all as arguments, it will attempt to install it anyways because -M is passed.