Bug 244120 - [PATCH] Mk/bsd.port.mk: Clarify description of OSREL/OSVERSION
Summary: [PATCH] Mk/bsd.port.mk: Clarify description of OSREL/OSVERSION
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-14 10:47 UTC by Michael Gmelin
Modified: 2020-02-14 19:13 UTC (History)
2 users (show)

See Also:


Attachments
Clarify description of OSREL/OSVERSION (776 bytes, text/plain)
2020-02-14 10:47 UTC, Michael Gmelin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Gmelin freebsd_committer 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 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 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 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 2020-02-14 19:00:50 UTC
Looks good to me! Go for it.
Comment 5 commit-hook freebsd_committer 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 2020-02-14 19:13:41 UTC
(In reply to Adam Weinberger from comment #4)

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