-.\" $OpenBSD: bsd.port.mk.5,v 1.565 2022/07/06 09:42:15 espie Exp $
+.\" $OpenBSD: bsd.port.mk.5,v 1.566 2022/07/20 16:37:49 espie Exp $
.\"
.\" Copyright (c) 2000-2008 Marc Espie
.\"
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 6 2022 $
+.Dd $Mdocdate: July 20 2022 $
.Dt BSD.PORT.MK 5
.Os
.Sh NAME
steps.
.It Cm reinstall
Force reinstallation of a port, by first cleaning the old installation.
-Seldom needed, as
+This will obviously not work for software used as dependencies of other
+installed software.
+In that case,
.Cm update
-will often do the right thing.
+might do the right thing.
.It Cm repackage
Rebuild the packages of a port after removing existing packages.
.It Cm run-depends-args
and
.Ev FORCE_UPDATE
as well.
+.Pp
+However, see
+.Sx CAVEATS
+in
+.Xr ports 7 :
+.Cm update
+is always
+.Sq best-effort
+and will often not work correctly when
+updating to a significantly different newer version.
.It Cm update-or-install
Update an installed package or perform a fresh installation,
by using
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: ports.7,v 1.129 2021/11/29 14:06:03 espie Exp $
+.\" $OpenBSD: ports.7,v 1.130 2022/07/20 16:37:50 espie Exp $
.\" $FreeBSD: ports.7,v 1.7 1998/06/23 04:38:50 hoek Exp $
.\"
-.Dd $Mdocdate: November 29 2021 $
+.Dd $Mdocdate: July 20 2022 $
.Dt PORTS 7
.Os
.Sh NAME
See the next section for more details, since most of the fine points of
bulk package building also apply to updates.
.Pp
-There are bugs in the ports tree, most related to libtool, which make some
-updates prefer the already installed libraries instead of the newly built
-ones.
-This shows up as undefined references in libraries, in which case there
-is no choice but to proceed the old way: deinstall the offending package
-and everything built on top of it, build and install new packages.
+However, also note that
+.Li make update
+is not guaranteed to work, see
+.Sx CAVEATS
+below.
.Sh BULK PACKAGE BUILDING
Building any significant number of packages from the ports tree should use
.Xr dpb 1 ,
from the
.Fx
project.
+.Sh CAVEATS
+Building a new version of an already installed package is not guaranteed
+to work.
+.Pp
+The safer way would be to create a sandbox for building the updated port
+using
+.Xr proot 1
+.Po see also
+.Xr bulk 8
+.Pc ,
+and then update the installed package.
+.Pp
+Specifically: most software expects building in a virgin environment
+with only the required dependency.
+As a result, lots of time, libraries and headers under
+.Pa /usr/local
+will be favored over the currently building version.