Re: I thought "pkg updating" would alert me about python...?

2021-05-03 Thread Ronald Klop

Van: Tatsuki Makino 
Datum: 2 mei 2021 22:36
Aan: Ronald Klop , 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"


Re: I thought "pkg updating" would alert me about python...?

2021-05-02 Thread Tatsuki Makino
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.

___
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"


Re: I thought "pkg updating" would alert me about python...?

2021-05-02 Thread Ronald Klop

On 5/2/21 4:20 PM, David Wolfskill wrote:

I just re-verified the behavior, so -- even though I have already
started taking evasive action (updating python), I figured it may be of
use to show what I'm seeing; maybe I'm confused:

Local ports tree is updated; previous ports update was a week ago.  I
happen to know that there's an UPDATING entry:

lgld-dhw(12.2-S)[4] tail +16 /usr/ports/UPDATING | head -5
20210425:
   AFFECTS: users of python
   AUTHOR: k...@freebsd.org

   The default version of python3 and python was switched to 3.8.


And that this machine should be affected:

lgld-dhw(12.2-S)[5] pkg info -o python\*
python27-2.7.18_1  lang/python27
python36-3.6.13lang/python36
python38-3.8.9 lang/python38


[As noted above, I had already started evasive action.]

But "pkg updating" is not actually showing the above entry:

lgld-dhw(12.2-S)[6] pkg updating -d 20210424
lgld-dhw(12.2-S)[7] echo $?
0


Am I alone in expecting "pkg updating" to have displayed the 20210425
entry?

(There was an issue a while back, where "pkg updating" was not showing
"glob" entries, but that has since been addressed.)

This is on a machine running stable/12:

lgld-dhw(12.2-S)[8] uname -a
FreeBSD lgld-dhw.corp.example.com 12.2-STABLE FreeBSD 12.2-STABLE #21 
stable/12-n233048-23a3c3d97d72: Sun May  2 04:43:57 PDT 2021 
r...@lgld-dhw.corp.example.com:/common/S2/obj/common/S2/src/amd64.amd64/sys/GENERIC
  amd64
lgld-dhw(12.2-S)[9] pkg -v
1.16.3

Thanks.

Peace,
david




The UPDATING file says "users of python" while the pkg/port name is python37. 
So that does not match. It does match for humans but not for computers. :-)
The UPDATING entry should have said something like "users of lang/python*" to 
work.

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"