On 2021/03/25 20:30, Matthew Martin wrote: > A while back [1] it was noted zsh's $OSTYPE is out of sync with the OS > version. The below patch uses $(OSrev) to automatically bump REVISION > when the OS version changes. In the case a normal REVISION bump is > needed, the constant can be decremented. When updated to a new release, > the constant should be updated to the current OSrev value (which means > REVISION will start at 0 not blank, but that seems fairly unimportant.)
Feels like automating this is too much magic, we try to avoid != as much as possible, and using it in REVISION seems very fragile. > Thoughts or other suggestions? bash has the same with $OSTYPE. I think the options are either ignore it (a mismatch is a good reminder for users that $OSTYPE doesn't do what they think it does!) or add a dummy file to the package using the version number, so that it trips PLIST_DB checks so we can find it to bump manually (we bump a couple of ports for release, like gcc/emacs, though in those cases it's for real files/directories). Not sure why $OSTYPE is build-time rather than run-time, but it's documented that way. > COMMENT= Z shell, Bourne shell-compatible > > V= 5.8 > -REVISION = 0 > +# Keep $OSTYPE up to date > +REVISION != expr $(OSrev) - 68 > DISTNAME= zsh-$V > CATEGORIES= shells > >
