[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] [prov] Some provisioning changes released


Yes, that's the fix. I released this to CVS already, but didn't get back to the mailing list because Pascal and I got caught up in discussions.  You'll need one more fix that Pascal released to InstallableUnit about an hour ago. With all the latest from HEAD, the metadata generation and install tests pass.



David R Stevenson <dstevens@xxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

06/15/2007 12:24 PM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
cc
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>, equinox-dev-bounces@xxxxxxxxxxx
Subject
Re: [equinox-dev] [prov] Some provisioning changes released






Thanks, Tom. And thanks for the reference to the LDAP filter spec.


The bug is in the mergeFilters method of the Transformation class in prov.resolution:


     
private String mergeFilters(String filter1, String filter2) {
               
if (filter1 == null && filter2 == null)
                       
return null;
               
if (filter1 == null)
                       
return filter2;
               
if (filter2 == null)
                       
return filter1;
               
return "(&(" + filter1 + ") (" + filter2 + "))"; // bogus!
       }


replacing the bogus line by


               
return "(&" + filter1 + filter2 + ")";

gets past the errors I was seeing.


Since the two string args are apparently supposed to be filters (I assume well-formed) and the definition of a filter is


       <filter> ::= '(' <filtercomp> ')'


(ie. always parenthesized) then I believe the replacement should be a correct solution.


If there are cases where we pass malformed filter conditions like "os=foo" "arch=bar", then the fix has to be more forgiving and the missing parentheses.


       - Dave



Thomas Watson/Austin/IBM@IBMUS
Sent by: equinox-dev-bounces@xxxxxxxxxxx

06/15/2007 06:31 AM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
cc
Subject
Re: [equinox-dev] [prov] Some provisioning changes released








This is not a bug in FilterImpl


This is not a valid filter according to rfc 1960 http://www.faqs.org/rfcs/rfc1960.html:

(&((&(osgi.os=win32)(osgi.ws=win32)(osgi.arch=x86))) ((version>=3.3.0.v3339)))


There are too many nested (()) parentheses.  A '(' char must be followed by an operation char ('&' | '|' | '!') or an evaluation item e.g (osgi.os=win32).  The filter should be changed to the following to be valid:


(&(&(osgi.os=win32)(osgi.ws=win32)(osgi.arch=x86)) (version>=3.3.0.v3339))



Tom


David R Stevenson/Redmond/IBM@IBMUS
Sent by: equinox-dev-bounces@xxxxxxxxxxx

06/14/2007 07:41 PM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
cc
equinox-dev@xxxxxxxxxxx, equinox-dev-bounces@xxxxxxxxxxx
Subject
Re: [equinox-dev] [prov] Some provisioning changes released










Hmm. I picked up your changes and Pascal's. I regenerated the metadata. When I attempt to install (an SDK) I get  a number of InvalidSyntaxExceptions in FilterImpl$Parser:


FilterImpl$Parser.parse_attr() line: 1627        


                     
if (length == 0) {
                             
throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_MISSING_ATTR, String.valueOf(pos)), filterstring);
                     }


when,  for example, the filter string is


(&((&(osgi.os=win32)(osgi.ws=win32)(osgi.arch=x86))) ((version>=3.3.0.v3339)))


and the message is

     
Missing attr at character 3

and the iu being processed is


     
org.eclipse.rcp.featureIU 3.3.0.v20070405a-8w8eDpEbsN3KkG_gP8JZLGb

similar for platform.featureIU with filter string


     (&((&(osgi.ws=win32))) ((version>=3.2.100.I20070319-0010)))


The problem appears to be with the handling of the compound conjunction. A version filter only or an _expression_ like


     (&(osgi.os=hpux)(osgi.arch=ia64_32))


parses without exception.


Bugzilla reveals 3 bugs matching FilterImpl, none for this behavior. Is it a bug or is this type of _expression_ not supported.


     - Dave

John Arthorne <John_Arthorne@xxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

06/14/2007 01:45 PM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To
equinox-dev@xxxxxxxxxxx
cc
Subject
[equinox-dev] [prov] Some provisioning changes released












I released a couple of small to the provisioning incubator:


- New local metadata repository. If you create a metadata repository pointing to a local file system directory, it will traverse the directory in search of "content.xml" files, and aggregate them together. This makes it easier to cobble together metadata from various places without creating multiple metadata repositories


- To allow for experimenting with groups that define filters, I added some bits to the feature parser so that features can define extra filters on their imports and includes. If you run a feature with filters through the metadata generatory, they get turned into filters on the RequiredCapability. This was simpler than hand-crafting filter-enabled groups manually.
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev