git: 52ddb47afcc7 - main - ports-mgmt/portlint: remove "conflicts with itself"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 11 Mar 2022 20:36:57 UTC
The branch main has been updated by se: URL: https://cgit.FreeBSD.org/ports/commit/?id=52ddb47afcc7645fc42a53661fc6fed99a57dc29 commit 52ddb47afcc7645fc42a53661fc6fed99a57dc29 Author: Stefan Eßer <se@FreeBSD.org> AuthorDate: 2022-03-11 20:06:24 +0000 Commit: Stefan Eßer <se@FreeBSD.org> CommitDate: 2022-03-11 20:06:24 +0000 ports-mgmt/portlint: remove "conflicts with itself" The warning about a CONFLICTS entry matching the package being built is bogus - the ports system excludes the port being built from the list of conflicts that is reported by "make list-install-conflicts" and the other targets that check for conflicts. It is in fact quite useful to specify CONFLICTS with wildcards that include the port being built instead of explicitly listing all other versions (e.g. in case of the mysql or mariadb ports - it is possible to use mysql[0-9][0-9]-client for example in the mysql57-client port instead of complex patterns like "mysql5[56]-client mysql80-client" in an attempt to not match the "57"). Since I'm fixing CONFLICTS entries in a large number of ports and want to use wildcards as explained above to simplify the entries and to reduce the maintenance effort (often are CONFLICTS entries stale when new versions of e.g. mysql are imported). The bogus portlint messages let maintainers think that the wildcards need to be adjusted to prevent this "self conflict", leading them to put back the unnecessarily complex patterns. The author of portlint has not provided any kind of response to my request to remove the misleading output sent more than 6 weeks ago. Due to a maintainer time-out I'm removing the bogus message. The test and print command are commented out in order to only apply the minimal change required. The version number is unchanged since I do not want to introduce a version that does not exist in the upstream sources, but a portrevision is added to enforce the creation of an updated package in the official repository. --- ports-mgmt/portlint/Makefile | 1 + ports-mgmt/portlint/src/portlint.pl | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index bda2fb9402fe..103f454493be 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -2,6 +2,7 @@ PORTNAME= portlint PORTVERSION= 2.19.10 +PORTREVISION= 1 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index 5f6240beae9b..6faf2ebd8404 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -2994,12 +2994,13 @@ DIST_SUBDIR EXTRACT_ONLY my %seen; foreach my $conflict (split ' ', $conflicts) { if (not $seen{$conflict}) { - `$pkg_version -T '$makevar{PKGBASE}' '$conflict' || $pkg_version -T '$makevar{PKGNAME}' '$conflict'`; - my $selfconflict = !$?; - if ($selfconflict) { - &perror("FATAL", "", -1, "Package conflicts with itself. ". - "You should remove \"$conflict\" from CONFLICTS."); - } elsif ($conflict =~ m/-\[0-9\]\*$/) { +# `$pkg_version -T '$makevar{PKGBASE}' '$conflict' || $pkg_version -T '$makevar{PKGNAME}' '$conflict'`; +# my $selfconflict = !$?; +# if ($selfconflict) { +# &perror("FATAL", "", -1, "Package conflicts with itself. ". +# "You should remove \"$conflict\" from CONFLICTS."); +# } elsif ($conflict =~ m/-\[0-9\]\*$/) { + if ($conflict =~ m/-\[0-9\]\*$/) { &perror("WARN", $file, -1, "CONFLICTS definition \"$conflict\" ". "ends in redundant version pattern. ". "You should remove \"-[0-9]*\" from that pattern.");