• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Duplicate package installation when using productbuild
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Duplicate package installation when using productbuild


  • Subject: Duplicate package installation when using productbuild
  • From: Tanguy RAHUEL <email@hidden>
  • Date: Tue, 20 Aug 2013 19:35:15 +0200

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=(
    "PKLeopardPackage <file://localhost/tmp/myInstaller.mpkg#Calculator.pkg>",
    "PKLeopardPackage <file://localhost/tmp/myInstaller.mpkg#Calculator.pkg>",
    "PKLeopardPackage <file://localhost/tmp/myInstaller.mpkg#TextEdit.pkg>",
    "PKLeopardPackage <file://localhost/tmp/myInstaller.mpkg#TextEdit.pkg>"


Has anyone crossed this already ? How can i avoid duplicate packages at the installation time ?

Thanks in advance,

Tanguy RAHUEL
 _______________________________________________
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

  • Prev by Date: Re: Protected package
  • Next by Date: Re: Duplicate package installation when using productbuild
  • Previous by thread: Re: Protected package
  • Next by thread: Re: Duplicate package installation when using productbuild
  • Index(es):
    • Date
    • Thread