maintainer-feedback requested: [Bug 271994] make PORTREVISION optionally dependent on the architecture to prevent unnecessary rebuilds

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 14 Jun 2023 16:16:21 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked FreeBSD Office Team
<office@FreeBSD.org> for maintainer-feedback:
Bug 271994: make PORTREVISION optionally dependent on the architecture to
prevent unnecessary rebuilds
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271994



--- Description ---
Scenario:
- FreeBSD ports framework
- A fix is supplied for a port which is necessary for only one or a few
architecture(s) (see for example the latest change to editors/libreoffice,
19a93ee6d9218bcc2e4a1506e20015d84a84ee21)

Result:
- The port maintainer applies the fix and increases the PORTREVISION
- The port is recompiled for all architectures although this would be necessary
only for the affected one(s)

Expected result:
- It should be necessary to only recompile the port for the affected
architecture(s) and therefore to not increase the PORTREVISION for all others.

Proposed solution:
- Make the PORTREVISION architecture-dependent
- If only a few architectures need to be rebuilt, the maintainer increases the
PORTREVISION only for these.
- If a port needs to be rebuilt for all architectures, its PORTREVISION is
increased to one higher than the maximum of all previous PORTREVISIONs.

Proposed syntax:
    PORTREVISION=   1,aarch64:2,amd64:3,i386:4
(next full rebuild)
    PORTREVISION=   5

A stub Makefile demonstrating the solution is attached. The solution is
backwards-compatible with the current usage of PORTREVISION.

-- Martin