Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2021 20:25:13 +0200
From:      Stefan Esser <se@freebsd.org>
To:        Alexey Dokuchaev <danfe@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: 00e15405660f - main - textproc/html2text: Update CONFLICTS
Message-ID:  <7e5125f5-2e8d-5be7-3b0c-bb4401a3c58d@freebsd.org>
In-Reply-To: <YXkVJfKXVfb%2BzYR9@FreeBSD.org>
References:  <202110270841.19R8fLH2046856@gitrepo.freebsd.org> <YXkVJfKXVfb%2BzYR9@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------fPdo7sxi5sIr0q8iS0Pyr0lw
Content-Type: multipart/mixed; boundary="------------bOevl04XRhB2MajMQ40OzFLV";
 protected-headers="v1"
From: Stefan Esser <se@freebsd.org>
To: Alexey Dokuchaev <danfe@freebsd.org>
Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org,
 dev-commits-ports-main@freebsd.org
Message-ID: <7e5125f5-2e8d-5be7-3b0c-bb4401a3c58d@freebsd.org>
Subject: Re: git: 00e15405660f - main - textproc/html2text: Update CONFLICTS
References: <202110270841.19R8fLH2046856@gitrepo.freebsd.org>
 <YXkVJfKXVfb+zYR9@FreeBSD.org>
In-Reply-To: <YXkVJfKXVfb+zYR9@FreeBSD.org>

--------------bOevl04XRhB2MajMQ40OzFLV
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Am 27.10.21 um 11:00 schrieb Alexey Dokuchaev:
> On Wed, Oct 27, 2021 at 08:41:21AM +0000, Stefan E??er wrote:
>> commit 00e15405660fffeb44772bd58ff17e841d71729b
>>
>>   textproc/html2text: Update CONFLICTS
>>  =20
>>   The CONFLICTS definition did only match conflicting packages built
>>   for Python-2.7, not for later Python versions.
>>  =20
>>   I have not checked whether CONFLICTS_INSTALL would suffice as used
>>   in the conflicting ports. The PORTREVISION has not been bumped since=

>>   this parameter is relevant for port building, less so for installing=

>>   from a package (which detects the conflicting files).
>=20
> Somewhat surprisingly, CONFLICTS are not recorded in package manifests;=

> given the existence of `pkg_conflicts' table in /var/db/pkg/local.sqlit=
e
> which is always empty, it was probably planned, but never implemented.

Yes, a few parameters have been prepared for inclusion in the manifests,
but not implemented.

The pkg query command compares the file list with the list of installed
files registered in the package database. Additional conflicts checks
based on package names could somewhat reduce the cycles spent in the
(unlikely) case of a conflict, but the file collision check will have
to be performed anyway, therefore there is little gain to be had ...

>> ...
>> -CONFLICTS=3D	py27-html2text-[0-9]*
>> +CONFLICTS=3D	py*-html2text-[0-9]*
>=20
> I recal, last time I've tried to specify a conflict without the -[0-9]*=

> suffix and it worked as expected.  Are those really necessary in defaul=
t
> "all versions" case?

Yes, I have considered scanning all ports for redundant -[0-9]* endings
of CONFLICTS entries.

The test performed is (with pkgbase=3D"%n", pkgname=3D"%n-%v"):

 fnmatch(conflicts_pattern, pkgbase) ||=C2=A0fnmatch(conflicts_pattern, p=
kgname)

(This assumes that the -g option is used, exact matches or re-matches are=

also possible, but the conflicts checks use a file glob match.)

Only if the package name without version number matches the pattern (with=

implicit anchor at the begin and end of the pattern), an attempt is made =
to
match the full package name with version.

Another clean-up that could be made is to match CONFLICTS entries of all
ports against each other.

There are cases where port A is specified to conflict with port B, but th=
e
reverse direction is not specified. And quite a few CONFLICTS specificati=
ons
should actually be CONFLICTS_INSTALL. But it takes a lot of work to check=

whether there really is a build conflict for each of the combinations ...=


Not supported is a CONFLICT of the type "conflicts with installed package=
"
to specify that a package has to be de-installed before a new version can=

be built on the base system (e.g. because header files in $LOCALBASE are
used in preference of the new version's headers in the port's sources).

Currently no conflicts are detected between ports that are built from the=

same port directory. This makes entries that are meant to protect against=

attempts to install a conflicting flavor of a port void.

E.g. the different flavors of the devel/git port (default, lite, svn, ...=
)
conflict with each other, but this is not detected by the framework since=

they are all built from devel/git and conflicts between ports built from
the same port directory are suppressed in bsd.port.mk. (I have a review
open that fixes that issue, see https://reviews.freebsd.org/D31151 ).

The reason for the same-origin exclusion is that there was a time when th=
e
different flavors could have identical basenames (e.g. py-setup-... for a=
ll
packages, while now py36-setup-..., py37-setup-... etc. are enforced).

Regards, STefan

--------------bOevl04XRhB2MajMQ40OzFLV--

--------------fPdo7sxi5sIr0q8iS0Pyr0lw
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmF5mYkFAwAAAAAACgkQR+u171r99UTd
Tgf/bTODwvMOgGr1Z6chdiv625rXWGxsG102WDVc8KfUN0iU5MpYHHH2Twrhino84xrExMehwli0
7864ybY1CC2uZead2tywGwbK/sI8bKCdkSIl6P23TQhSBMtC8cQJKmlDWb+Gv892/QcgbfXtP5Qh
tBBSCJuWxjO9nwSTllS1QRMlX7jdjZ301zFs7W40CtN2B7e5PEOC2wQCVum8hAcUo5A3v3zNHDM0
7i5EZ98tYH6Lh9FOF6rT4OBrYRJHCtmQ7Fy6rm3GS6IU3MMJrRhCHEgmmRgEHveTwyRamsX3knJ+
MvmKfz8OJ3TDpyoIeOf9j0kECW8nmcFFTO5P8EJDGA==
=wFpO
-----END PGP SIGNATURE-----

--------------fPdo7sxi5sIr0q8iS0Pyr0lw--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7e5125f5-2e8d-5be7-3b0c-bb4401a3c58d>