[Pythonmac-SIG] buildpkg.py

Dinu Gherman gherman@darwin.in-berlin.de
Thu, 12 Sep 2002 16:45:45 +0200


Dan Grassi:

> The "InstallationCheck" is mentioned in some 10.0.x Apple docs and I 
> now have 10.2 installed so that will not be easy.  It was not easy to 
> find back a year ago.  It is a good place to pre-flight, I use it to 
> verify minimum requirements such as available disk space, RAM and OS 
> version allowing an early exit if minimums are not met.

You mean it's one more script, then? If so, the current version of
buildpkg does not care. You can use it to add a resource like this
to the package and that's it. It gives you no support yet for gene-
rating such scripts.

> Also:
> preflight Is a combo of <pkg>.pre_install and <pkg>.pre_upgrade
> postflight Is a combo of <pkg>.post_install and  <pkg>.post_upgrade
> postinstall
> preinstall

I'm not sure I get that. Aren't all these just optional scripts in
the Contents/Resources folder? What do you mean by "combo"?

> The first three are used in the 10.2 Info.plist in DevTools.pkg and I 
> suspect that the last is also still supported, these are in various 
> Apple  pre 10.2 docs.  These are handy because they work for both 
> install and upgrade.
>
> The "rootVolumeOnly" is not documented in 10.0.x of 10.1.x but is used 
> by Apple in their pre-10.2 developer tools installers.  In the 10.2 
> installer it is mentioned but that installer uses XML 
> (IFPkgFlagRootVolumeOnly) and it currently does work in the 10.2 
> format, see 10.2 Info.plist in DevTools.pkg.  "rootVolumeOnly" does 
> work on 10.2 in the pre-10.2 format.

Sorry, but I'm confused again. I'm not aware of any new (XML?) format
in the 10.2 installer. Could you give an example of a publically avail-
able package using it? Or a pointer to a document describing it?

>> BTW, it is perfectly possible to use Python for the pre/post instal-
>> lation/upgrade scripts run by Installer.app. They just must not have
>> a .py extension! Apple seems to use Perl scripts sometimes, like in
>> iCal.pkg/Contents/Resources/InstallationCheck .
>
> But that pre-supposes that Python is already installed, something that 
> is only guaranteed on 10.2 and forward and the installer package you 
> wrote generates pre-10.2 format. :-)

Again, I have no evidence for the packages created by buildpkg to be
not accepted by the 10.2 installer. And, of course you need Python
to execute installation scripts in Python. But I guess people will
not only want to install Python itself as a package, but also other
software.

AFAICT there is not much (read: any) information within such packages
to describe dependancies on other packages. I heard, though, that
folks from osxgnu.org are working on an extended version of the
package format and their own free installer.

Regards,

Dinu

--
Dinu C. Gherman
......................................................................
"The first principle is that you must not fool yourself - and you are
the easiest person to fool." (Richard Feynman)