Bug#794401: java-package: runnning make-jpkg reports "Invalid size (1 MB) of extracted archive."

tony mancill tmancill at debian.org
Mon Aug 3 00:19:35 UTC 2015


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20150802/dc488f71/attachment-0001.sig>


More information about the pkg-java-maintainers mailing list