Bug 230067 - CONFLICTS_BUILD=${PKGBASE} doesn't work
Summary: CONFLICTS_BUILD=${PKGBASE} doesn't work
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-26 18:39 UTC by Yuri Victorovich
Modified: 2018-07-27 07:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
> CONFLICTS_BUILD=        ${PKGBASE}
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:

https://www.freebsd.org/doc/en/books/porters-handbook/conflicts.html#conflicts-ex2
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
> CONFLICTS_BUILD=        ${PKGBASE}
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)