Bug 230067

Summary: CONFLICTS_BUILD=${PKGBASE} doesn't work
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: New ---    
Severity: Affects Only Me CC: emaste, ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Yuri Victorovich freebsd_committer 2018-07-26 18:39:51 UTC
Some ports conflict with themselves. New versions use installed headers/libraries of their own previous versions, and break.

The statement
should be able to at least prevent the confusion, but this statement has no effect for some reason. (I tried it on databases/sqlitestudio.)

Could you please fix it?
Comment 1 Mathieu Arnold freebsd_committer 2018-07-27 07:26:40 UTC
A port cannot conflict with all versions of itself.

If a port conflicts with previous versions of itself, it should be possible to write a *correct* CONFLICTS_BUILD using globs, like this:

Comment 2 Yuri Victorovich freebsd_committer 2018-07-27 07:34:29 UTC
(In reply to Mathieu Arnold from comment #1)

In databases/sqlitestudio, I tried
> CONFLICTS_BUILD=        ${PKGBASE}-3.1.1
> CONFLICTS_BUILD=        ${PKGBASE}-3.1.[0-3]*
> CONFLICTS_BUILD=        ${PKGBASE}-3.1.1_5

none of them work when the previous version sqlitestudio-3.1.1_5 is installed.
Comment 3 Yuri Victorovich freebsd_committer 2018-07-27 07:36:16 UTC
It should be just
because it is meaningless to build when it grabs installed libs instead of freshly built ones.
Comment 4 Mathieu Arnold freebsd_committer 2018-07-27 07:45:50 UTC
It is also possible that PKGBASE is created to late for conflicts handling.  As there is little chance "sqlitestudio" to change you should probably use a litteral instead of a variable.
Comment 5 Baptiste Daroussin freebsd_committer 2018-07-27 07:52:43 UTC
the only way that syntax can ever work would be to append it after the last inclusion of bsd.port.mk which in anycase would be ugly (and not sure it will work)

In general ports that are conflicting with themselves mean they have buggy build system, usually meaning they messup with some flags (CFLAGS, CPPFLAGS or LDFLAGS depending on the failure).

They should be fixed in the ports tree (and then upstream) rather than mark as self conflicting (of course it is not always that easy, but most of the time it is doable)