NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/60810: /usr/src/sys/conf/osrelease.h -s behavior does not match description



    Date:        Tue, 29 Sep 2026 01:29:56 -0400
    From:        Rob Whitlock <rwhitlock22%gmail.com@localhost>
    Message-ID:  <AB6D15AA-921B-4E1B-9F62-5B54693C95B0%gmail.com@localhost>

  | but if there were a script that already
  | did that parsing for you, then why wouldn't you use it?

But it doesn't, you only believe it does as you've apparently
only tested in on HEAD.   On the -10 branch currently, osrelease.sh -s
produces 102_STABLE  on the -11 branch it gives 110_STABLE (that one I haven't
cvs up'd recently, it might have been updated beyond that since I last did).

On a 10.2 release version it says 102  (I don't have 11.0 release kernel
sources handy to check it).   On the final -9 branch release it produces 95

  | (This is, of course, assuming that this person wouldn't be aware of
  | corner case differences between the two formats)

It is more than corner case differences.   The script has a purpose to
exist, and making version numbers for pkgsrc is not it.

You'd be better starting with uname -r from the system you want to
build for (the same as pkgsrc does for the native os version) and
convert that (which is trivial) to the correct format.

  | Very well, I can drop the request to change it. However I still
  | think it would be a good idea to more precisely document the
  | given format in the comments,

I can do that I suppose, including a comment telling people who want
to use it for purposes other than that for which it is designed, to
go away and leave that script in peace.

kre




Home | Main Index | Thread Index | Old Index