[izpack-devel] mutually exclusive packs
Bartz, Klaus
Klaus.Bartz at coi.de
Wed Nov 15 09:57:54 CET 2006
Hi Vladimir,
seems so it can resolve the logical and declarative symmetry
problems we have had.
First I will write what I understand (or better anticipate)
about "your" exclude group that we can verify that we speak about
the same "thing".
There are some points added for the behavior if some premises
are not exist.
1. "excludeGroup" is an attribute (ATTLIST) of element "packs"
2. "excludeGroup" can only contain one group.
3. This group is a String which is unique for one group of all
"excludeGroup"s, but has no relation to other groups like the
"installGroups" or the pack name or id.
4. A functional "excludeGroup" can contain at least two members. A member is
a pack which has the attribute "excludeGroup" with the given name.
If only one member is declared, nothing will be done.
5. A member in the "excludeGroup" cannot have the attribute "required="yes"".
If so, an exception should be thrown at compile (packaging) time and no
installer should be created.
6. Only one member in the "excludeGroup" can have the attribute "preselected="yes"".
Therefore it is a precondition that the attribute "preselected" exist because the
default is "yes". A contempt will be responsed with an exception and a break
at compile (packaging) time.
7. The handling at install time of this feature will be done in the class
com.izforge.izpack.panels.PacksModel. There is no new panel to handle something.
8. From all members of an "excludeGroup" only one member can be
selected. One member of the group is mutually exclusive to each other member.
If a secound will be selected, the previous will be deselected. If no previos
selected exist, only the selection will be performed.
Unclear:
What about informations for the installer (user)? For dependens there is an
extra text field in the PacksPanel. For an additonal text field we have no
place, I think. What todo?
Is this what you would implement? What is missing? I think a text like this
can be used as description. Then we have solved the exasperating point docu.
You confirm? Or can you write it better?
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: Tuesday, November 14, 2006 3:33 PM
>To: izpack-devel at lists.berlios.de
>Subject: Re: [izpack-devel] mutually exclusive packs
>
>
>These "chained" declarations made me thinking about an alternative
>syntax. How about instead of having <excludes>, add a new attribute to
>the pack tag:
>
> <pack name="1" installGroups="1" required="no"
>excludeGroup="group1">
> </pack>
> <pack name="2" installGroups="1" required="no"
>excludeGroup="group1">
> </pack>
>
>
> <pack name="3" installGroups="1" required="no"
>excludeGroup="another
>exclude group">
> </pack>
> <pack name="4" installGroups="1" required="no"
>excludeGroup="another
>exclude group">
> </pack>
>
>This way, all packs in the same excludeGroup will be mutually
>exclusive.
>I think there is no need to support multiple excludeGroups per pack
>because of the tie cases, but if want I can do that too.
>
>Is this any better?
>
>Bartz, Klaus wrote:
>> Hi Vladimir,
>> I think both possitions are possible. If I have no
>> docu, I assume a behavior like I would implement it.
>> Rest context related.
>> You know, we have some features where the documentation is not
>> optimal. I think we should not do it at new features.
>>
>> 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: Monday, November 13, 2006 7:18 PM
>>> To: izpack-devel at lists.berlios.de
>>> Subject: Re: [izpack-devel] mutually exclusive packs
>>>
>>>
>>> The user should simply be advised to do:
>>> pack1 excludes (pack2 and pack3)
>>> pack2 excludes (pack3 and pack1)
>>> pack3 excludes (pack1 and pack2)
>>>
>>>
>>
>> That's the problem with the docu... You know it because you have
>> implement it and I will show into the sources if I get a problem.
>> But many user do not like the hint "the sources are the best
>> documentation".
>> Therefore my request for a docu from the developer.
>>
>>
>>> 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?
>>>
>>>
>>
>> I tend to support implicit symmetry.
>> May be it breaks the declarative symmetry, but it suppress an
>> asymmetric execution.
>> selection of pack2 deselects pack1 but selection of pack1 do not
>> deselect pack2.
>>
>>
>>> 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.
>>>
>>>
>>
>> Nice. Additional if you declare a nonexistent pack as excludes a
>> null pointer exception raises in the installer. May be a verification
>> at compile time will be better.
>>
>>
>>> 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
>>>>
>>>>
>> <snip>
>>
>>> _______________________________________________
>>> 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
>
More information about the izpack-devel
mailing list