SNAFU in Installer.app/Documentation/PackageMaker with Disk Space requirement?
SNAFU in Installer.app/Documentation/PackageMaker with Disk Space requirement?
- Subject: SNAFU in Installer.app/Documentation/PackageMaker with Disk Space requirement?
- From: Iceberg-Dev <email@hidden>
- Date: Sat, 11 Oct 2008 02:20:30 +0200
I've started playing a lot with Javascript in Installer.app recently
and like the economy, I'm depressed:
According to the "Installer JavaScript Reference" documentation :
----------8<----------8<----------8<----------8<----------
my.target.availableKilobytes :
Available space in the installation volume, in kilobytes.
----------8<----------8<----------8<----------8<----------
o If you play a bit with PackageMaker 3, you discover that the script
generated by PackageMaker for Available Space on Target are incorrect
because it uses a size in bytes. (Bug #6252974)
o If you play with PackageMaker 2, it correctly uses a size in KB for
its scripts.
o If you then do some tests with Installer.app, you discover that the
value returned by my.target.availableKilobytes is a size in bytes!!!!!!!
I've run the test on both Tiger and Leopard.
Example:
According to the Finder, available space on volume Leopard is 132.46 GB
If you write a volume-check script like this:
function checkFunction()
{
system.log(my.target.mountpoint+'');
system.log(my.target.availableKilobytes+'');
return true;
}
You get:
Oct 11 01:24:47 Selene : JS: /Volumes/Leopard
Oct 11 01:24:47 Selene : JS: 142232379392
That's a size in Bytes, not in KiloBytes.
As far as I can tell:
1. A bug was introduced in Installer.app on Tiger regarding the value
returned by this property.
2. This bug has never been fixed in Tiger and then, for compatibility
reason, we inherited this bug in Leopard.
3. The documentation has not been updated to address this situation
(the date is still 07/23/2007) and warn that 'kilobytes' can mean
'bytes'.
4. PackageMaker 2 generates correct disk space requirements that do
not work.
5. PackageMaker 3 generates incorrect disk space requirements that work.
SNAFU
or I'm just having conversion issue at 1 AM...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden