• 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: Dynamic Install Location?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic Install Location?


  • Subject: Re: Dynamic Install Location?
  • From: Nigel Kersten <email@hidden>
  • Date: Thu, 6 Sep 2007 08:53:02 -0700


On Sep 6, 2007, at 12:54 AM, Bill Coderre wrote:


On Sep 4, 2007, at 10:24 AM, Nigel Kersten wrote:
So currently I'm using the method of a preflight script that:

* retrieves the ruby sitelibdir parameter
* removes /tmp/my-symlink
* symlinks sitelibdir at /tmp/my-symlink
* package destination is set to /tmp/my-symlink with follow symlinks on.

Is this really the best option for doing this? 

This is a perfectly acceptable way to do it. ("Best" is such a contentious word.)

"perfectly acceptable" isn't an adjective I'd use to describe such a hack.

All it would take would be for us to be able to do something like set $DEST_ROOT in a preflight script and have that override whatever the pkg itself has set. 

(ALSO: REMEMBER!!!! when the use clicks "Install", your installer is probably running as ROOT, so preflight and postflight need to be very security-conscious!!! SO DON'T ACCIDENTALLY SCRIBBLE ON THE KERNEL FILE, EH?)

Well duh, yes.... :)


It annoys me that I then don't get to observe the full paths with lsbom once the package is installed.

Your life will be MUCH MORE PLEASANT (and robust, hint hint) if you pretend that lsbom and package receipts DO NOT EXIST. 

Here's three good reasons:
1) BOM files change format from time to time, and contain LOTS of stuff you don't want to care about. 

2) Installation package receipts change format from time to time, and sometimes include destination paths that are supposed to be pre-pended onto the output of lsbom. Thus, lsbom does not always give you the whole story anyway.

3) It is not that much work to write your own preference file containing a list of files installed and a destination path.

Here's a sketch:
a) during your installer build makfile, pipe ls $MYINSTALLATIONROOTDIRECTORY into FOO.PKG/Contents/Resources/MySpecialBomFile,  then 

b) during your installer's postflight, mv this into /Library/Preferences/com.myCompany.myGreatApp.BOM and prepend the custom location as line 1. (Or you can be all FANCY and use a plist file or something.)

This is quite frankly ridiculous.

1) should be irrelevant. I shouldn't have to care about Apple changing BOM formats, the given userland tools should abstract such details away from me.

2) and 3) illustrate quite serious limitations of the pkg format. 

It's absolutely absurd that you're claiming we should have to build our own list of files installed, and it's not good enough that the native pkg format is so useless for auditing.

Next thing you'll be suggesting that we dump "Installer Log File" at the root of the file system and we'll be back in the dark ages....



 _______________________________________________
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: 
 >Dynamic Install Location? (From: Nigel Kersten <email@hidden>)
 >Re: Dynamic Install Location? (From: Nigel Kersten <email@hidden>)
 >Re: Dynamic Install Location? (From: Fritz Anderson <email@hidden>)
 >Re: Dynamic Install Location? (From: Nigel Kersten <email@hidden>)
 >Re: Dynamic Install Location? (From: Bill Coderre <email@hidden>)

  • Prev by Date: Re: Dynamic Install Location?
  • Next by Date: Support 10.3 option
  • Previous by thread: Re: Dynamic Install Location?
  • Next by thread: Support 10.3 option
  • Index(es):
    • Date
    • Thread