• 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: Accessing PackageKit programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing PackageKit programmatically


  • Subject: Re: Accessing PackageKit programmatically
  • From: John Paul Adrian Glaubitz <email@hidden>
  • Date: Mon, 13 Jun 2016 18:54:56 +0200

Hi Julian!

On 06/13/2016 06:48 PM, Julian Devlin wrote:
> We use the following, when testing from a Makefile:
> sudo installer -tgt / -pkg foo.pkg
>
> I don’t know how successful you might be in avoiding sudo…

The problem is that /usr/sbin/installer cannot be run from Objective-C code
without a very crude hack. You basically have to embed Apple Script into
your Objective-C code to be able to gain administrative privileges [1].

On Windows, there is the MSI library which has been part of Windows since
Windows 2000 and it provides a clean and canonical access to the installer
system [2]. Applications like Google Chrome use it to install their package
updates in silent mode.

I'm a bit surprised that Apple doesn't provide similar mechanisms.

Adrian

> [1] http://stackoverflow.com/questions/6841937/authorizationexecutewithprivileges-is-deprecated
> [2] https://msdn.microsoft.com/en-us/library/windows/desktop/Aa369426(v=vs.85).aspx

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - email@hidden
`. `'   Freie Universitaet Berlin - email@hidden
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
 _______________________________________________
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


  • Follow-Ups:
    • Re: Accessing PackageKit programmatically
      • From: Erik Berglund <email@hidden>
References: 
 >Accessing PackageKit programmatically (From: John Paul Adrian Glaubitz <email@hidden>)
 >Re: Accessing PackageKit programmatically (From: Greg Neagle <email@hidden>)
 >Re: Accessing PackageKit programmatically (From: John Paul Adrian Glaubitz <email@hidden>)
 >Re: Accessing PackageKit programmatically (From: Julian Devlin <email@hidden>)

  • Prev by Date: Re: Accessing PackageKit programmatically
  • Next by Date: Re: Accessing PackageKit programmatically
  • Previous by thread: Re: Accessing PackageKit programmatically
  • Next by thread: Re: Accessing PackageKit programmatically
  • Index(es):
    • Date
    • Thread