What does the Distribution.xml file look like before you call productbuild --distribution …? What does the final distribution file looks like in Installer.mpkg? (You can use Pacifist to check this)? On Tue, Dec 9, 2014 at 3:53 PM, Rajeev Kumar <rajeevkumar235813@gmail.com> wrote:
Hi,
I have created a sample "MyApp.app" and I am creating the Installer for it.
Case 1: Creating Installer.pkg [myapp folder contains MyApp.pkg]
$pkgbuild --analyze --root myapp myApp.plist
$pkgbuild --root myapp --component-plist myApp.plist --identifier "com.mycompany.myapp.pkg" --install-location "/Applications/" MyApp.pkg
$productbuild --synthesize --package MyApp.pkg Distribution.xml
$productbuild --distribution Distribution.xml --package-path . Installer.pkg
If I install Installer.pkg, I get following in the /var/log/install.log
Dec 9 20:11:33 RAJEKUMAR-MBP.local Installer[22102]: InstallerStatusNotifications plugin loaded
Dec 9 20:11:34 RAJEKUMAR-MBP.local Installer[22102]: ================================================================================
Dec 9 20:11:34 RAJEKUMAR-MBP.local Installer[22102]: User picked Standard Install
Dec 9 20:11:34 RAJEKUMAR-MBP.local Installer[22102]: Choices selected for installation:
Dec 9 20:11:34 RAJEKUMAR-MBP.local Installer[22102]: Upgrade: ""
Dec 9 20:11:34 RAJEKUMAR-MBP.local Installer[22102]: Upgrade: "(null)"
Dec 9 20:11:34 RAJEKUMAR-MBP.local Installer[22102]: Installer.pkg#MyApp.pkg : com.mycompany.myapp.pkg : 0
Dec 9 20:11:34 RAJEKUMAR-MBP.local Installer[22102]: ================================================================================
Dec 9 20:11:40 RAJEKUMAR-MBP.local installd[557]: PackageKit: ----- Begin install -----
Dec 9 20:11:40 RAJEKUMAR-MBP.local installd[557]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
Dec 9 20:11:40 RAJEKUMAR-MBP.local installd[557]: PackageKit: packages=(
"PKLeopardPackage <file://localhost/Users/rajekumar/Library/Developer/Xcode/DerivedData/MyApp-excgqrqzmxujpyfruiyzersgsjlq/Build/Products/Debug/Installer.pkg#MyApp.pkg>"
)
Full Log : http://pastebin.com/ZhxhdzST
Case 2: Creating Installer.mpkg [myapp folder contains MyApp.pkg]
$pkgbuild --analyze --root myapp myApp.plist
$pkgbuild --root myapp --component-plist myApp.plist --identifier "com.mycompany.myapp.pkg" --install-location "/Applications/" MyApp.pkg
$productbuild --synthesize --package MyApp.pkg Distribution.xml
$productbuild --distribution Distribution.xml --package-path . Installer.mpkg
If I install Installer.mpkg , I get following in the /var/log/install.log
Dec 9 20:15:44 RAJEKUMAR-MBP.local Installer[22132]: InstallerStatusNotifications plugin loaded
Dec 9 20:15:45 RAJEKUMAR-MBP.local Installer[22132]: ================================================================================
Dec 9 20:15:45 RAJEKUMAR-MBP.local Installer[22132]: User picked Standard Install
Dec 9 20:15:45 RAJEKUMAR-MBP.local Installer[22132]: Choices selected for installation:
Dec 9 20:15:45 RAJEKUMAR-MBP.local Installer[22132]: Upgrade: ""
Dec 9 20:15:45 RAJEKUMAR-MBP.local Installer[22132]: Upgrade: "(null)"
Dec 9 20:15:45 RAJEKUMAR-MBP.local Installer[22132]: Installer.mpkg#MyApp.pkg : com.mycompany.myapp.pkg : 0
Dec 9 20:15:45 RAJEKUMAR-MBP.local Installer[22132]: ================================================================================
Dec 9 20:15:50 RAJEKUMAR-MBP.local installd[557]: PackageKit: ----- Begin install -----
Dec 9 20:15:50 RAJEKUMAR-MBP.local installd[557]: PackageKit: request=PKInstallRequest <2 packages, destination=/>
Dec 9 20:15:50 RAJEKUMAR-MBP.local installd[557]: PackageKit: packages=(
"PKLeopardPackage <file://localhost/Users/rajekumar/Library/Developer/Xcode/DerivedData/MyApp-excgqrqzmxujpyfruiyzersgsjlq/Build/Products/Debug/Installer.mpkg#MyApp.pkg>",
"PKLeopardPackage <file://localhost/Users/rajekumar/Library/Developer/Xcode/DerivedData/MyApp-excgqrqzmxujpyfruiyzersgsjlq/Build/Products/Debug/Installer.mpkg#MyApp.pkg>"
)
Full Log : http://pastebin.com/isNBNW6H
As you can see when I am installing the Installer.mpkg the MyApp.pkg is getting installed twice. If there are some pre/post install script associated to it , then they are also executing twice. [In this run I have removed the scripts to keep things simple]
I am not able to understand this behavior .
Any help would be appreciated.
Rajeev
_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/installer-dev/dev.iceberg%40gmail.co...
This email sent to dev.iceberg@gmail.com
-- Packaging Resources - http://s.sudre.free.fr/Packaging.html _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com