Bug 234807 - ports-mgmt/pkg does not respect CONFLICTS_INSTALL
Summary: ports-mgmt/pkg does not respect CONFLICTS_INSTALL
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks: gitlab_config
  Show dependency treegraph
 
Reported: 2019-01-09 22:01 UTC by Matthias Fechner
Modified: 2021-09-14 15:40 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fechner freebsd_committer freebsd_triage 2019-01-09 22:01:21 UTC
If you mark in a port some other port as conflicts, pkg does not handle this.
This makes it possible to have conflicting ports installed which e.g. overwrite file on runtime of these application.

One example is www/gitlab-ce and devel/gitolite.
Both of them are writing to a file /usr/local/git/.ssh/authorized_keys if the application is used.

As this conflict happens at runtime it is crucial that pkg respect the CONFLICT defitintion while installing packages.
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2019-04-19 12:41:33 UTC
pkg does automatically figure out those conflict making CONFLICT_INSTALL useless.

There is no need to do anything but let pkg figure it out
Comment 2 Li-Wen Hsu freebsd_committer freebsd_triage 2020-07-03 16:52:34 UTC
I think what mfechner@ means is the conflict happens at the run time, not during the install time so pkg will not know about it.  Having a way to manually mark the ports conflict (carefully) might be a good idea.
Comment 3 Mathieu Arnold freebsd_committer freebsd_triage 2020-07-06 15:18:19 UTC
For those two ports, they only conflict if you try to use them at the same time, which nobody will.
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2021-08-17 17:12:09 UTC
do you have an example of such ports? with real conflicts at runtime?
Comment 5 Matthias Fechner freebsd_committer freebsd_triage 2021-08-18 08:41:53 UTC
yes, it is in the problem description:
One example is www/gitlab-ce and devel/gitolite
Comment 6 Baptiste Daroussin freebsd_committer freebsd_triage 2021-08-21 05:01:37 UTC
in this case I don't think pkg should handle the conflict, this is up to the administrator to do it. the administrator can configure both to use a .ssh/authorized_keys elsewhere. dealing with the conflicts, will probably solve an issue for 2 administrators, but will for sure be painful for most others.