vijji123
Pilgrim

is there any way to calculate dissk space in pre-install phase

Hi,

Is there any way to calculate disk space requirements in the pre-install phase.

I think we have two variables $REQUIRED_DISK_SPACE_BYTES$ and $FREE_DISK_SPACE_BYTES$ which are available during install phase,but i want these two values prior to install phase i.e during pre-install phase.

Please help me out.

Thanks,
vijji123
Labels (1)
0 Kudos
4 Replies
emptyhell
Pilgrim

Re: is there any way to calculate dissk space in pre-install phase

Use custom action with code like
InstallerResources resource = (InstallerResources) proxy.getService(InstallerResources.class);
long spaceRequired = resource.getRequiredDiskSpace()

But it works not precisely, especially when you have 3rd party jars included as dependency for custom code - it doesn't calculate them
0 Kudos
vijji123
Pilgrim

is there any way to calculate dissk space in pre-install phase

Thanks, for u r reply.
0 Kudos
wangnijie860304
Pilgrim

Re: is there any way to calculate dissk space in pre-install phase

I meeting the same problem, and I can't get correct return value of getAvailableDiskSpace(), it only happened on NFS disk, not local disk.

InstallerResources resource = (InstallerResources)ip.getService(InstallerResources.class);
long spaceAvailable = resource.getAvailableDiskSpace(); //return -1


Does anyone know why? Or Is there any other way to get available disk space during pre-installing phase?
0 Kudos
mionse
Pilgrim

Re: is there any way to calculate dissk space in pre-install phase

wangnijie860304, I also wonder about it ..
0 Kudos