OS X Mavericks doesn't install flat packages

495 Views Asked by At

I have Mavericks 10.9.4. I created a flat package using pkgbuild and productbuild and tried to install it. Everything goes fine, the UI says that the package is installed successfully, logs doesn't show any errors. Except, the package is not installed. I searched for the files, and they are not found anywhere in the system, so it's a problem with specifying location. Disabling Gatakeeper doesn't help. Using installer in command line doesn't install the package and doesn't show any problems either.

Also, "pkgbuild --analyze " produces an empty property list.

I downloaded MacPorts package (.pkg) from the internet and tried to install it, same thing.

I have no problem installing bundle-stype packages.

1

There are 1 best solutions below

0
On

Today I ran onto the same problem when testing the installation of several flat packages that I pkgbuilded: The content of /Library /System and /usr were correctly installed, but nothing was in /Applications !!!

Thanks to one working package I figured out that I have to specify an "empty" component.plist for making sure that the installer works correctly ...


Here are the component.plist generated with pkgbuild --analyze

Working package :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <array/>
</plist>

NON working packages :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <array>
     <dict>
        <key>BundleHasStrictIdentifier</key>
        <true/>
        <key>BundleIsRelocatable</key>
        <true/>
        <key>BundleIsVersionChecked</key>
        <true/>
        <key>BundleOverwriteAction</key>
        <string>upgrade</string>
        <key>RootRelativeBundlePath</key>
        <string>Applications/MyApp.app</string>
    </dict>
  </array>
</plist>

Specifying the working component.plist with --component-plist when pkgbuilding the components did the trick: now all the .pkg work correctly