-
Notifications
You must be signed in to change notification settings - Fork 283
make 'pkg updating' to recognize regular expression package names #1765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pkg updating collects package names which is indicated by regular expressions.
|
Please review and merge this pull request. |
|
thank you, I will review asap! |
|
@bapt Some one claims as same as #227193 in freebsd-users-jp mailing list. I hope you have enough time to review. |
|
yes sorry I have been busy, I will try to review before the end of the week, sorry for the delay |
|
note that it looks globally good, (from a quick review I already did, I just want to make a more in depth review to see if I have not missed something) would it be possible for you to add some test cases? |
|
OK, my test cases are followings.
There is no test cases for '^', '$', '+' expressions. |
|
I was more saying adding test case to the testsuite to ensure we have no regression (see the tests directory, in particular frontend/updating) |
|
Sorry about misunderstanding. |
In UPDATING file, simplified regular expression is used. So we convert to POSIX 1003.2 style mentioned in re_format(4).
This makes 'print/cups' not to match 'print/cups-base'.
|
I added Through this test, And I think 'print/cups' package should not match to 'print/cups-base', |
|
@bapt |
|
sure thanks a lot! |
|
Thanks a lot for the contribution! |
I added
matcherfunction for matching regular expression package names inAFFECTS:line.This function split
AFFECTS:line into words and each words are checked if it contains regular expression characters or not.If a word contains regular expression characters, it will be compiled and checked matches to ports origin name.
Compiling a regular expression is relatively slow operation, so I made a cache for compiled objects.
And I added special case of 'AFFECTS: all users' and 'AFFECTS: all ports users'.
The message in these cases should be shown.
This pull request solves #227193 on FreeBSD Bugzilla.