Danek Duvall wrote:
Saurabh Vyas wrote:
webrev : http://cr.opensolaris.org/~saurabhv/fix-9970/
Given the comment immediately above, it seems like what's coming back in
"match" isn't the right thing. Is the comment wrong?
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
Well... it kinda depends on what "the right thing" means. What's sent
back in 'match' is the token which matched the search query. Generally,
this is what you want (I think), but with something like a description,
an argument can be made that what you really want is the entire contents
of the description, not just the matching string. I think the comment
should probably say something like,
For those actions, the match parameter states which token in the values matched
the query.
I'm reasonably comfortable with the fix proposed as a starting point,
but I have my doubts that it'd work correctly on an action like this:
set=name value=foo value=baz value=bar value="whee fun"
In this case, I'd expect 'pkg search bar' to return
description set bar pkg://<pkg name>
But 'pkg search fun' or 'pkg search whee' to return:
description set whee fun pkg://<pkg name>
Also, I'd like to see test cases added for the correct behavior.
Thanks,
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss