Bug 263807 - [PATCH] Add 2 checks to portlint (PKGBASE, FLAVORS)
Summary: [PATCH] Add 2 checks to portlint (PKGBASE, FLAVORS)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Joe Marcus Clarke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-06 07:12 UTC by Stefan Eßer
Modified: 2022-07-17 15:39 UTC (History)
0 users

See Also:


Attachments
Add PKGBASE and FLAVOR checks (2.22 KB, patch)
2022-05-06 07:12 UTC, Stefan Eßer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Eßer freebsd_committer freebsd_triage 2022-05-06 07:12:26 UTC
Created attachment 233757 [details]
Add PKGBASE and FLAVOR checks

In a discussion with members of the port managers team (tcberner, rene) the issue of conflicting package base names came up.

I have offered to create portlint checks for 2 possible Makefile issues:

1) Conflicting use of ${PKGBASE} of an existing port.

2) Multiple flavors resulting in the same ${PKGBASE}.

The attached patch adds checks for both possible issues:

1) Check for the existence of the new PKGBASE in the INDEX file (if present) and warn if it is used for a different ORIGIN.

2) Generate PKGBASE for all FLAVORS and check for duplicates.
Comment 1 Joe Marcus Clarke freebsd_committer freebsd_triage 2022-05-15 20:00:21 UTC
Committed to my git repo pending the next release.  Thanks!
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2022-07-17 15:38:55 UTC
Sorry, se.  I have another pending bit of work to do, and I thought I'd crack it more quickly.  It's still eating up my time, but I didn't want to keep sitting on this.  I've committed this to 2.19.12.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-07-17 15:39:22 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=415d07a06fc5429d9d3630166b99b33219150d02

commit 415d07a06fc5429d9d3630166b99b33219150d02
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2022-07-17 15:37:21 +0000
Commit:     Joe Marcus Clarke <marcus@FreeBSD.org>
CommitDate: 2022-07-17 15:37:21 +0000

    ports-mgmt/portlint: Update to 2.19.12

    In a discussion with members of the port managers team (tcberner, rene) the issue of conflicting package base names came up.

    I have offered to create portlint checks for 2 possible Makefile issues:

    1) Conflicting use of ${PKGBASE} of an existing port.

    2) Multiple flavors resulting in the same ${PKGBASE}.

    The attached patch adds checks for both possible issues:

    1) Check for the existence of the new PKGBASE in the INDEX file (if present) and warn if it is used for a different ORIGIN.

    2) Generate PKGBASE for all FLAVORS and check for duplicates.

    PR:             263807

 ports-mgmt/portlint/Makefile        |  2 +-
 ports-mgmt/portlint/src/portlint.pl | 42 +++++++++++++++++++++++++++++++++++--
 2 files changed, 41 insertions(+), 3 deletions(-)