Re: Install file only if it exists on target?
Re: Install file only if it exists on target?
- Subject: Re: Install file only if it exists on target?
- From: Bill Coderre <email@hidden>
- Date: Mon, 31 May 2010 12:07:55 -0700
On May 31, 2010, at 9:31 AM, Andrew Peckover wrote:
> Thank you, Bill and Greg, for both of your tips
>
> I think the best option is to use the post-flight script method. This seems very simple. If you have a moment, can you just confirm if the following would be an acceptable way to do it:
>
> 1. Install all files to /Applications/MyProgram/TempFolder, then run a post-flight shell script.
> 2. The script moves each file from the tempfolder to the destination folder, if a file with the same name already exists there.
> 3. The TempFolder is deleted.
That is an acceptable way to do it. I'd add a step to make sure that the location does not exist before you begin. If it does exist, tread carefully; it's a security risk.
The reason: Suppose I'm a script kid. I know you will come along and update the app. So I put a symlink in that location. The installer runs as root. Therefore, the symlink could overwrite something useful, like the kernel, or worse.
> This is sort of a moot point, but I'm confused about why you say my original package should have been a metapackage. I thought all packages created with PM are metapackages using PM version 3.0.3. I think it may have worked differently with earlier versions of PM, but I have never used an earlier version. In any case, there are a large number of collections of files, which aren't necessarily known at the time of making the initial program installer, so that method wouldn't work too well.
They are, but in most cases, they are one package in one metapackage. By using several packages that are conditionally installed, you might not have to do all the work you are planning. _______________________________________________
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