Hi,
For project purposes, we changed our installer creation process to 'productbuild'. Our installer (Distribution style .mpkg) contains multiple packages (.pkg). When looking at the install.log file in the console utility, each of our packages is processed twice. This brings some odd behaviors when pre-install/post-install scripts are contained in some packages such as an application is started twice and so on.
To create our installer we use the following command line: productbuild --identifier "myinstaller" --version "1.2.3" --distribution "mydistribution.dist" --resources "myresources" --package-path "pathToAllPackages" "installer.mpkg" Our my distribution.dist file already exists and contains some information on the installer such as the license file, the background image ...
Using the following command lines, we can reproduce this behavior : # move to temp folder cd /tmp mkdir Packages
# Copy some known applications cp -r /Applications/Calculator.app Calculator.app cp -r /Applications/TextEdit.app TextEdit.app
# Build each packages pkgbuild --component Calculator.app/ Packages/Calculator.pkg pkgbuild --component TextEdit.app/ Packages/TextEdit.pkg
# Build distribution installer productbuild --synthesize --package Packages/Calculator.pkg --package Packages/TextEdit.pkg distribution.dist productbuild --identifier "myIdentifier" --version "1.0.0" --distribution distribution.dist --package-path Packages/ myInstaller.mpkg
# In the console utility / install.log : Two packages seen at the beginning ================================================================================ Installer[4367]: User picked Standard Install Installer[4367]: Choices selected for installation: Installer[4367]: Mise à jour: "" Mise à jour: "(null)" myInstaller.mpkg#Calculator.pkg : com.apple.calculator : 10.8.0 myInstaller.mpkg#TextEdit.pkg : com.apple.TextEdit : 1.8.0 Installer[4367]: ================================================================================
BUT a little further, we can see
installd[4378]: PackageKit: ----- Begin install ----- installd[4378]: PackageKit: request=PKInstallRequest <4 packages, destination=/> installd[4378]: PackageKit: packages=(
Has anyone crossed this already ? How can i avoid duplicate packages at the installation time ?
Thanks in advance,
Tanguy RAHUEL |