• 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
Re: Query for package id
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Query for package id


  • Subject: Re: Query for package id
  • From: "Charles E. Heizer" <email@hidden>
  • Date: Wed, 15 Jul 2009 15:50:32 -0700
  • Acceptlanguage: en-US
  • Thread-topic: Query for package id

Hi Greg,
Thanks, I had a feeling that was the answer :-(

Charles

On Jul 15, 2009, at 3:37 PM, Greg Neagle wrote:

> In Leopard, pkgutil doesn't have info on all installed packages; it
> tracks only the new Leopard flat packages.
> What you have to do is first check pkgutil:
>
> pkgutil --pkg-info <pkgid>
>
> If that turns up nothing, you'll need to loop through all the receipts
> in /Library/Receipts and examine the Info.plist files:
>
> /Library/Receipts/PackageName.pkg/Contents/Info.plist
>
> From the Info.plist, you'll need to look at CFBundleIdentifier and
> CFBundleShortVersionString.
> Some packages also have a version.plist at /Library/Receipts/
> PackageName.pkg/Contents/version.plist, which has additional version
> info.
>
> There's some Python code to do all of this in munki -- http://*code.google.com/p/munki
>
> -Greg
>
>
> On Jul 15, 2009, at 2:30 PM, Charles E. Heizer wrote:
>
>> Hello,
>> I'm looking at creating a script to see if a package has been
>> installed. So I have been looking through the man pages on pkgutil
>> and
>> installer and I dont see a logical way to join the two.
>>
>> If I run "installer -pkginfo -verbose" on a pkg I get some useful
>> information but no package identifiers or package identifier version.
>> So what is the best approach to query pkgutil for a package if you
>> dont have a package identifier?
>>
>> thanks,
>> Charles
>
>

 _______________________________________________
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

References: 
 >Query for package id (From: "Charles E. Heizer" <email@hidden>)
 >Re: Query for package id (From: Greg Neagle <email@hidden>)

  • Prev by Date: Re: Query for package id
  • Next by Date: Snow Leopard, uninstallation procedure; HowTo ...
  • Previous by thread: Re: Query for package id
  • Next by thread: Snow Leopard, uninstallation procedure; HowTo ...
  • Index(es):
    • Date
    • Thread