pkgutil can't expand.

Originator:mixtabug
Number:rdar://12666797 Date Originated:08-Nov-2012 04:27 PM
Status:Closed Resolved:20-Mar-2013
Product:Mac OS X SDK Product Version:4.3.2
Classification:Other Bug Reproducible:
 
Summary: I'm trying to flatten an existing installer package so that I can sign it with my developer ID.  Because this is a metapackage with multiple flat packages inside, this requires first expanding the package as a whole before flattening.  However, pkgutil --expand fails in every circumstance I've tried, including with other .mpkg and .pkg structures.

Steps to Reproduce: Find any installer package (.mpkg or .pkg), and direct Terminal to its containing directory, then run `pkgutil --expand myPackage.pkg myPackage_expanded`.

Expected Results: golden silence

Actual Results: "Could not open package for expansion: myPackage.pkg"

Regression: Only this version of Xcode was used, but the problem was reproducible with every package tried.

Notes: Further configurations and alternatives, such as using older and newer versions of the Xcode tools and/or creating a build pipeline for this task in the Xcode IDE are currently being tested, but are costing time.

13-Nov-2012 03:17 PM:
This was originally tested on Mac OS 10.7.3 with Xcode 4.3.2, but has also been shown to fail on Mac OS 10.8 with Xcode 4.5.1.  Since Xcode is still suspect as the problem, and because Xcode 4 seems to be the cause of a great many other developer complaints, an earlier 3.x version is to be tried next before finally resorting to reproducing the build scripts within the IDE.

20-Mar-2013 10:43 AM:
Thanks very much for your feedback.

Engineering has determined that the behavior will not be changed based on the following information:

pkgutil only supports *flat* packages. It's not going to recurse into the mpkg and find and expand the flat ones. And anyway, the whole thing needs to be flat to satisfy Gatekeeper.

If you have questions regarding the resolution of this issue, please update your bug report with that information.

We are now closing this bug report.

Please be sure to regularly check new Apple releases for any updates that might affect this issue.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!