On 08/02/2015 09:08 AM, David Sauer wrote: > Package: java-package > Version: 0.56 > Severity: normal > > Dear Maintainers, > > I have a problem with make-jpkg. I've tracked the issue into function > > diskusage() { > local path="$1" > read size dummy < <( du -sm "$path" ) > echo "$size:$dummy" >&2 > echo "$size" > } > > which tests size of unpacked java distribution. > > The issue is related to OpenVZ guest (and probably doesn't exists on bare hw) > - `du` tests for disk size of a directory $path, but data have not been > written to the disk > at a time of the `du` (`du` returns very small number, nearly 0). > > I haved temporarily fixed the problem with a sleep: > > diskusage() { > local path="$1" > sleep 10 # <------------------------------------ inserted sleep > read size dummy < <( du -sm "$path" ) > echo "$size:$dummy" >&2 > echo "$size" > } > > but this is a bit dirty solution (it simply waits some time to finish > write-to-disk operation physically) > by host container.
Hi David, Instead of an arbitrary sleep, could you try using "sync" to flush current buffers. It seems like the container should respect that, and it could be a solution that could work in general. Cheers, tony
signature.asc
Description: OpenPGP digital signature
__ This is the maintainer address of Debian's Java team <http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. Please use debian-j...@lists.debian.org for discussions and questions.