Re: metapackage component conditionally set required
Re: metapackage component conditionally set required
- Subject: Re: metapackage component conditionally set required
- From: Iceberg-Dev <email@hidden>
- Date: Sat, 10 Oct 2009 01:40:39 +0200
On Oct 9, 2009, at 6:43 PM, Andy Mroczkowski wrote:
Hi all,
I have a metapackage that has two sub-components. These components
install resources for a particular architecture (Intel or PPC). I can
conditionally select or de-select the sub-components with requirements
scripts, but I'd like to automatically make the appropriate component
Required and disable the other component. For example, if I'm
installing on an Intel macine, the Intel sub-component would be
Required, while the PPC component would be disabled.
Can this be accomplished?
Yes it can.
You just need to have one component check if it needs to be required
or disabled and then you make the second component state depend on
the first one.
Here is something to get you started.
<choice id="installer_choice_1" start_enabled="false"
start_selected="installer_choice_1_selected(true)"
selected="installer_choice_1_selected(false)" title="Intel"
description="One Moore thing...">
<pkg-ref id="com.intel.blahblah"/>
</choice>
<choice id="installer_choice_2" start_enabled="false"
start_selected="installer_choice_2_requirement()" title="PowerPC"
description="Use at your own RISC">
<pkg-ref id="com.powerpc.blahblah"/>
</choice>
function installer_choice_1_selected(isStart)
{
var tSelected;
tSelected=!choices.installer_choice_2.selected;
if (isStart==true)
{
return tSelected;
}
return (tSelected && my.choice.selected);
}
function installer_choice_2_requirement()
{
var tResult;
tResult=myfunctiontocheckifthearchitectureisenabled;
return tResult;
}
_______________________________________________
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