Bug 244120

Summary: [PATCH] Mk/bsd.port.mk: Clarify description of OSREL/OSVERSION
Product: Ports & Packages Reporter: Michael Gmelin <grembo>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me CC: adamw, ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Clarify description of OSREL/OSVERSION none

Description Michael Gmelin freebsd_committer freebsd_triage 2020-02-14 10:47:25 UTC
Created attachment 211641 [details]
Clarify description of OSREL/OSVERSION

The handbook describes them pretty well
https://www.freebsd.org/doc/en/books/porters-handbook/dads-after-port-mk.html
Comment 1 Adam Weinberger freebsd_committer freebsd_triage 2020-02-14 18:00:44 UTC
This doesn't seem any clearer to me, because reading those strings, I can't predict what would be in each one. It almost implies that OSREL might not have numbers.

I've two suggestions for you to consider:
1) Call it "integer" instead of "numeric." "12.1" is still numeric.
2) Examples could make it clearer

OSREL - The release version of the operating system (12.1).

OSVERSION - The operating system version as an integer; the value of __FreeBSD_version (120100).
Comment 2 Adam Weinberger freebsd_committer freebsd_triage 2020-02-14 18:03:29 UTC
(In reply to Adam Weinberger from comment #1)
Actually, I'd go one step further:

OSREL - The release version of the operating system as a text string (12.1).

OSVERSION - The operating system version as a comparable integer; the value of __FreeBSD_version (120100).
Comment 3 Michael Gmelin freebsd_committer freebsd_triage 2020-02-14 18:52:58 UTC
(In reply to Adam Weinberger from comment #2)

Slightly modified:

OSREL - The release version of the operating system as a text
        string (e.g., "12.1").
OSVERSION - The operating system version as a comparable integer;
            the value of __FreeBSD_version (e.g. 120100).
Comment 4 Adam Weinberger freebsd_committer freebsd_triage 2020-02-14 19:00:50 UTC
Looks good to me! Go for it.
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-02-14 19:12:47 UTC
A commit references this bug:

Author: grembo
Date: Fri Feb 14 19:11:47 UTC 2020
New revision: 526131
URL: https://svnweb.freebsd.org/changeset/ports/526131

Log:
  Clarify description of OSREL/OSVERSION in bsd.ports.mk.

  PR:		244120
  Approved by:	portmgr (adamw)

Changes:
  head/Mk/bsd.port.mk
Comment 6 Michael Gmelin freebsd_committer freebsd_triage 2020-02-14 19:13:41 UTC
(In reply to Adam Weinberger from comment #4)

Done. Spotted the missing "0" in OSVERSION before committing ;)