Van: Tatsuki Makino <tatsuki_mak...@hotmail.com> Datum: 2 mei 2021 22:36 Aan: Ronald Klop <ronald-li...@klop.ws>, freebsd-ports@freebsd.org Onderwerp: Re: I thought "pkg updating" would alert me about python...?
Ronald Klop wrote on 2021/05/03 05:14: > The UPDATING entry should have said something like "users of lang/python*" to work. The behavior of this is strange. I have the following python* in my environment. python, python27, python3, python37 and python38 AFFECTS: users of python : not match AFFECTS: users of pytho? : match AFFECTS: users of python3 : not match AFFECTS: users of python* : match AFFECTS: users of python3[7] : match package names are also comparable. Does it not pattern match if the pattern match symbol ?, [] or * is not included? Regards.
If I read the pkg source correctly it uses regex with some glob-like preparation like converting * to .*.https://github.com/freebsd/pkg/blob/62302ab4b4d69528e155ea7b68f058a05d6dffdd/src/updating.c#L71And it indeed checks if the word contains regex characters. If not it compares with strcmp. strpbrk(words[i],"^$*|?") == NULL What is remarkable is that it compares to "origin". I think origin is the full portname "lang/python". The regex match also matches a substring of origin. This would explain why pytho? matches, but python didn't. NB: this is by looking at the C code for a minute with my rusty C skills. I might have overlooked something. 😅 Regards,Ronald _______________________________________________ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"