[izpack-devel] mutually exclusive packs

Vladimir Ralev vralev at redhat.com
Mon Nov 13 19:17:35 CET 2006


The user should simply be advised to do:
pack1 excludes (pack2 and pack3)
pack2 excludes (pack3 and pack1)
pack3 excludes (pack1 and pack2)

I think the problem with your "shortcut"-syntax is that the graph may 
contain many cycles like:

pack1 excludes (pack2 and pack4)
pack2 excludes pack3
pack3 excludes pack1
pack4 excludes pack3

or even worse...

Of course I can implement transitive exclusion (like the transitive dependencies) - if (pack1 excludes pack2) AND (pack2 excludes pack3) THEN (pack1 excludes (pack2 and pack3)).

In this case however I will disallow *any* cycles in the exclusion 
graph, because the recursion will go forever. I personally think that 
the exclusions are better without transitive traversal, but if you want 
something else I will do it.

Another useful syntactical shortcut would be to implicitly create the 
symmetric exclude - if (pack1 excludes pack2) THEN automatically do 
(pack2 excludes pack1), but this breaks the declarative symmetry?

PS. I found a bug in the code I sent you (packs with no "excludes" tags 
cause exceptions), I will be making more changes too.

 I am waiting for your comments and will send the final code soon.

Bartz, Klaus wrote:
> Hi Vladimir,
> today I have tested a little bit.
> If the exclusion will be declared as full cross references 
> it works fine.
>
> But what should be happen with
> pack1 excludes pack2
> pack2 excludes pack3
> pack3 excludes pack1
>
> If I select first pack1 and then pack2 both are selected.
> If I select first pack2 and then pack1 only pack1 is selected.
>
> Not a real szenario? May be, but I am certain that someone
> does it in the future and calls why this not work as he/she assumed.
> Therefore we should clear this in front.
> I tend to say that an implicit backward exclusion should be
> performed; means
> If I selct first pack1 and then pack2 only pack2 is selected.
> If I selct first pack2 and then pack1 only pack1 is selected.
>
> What is your meaning, what say the others?
>
> Cheers
>
> Klaus
>
>   
>> -----Original Message-----
>> From: izpack-devel-bounces at lists.berlios.de
>> [mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of Bartz, Klaus
>> Sent: Friday, November 10, 2006 12:20 PM
>> To: izpack-devel at lists.berlios.de
>> Subject: Re: [izpack-devel] mutually exclusive packs
>>
>>
>> Hi Vladimir
>> thank you for your patch.
>> Unfortunately I have in the moment no time. Therefore I
>> will test it (and check in it into trunk if OK) next week.
>> As docu first a short description what this feature do...
>>
>> Cheers
>>
>> Klaus
>>
>>
>>     
>>> -----Original Message-----
>>> From: izpack-devel-bounces at lists.berlios.de
>>> [mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of Vladimir
>>> Ralev
>>> Sent: Thursday, November 09, 2006 3:44 PM
>>> To: izpack-devel at lists.berlios.de
>>> Subject: Re: [izpack-devel] mutually exclusive packs
>>>
>>>
>>> I updated the DTD, but wasn't sure how to update the documentation. I 
>>> made some changes to the sample installation.xml to demo the 
>>> feature if 
>>> it's needed. Check it out and let me know if something is wrong.
>>>
>>>
>>> Bartz, Klaus wrote:
>>>       
>>>> Hi,
>>>> sounds good...
>>>> If you are working at or done the local work you know, that
>>>> it is a little bit work to loop through the xml entry to the
>>>> installation and process the new feature in the PacksModel.
>>>> But this will be not the only work...
>>>> If you read frequently the IzPack mail lists you know that
>>>> we have sometimes problems with the docu. Therefore, a new
>>>> feature needs adaption of the docu. Fabrice tries to hold the
>>>> docu clean, but you can make the live a little bit easier for
>>>> him if you adapt your portion.
>>>> An other part is the DTD. If needed, I can adapt it.
>>>>
>>>> Cheers
>>>>
>>>> Klaus
>>>>
>>>>   
>>>>         
>>>>> -----Original Message-----
>>>>> From: izpack-devel-bounces at lists.berlios.de
>>>>> [mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of
>>>>> vralev at redhat.com
>>>>> Sent: Wednesday, November 08, 2006 6:20 PM
>>>>> To: izpack-devel at lists.berlios.de
>>>>> Subject: [izpack-devel] mutually exclusive packs
>>>>>
>>>>>
>>>>> Hello everyone.
>>>>>
>>>>> I was working on this feature these days and want to hear your 
>>>>> comments on the
>>>>> syntax. I addes a new tag <excludes> similar to <depends>:
>>>>>
>>>>> <pack name="1" installGroups="1" required="no">
>>>>>    <depends packname="somedeppack"/>
>>>>>    <excludes packname="2"/>
>>>>> </pack>
>>>>> <pack name="2" installGroups="1" required="no">
>>>>>    <excludes packname="1"/>
>>>>> </pack>
>>>>>
>>>>> Packs declared in <excludes> are being unchecked when the 
>>>>> parent pack is
>>>>> checked. There is a compiler-time check similar to the 
>>>>> depends' and a runtime
>>>>> check to ensure a requred pack isn't being unchecked.
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> izpack-devel mailing list
>>>>> izpack-devel at lists.berlios.de
>>>>> https://lists.berlios.de/mailman/listinfo/izpack-devel
>>>>>
>>>>>     
>>>>>           
>>>> _______________________________________________
>>>> izpack-devel mailing list
>>>> izpack-devel at lists.berlios.de
>>>> https://lists.berlios.de/mailman/listinfo/izpack-devel
>>>>   
>>>>         
>>> -- 
>>> Vladimir Ralev, JBoss/RedHat
>>>
>>>
>>>       
>> _______________________________________________
>> izpack-devel mailing list
>> izpack-devel at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/izpack-devel
>>
>>     
> _______________________________________________
> izpack-devel mailing list
> izpack-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/izpack-devel
>   


-- 
Vladimir Ralev, JBoss/RedHat




More information about the izpack-devel mailing list