HomeFreeBSD

Fix _REVISION to be always major.minor

Description

Fix _REVISION to be always major.minor

Introduced in commit 613fe53, _REVISION was redefined to be just the
major version (14) instead of major.minor (14.0) iff:

  • PKG_VERSION was not overridden (default), and
  • Branch was -CURRENT, -STABLE, or -PRERELEASE.

This introduced side effects in other parts of the code which expected
_REVISION to be major.minor:

  • make-pkg-package.sh target triple became amd64-portbld-freebsd14 (should be amd64-portbld-freebsd14.0);
  • Versioned cross dev symlink name became amd64-freebsd14-<tool> (should be amd64-freebsd14.0-<tool>)

Also, compounded with commit ea9a92d (which was introduced afterward
and removed minor version from _REVISION incorrectly using :S with a
regex) this also caused pkgbase repo to use a wrong PKG_ABI with a minor
version (FreeBSD:14.0:amd64) when a custom PKG_VERSION was specified.
(Note, without a custom PKG_VERSION the bug was not triggered because in
that case _REVISION was already major-only.)

This commit fixes both problems by introducing and using MAJOR_REVISION
instead of redefining _REVISION. Existing uses of _REVISION now see
major.minor again, except PKG_ABI (ex: FreeBSD:14:amd64, as described
above) and PKG_VERSION (ex: 14.snap20220311121531) need only the major
version and now use MAJOR_REVISION instead.

PR: 262600, 262601
Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/592

Details

Provenance
astralblue_gmail.comAuthored on Mar 11 2022, 4:32 AM
impCommitted on Feb 6 2023, 9:02 PM
Parents
rG96ab5e719955: mge(4): Fix build after IfAPI conversion
Branches
Unknown
Tags
Unknown