From nobody Sat Apr 23 06:30:51 2022 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C34D6198E668 for ; Sat, 23 Apr 2022 06:30:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KlhHH527jz3C0W; Sat, 23 Apr 2022 06:30:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650695451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WyAk0EUgNoXVY9PjZawavvYwzKTW9VQmaAKuZ9/Pk+s=; b=ysOTEmZQU4stiSurwcxBxAhxaL+XL7q9yCWYNSKB86GiMMmmCTT2Y2Ea1rK8r26wU/a8F9 IfYLCK50KmYfqVhoXGKM7jXQeYzX+VCfEOP53iWGuk5uDyqlAbPU2y9ZIRKEph30aEMQ9G kMa5m95JnHtQO7vEkSnH9x2FGC2PJV/ywL6BMjpcXrvJp/atPggFa7zCNSk/XNS4K+17Di cpNg0VS/lSYM9sfruq8gGrLtBfEC0MnDSzXvxsJvjsOJzdKMFTUyiMreUUxVcMZLw9w5+t HF79e/uhkNElh88OezbjKwqhLWUVP1jmQtSag6lAz5gfHuHTmGs1Lse5Imf1tA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A2E04C9C; Sat, 23 Apr 2022 06:30:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23N6UpIn010324; Sat, 23 Apr 2022 06:30:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23N6UpsO010323; Sat, 23 Apr 2022 06:30:51 GMT (envelope-from git) Date: Sat, 23 Apr 2022 06:30:51 GMT Message-Id: <202204230630.23N6UpsO010323@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 7778c983ab - main - porters-handbook: clarify semantics of CONFLICTS* definitions List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7778c983ab0d812ae30ea95d617bc7316797be80 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650695451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WyAk0EUgNoXVY9PjZawavvYwzKTW9VQmaAKuZ9/Pk+s=; b=alGYSMHIq6kjx6qRqAZKivZlHviQevGG+Zgb9xSJ9FEIF5V+YFwPE47Fk/4KflpFqhwMJY uxofrOlsRpNfTfmAzNr7aD6mwGxyyMNxpbX1FsatGrBVAYoaYaJYo0B5tr4ecprOJeEYf2 PWjsEc2PVWOiFzKIM6UOkuWLYFNWpowXt7YCq5Z/m0OCt+Q7p0LDvoH8SzDVTfij0ig58G VVaeesQGQVO9PhwYVgv7I5hT1k+1VJKj6DCK0tkBLuHXKKtXuxOBIwWz9oImq8l8M7ZPtG 6tU1+AHBJuYOAy/2PxLBdYWVIW+A+KIfdLwcNIfSIHRQSTI53eMVhSjtqP3epg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650695451; a=rsa-sha256; cv=none; b=hyVEnmuAdYbtF5UEEq+A8bQ0WWPnTHrUcOuzumIntNja31+5Rwd/PlHuokNrHLRTeI5rhe UHFepLASc4NQ4m7SeySZQAfX4aDcjdIflSmcUjJxRe/cUPvUvH4SoYct7zxqDXDAz/Iykw 4t1S4xX2C+pkqejLFdLWqPMIPOPlxzS82h1DNH5eZO37FG19xJTfOvcLbBcmVCjuVvuy1s zabxXwLBEAvdnvihv3Ft5Z/i85Wvm60x3xjL9B3nKAY9UIv16CD3EEf3zwHlZO57RoZklO Ld+Yxn1uLTTcBZHr8HuQxpiP03DIVztw57UeMZluXf9JbkUIoAjy0EwGcqcVNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se (ports, src committer): URL: https://cgit.FreeBSD.org/doc/commit/?id=7778c983ab0d812ae30ea95d617bc7316797be80 commit 7778c983ab0d812ae30ea95d617bc7316797be80 Author: Stefan Eßer AuthorDate: 2022-04-23 06:18:23 +0000 Commit: Stefan Eßer CommitDate: 2022-04-23 06:18:23 +0000 porters-handbook: clarify semantics of CONFLICTS* definitions There has been some confusion about the correct specification of CONFLICTS definitions in port Makefiles. The examples hint at the correct use of the package base name when possible (i.e. no version check required), but there were quite a few definitions that included unneccessary wild-card patterns to match all versions. Since I had to explain the semantics by mail to several maintainers after fixing up stale or incorrect definitions and since I received a request to clarify the semantics of CONFLICTS definitions, I have created a new section that explains the correct use. After having the change available for review for 2 months without any reaction of the assigned reviewers and since the next round of CONFLICTS fixes is likely to result in many requests to explain the correctness of the changes performed, I'm committing this text now. Differential Revision: https://reviews.freebsd.org/D34352 --- .../en/books/porters-handbook/makefiles/_index.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/documentation/content/en/books/porters-handbook/makefiles/_index.adoc b/documentation/content/en/books/porters-handbook/makefiles/_index.adoc index 8c423ed961..2b4759731a 100644 --- a/documentation/content/en/books/porters-handbook/makefiles/_index.adoc +++ b/documentation/content/en/books/porters-handbook/makefiles/_index.adoc @@ -4999,6 +4999,21 @@ Build conflicts are not recorded in the resulting package. If the port cannot be built if a certain port is already installed and the resulting package cannot coexist with the other package. `CONFLICTS` check is done prior to the build stage and prior to the install stage. +The values assigned to the `CONFLICTS*` variables are matched against the package base names and the full package names of all installed packages using file globbing rules. +If the base name of the currently built package is matched by a `CONFLICTS*` pattern, this match is ignored. +This allows to list all flavors of a port in a conflicts list, without being considered if the installed port matching this pattern is upgraded. +For example, if git-lite is installed, `CONFLICTS_INSTALL=git git-lite` would allow to perform: +[source,shell] +.... +% make -C devel/git FLAVOR=lite all deinstall install +.... + +But the following command would report a conflict, since the package base name installed is `git-lite`, while `git` would be built, but cannot be installed in addition to `git-lite`: +[source,shell] +.... +% make -C devel/git FLAVOR=default all deinstall install +.... + The most common content of one of these variable is the package base of another port. The package base is the package name without the appended version, it can be obtained by running `make -V PKGBASE`.