AFAIK, since the .pkg flat files are xar archive and a "Product archive" (i.e. a distribution) contains a Distribution file at the first level of the archives, you can just invoke: xar -t -f thisMysteriousThing.pkg and look for a Distribution file. e.g. #!/bin/sh isThereADistributionFile=`/usr/bin/xar -t -f "$1" | grep Distribution` if [ ! -z "$isThereADistributionFile" ]; then echo "It's a trap... ahem, it's a Product archive" else echo "It's a component package" fi exit 0 On Thu, Nov 19, 2015 at 7:10 AM, Erik Berglund <e.berglund@macsupport.se> wrote:
Hi.
I'm searching for a way to determine the type of a given flat package.
I need to figure out if the package is a "component package" or a "product archive".
I've looked at the different pkg-tools I know of to find a flag or information flag to get this info but haven't found one yet. So, I'm asking here if anybody knows a reliable way to determine this.
_______________________________________________ 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
participants (1)
-
Stephane Sudre