Re: How to tell Packages to avoid downgrades?
Re: How to tell Packages to avoid downgrades?
- Subject: Re: How to tell Packages to avoid downgrades?
- From: Matthias Schroeder <email@hidden>
- Date: Fri, 02 Aug 2013 16:58:39 +0200
Hi,
is it possible that "choices" is not yet initialised when the
requirement scripts are run? No matter what I do, I can not find any
access to any property of choices.
I went "back" to use system.compareVersions, and that way I could do the
proper checks. I still have to verify that I works with the versioning
scheme we use, but that should not be too hard.
Cheers,
Matthias
On 08/01/2013 06:21 PM, Matthias Schroeder wrote:
Hi,
me again, still struggling with the implementation. I seem to miss something essential (but simple?). I have build a distribution with one package for testing, so the choice is installer_choice_1. I have even verified this with "installer --showChoicesXML". But whenever I try to use any of choices.installer_choice_1's properties I get a javascript error like "'undefined' is not an object (evaluating 'choices.installer_choice_1.packageUgradeAction'). I get the same with _1.title. Any idea what I am doing wrong?
Matthias - it also took me some time to notice that it is not …UpgradeAction :(
On Jul 31, 2013, at 2:16 PM, Stephane Sudre <email@hidden> wrote:
If you're using a distribution, you could attach a custom JavaScript
requirement to a choice that represents a package.
It would look something like
function preventDowngrade()
{
if (choices.installer_choice_X. packageUgradeAction== downgrade)
return false;
return true;
}
Now, to figure out what X should be, you just need to know that the
choices id created by Packages are based on their indentations.
So if you have the following choice hierarchy
group
choice A
choice B
choice C
The IDs will be:
installer_choice_1
installer_choice_1_1
installer_choice_1_2
installer_choice_2
On Wed, Jul 31, 2013 at 10:14 AM, Matthias Schroeder
<email@hidden> wrote:
Dear all,
I wanted to use Packages to build flat packages and distributions. I would like to avoid that parts of the distribution downgrade some parts that might have a newer version installed already. Does Packages offer this, or do I have to write a script for handling this myself?
So far I have tested my simple flat packages from Packages, and with version strings like 'M.m.n' or 'M.m.n-r'. In my tests 'smaller' version number happily installed overwriting higher version numbers. Is that expected behaviour?
Thanks in advance for your help,
_______________________________________________
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