[pca] Patches to Big for /tmp
Martin Paul
martin at par.univie.ac.at
Tue May 13 12:48:54 CEST 2008
Jan Holzhueter wrote:
> I just noticed when you install a Patch that is in size to big for
> unpacking (e.g. 120186-15 which inflates to 680M, but I only have 512M
> in /tmp) in /tmp pca (unzip) hangs.
Does unzip really hang? I assumed it would stop with some message like
"no space left on device". pca would then remove the partly installed
patch, show a message and continue with the next one.
> This should be checked I guess.
You're right, but AFAIK this would involve two ugly hacks:
To get the (uncompressed) size of the patch zip file, I'd have to parse
output of "unzip -l" or "zipinfo -t". A format change in the zip tools
would break this. I'm sure there's some Zip::* module, but it doesn't
come with perl and I don't want to force pca users to install perl
modules. And, of course a different (ugly) solution would be needed for
tar/tar.Z patches (old, I know, but pca still supports these).
To get the amount of free space, either a non-default perl module
(Df::*) would be needed, or again I'd have to parse output of a system
command (df). I don't like neither.
That's what kept me from implementing such a check in the past.
Martin.
More information about the pca
mailing list