Re: Convert a pkg installer to a flat package installer?
Re: Convert a pkg installer to a flat package installer?
- Subject: Re: Convert a pkg installer to a flat package installer?
- From: Iceberg-Dev <email@hidden>
- Date: Sun, 14 Feb 2010 23:32:22 +0100
On Feb 13, 2010, at 2:29 AM, Don Montalvo wrote:
Is it possible to convert a standard pkg installer > flat pkg
installer?
I'm looking through Apple's (and of course Sudre's) documentation
but don't see any way to do this.
There is no bijection between Flat and bundle packages.
AFAIK, you can convert a flat package (that does not use undocumented
options) to a bundle package but the opposite is not true. A bundle
package contains properties that are available only in distribution
script (such as the root volume only flag). Also a bundle package can
contain VolumeCheck, InstallationCheck, preinstall, postinstall,
preupdate, postupdate, preflight and postflight scripts whereas a
flat package can only contain preinstall and postinstall scripts (the
equivalent of the pre/post flight scripts).
I don't know of any tool that converts a bundle package to a flat
package (and if such things existed it would not work in all cases as
seen above).
That being said, it is possible to manually convert a bundle package
to flat package by taking into account the above considerations.
Let's say you have a bundle package A.pkg that you want to converts
to a flat package B.pkg.
A.pkg contents look like this:
A.pkg --+-- Contents --+-- Archive.bom
|
+-- Archive.pax.gz
|
+-- Info.plist
|
+-- PkgInfo
|
+-- Resources --+-- BundleVersions.plist
|
+-- preflight
|
+-- postupdate
B.pkg "contents" will look like this:
A.pkg --+-- Bom
|
+-- PackageInfo
|
+-- Payload
|
+-- Scripts
Here is the mapping between the two:
Archive.bom ---- Rename -----> Bom
Archive.pax.gz ---- Rename -----> Payload
Info.plist + BundleVersions.plist ---- Transform --> PackageInfo
preflight + postflight ---- Archive as pax ---> Scripts
post/preinstall + pre/postupdate + VolumeCheck + InstallationCheck
--- Obsoleted ---> Nowhere
Once you have the virtual hierarchy for the flat package, you can
flatten it with the xar tool.
_______________________________________________
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