• 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: "downgrade", "installed", "upgrade" behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "downgrade", "installed", "upgrade" behavior


  • Subject: Re: "downgrade", "installed", "upgrade" behavior
  • From: Stéphane Sudre <email@hidden>
  • Date: Fri, 7 Dec 2007 23:46:47 +0100


On vendredi, décembre 7, 2007, at 01:51 PM, Joakim Nyström wrote:

Hi!

I have tried to figure out how the installer is comparing versions but I can't get it.

The day you get it, write a post on a blog on it. If you are able to describe it simply, you will get the Pulitzer prize.


I tried to look in the available documentation and also tried to do some searching on this list but I can't find the information I want.

The fact is the way versions are compared has changed with the different evolution of the OS. And considering that Leopard supports at least 3 package formats, it can be quite difficult to remember every case.


The part I love about version comparison in packages is the one that involves a very long version number which is the concatenation of multiple values...

This is what I have tried to do:
I've created a small sample application in two versions - version 1 and version 2 and created a separate installer for each of them. When nothing is installed I can use the Installer application to install version 1 and it is possible to upgrade to version 2. Going back to version 1 is prohibited after this since I don't allow downgrades. So long, everything is fine. What puzzles me a bit is that I'm able to install version 2 once again even though it is already installed. The Installer GUI says it is an upgrade (which it is not) and when I inspect the global javascript variable "choices.*.packageUpgradeAction" it even says "downgrade". (I expected "installed" - see file:///Developer/ADC Reference Library/releasenotes/ DeveloperTools/Installer.html#choices-packageUpgradeAction )
To summarize, what I'm trying to accomplish is an installer that is able to upgrade old versions but will recognized there is no need to install anything if the same version or a newer version is already installed.


I guess there is something I've missed or misunderstood. Please, can anyone give me some advice or point to some relevant documentation. It would also be interesting to know if there are any differences between Tiger and Leopard regarding this issue.

It's been working like this for a long time and I would expect this behavior.


For once, it's difficult for the installer to figure out that all the files are really and correctly installed. Because without running a complete checksum of each file, there is no way to be 100% sure all the files are correctly installed and are the genuine ones (MD5 or any other SHSomething signatures are just a clever hash of the file contents but since hashes are not bijections, it proves nothing - at least this is how I see it).

So without checking every bit of every file both on disk and in the file archive, there is no way for Installer.app to be 100% sure that the current installation is 100% correct and since it might prove useful to be able to restore an installation in case a file got corrupted, then IMHO, it is fine that you can "upgrade" a version with itself.

My 0.02 €


_______________________________________________ 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: "downgrade", "installed", "upgrade" behavior
      • From: Bill Coderre <email@hidden>
References: 
 >"downgrade", "installed", "upgrade" behavior (From: Joakim Nyström <email@hidden>)

  • Prev by Date: Re: Create / install to locations in the user folder with PackageMaker
  • Next by Date: The dmgs of wrath
  • Previous by thread: "downgrade", "installed", "upgrade" behavior
  • Next by thread: Re: "downgrade", "installed", "upgrade" behavior
  • Index(es):
    • Date
    • Thread