Bug 220337

Summary: www/yarn: conflicts with devel/hadoop2
Product: Ports & Packages Reporter: hakan
Component: Individual Port(s)Assignee: Luca Pizzamiglio <pizzamig>
Status: Closed FIXED    
Severity: Affects Only Me CC: demon, pizzamig, w.schwarzenfeld
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: luca.pizzamiglio: maintainer-feedback+
koobs: maintainer-feedback? (demon)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
URL: https://github.com/yarnpkg/yarn/issues/673

Description hakan 2017-06-28 13:34:11 UTC
If devel/hadoop2 is already installed on the system, www/yarn will fail to install:

Installing yarn-0.24.6...
pkg-static: yarn-0.24.6 conflicts with hadoop2-2.7.2_2 (installs files into the same place).  Problematic file: /usr/local/bin/yarn
*** Error code 70

Since yarn 0.16 the alternative alias /usr/local/bin/yarnpkg should be available.

Here is the already closed upstream issue: https://github.com/yarnpkg/yarn/issues/673
Comment 1 luca.pizzamiglio 2017-07-02 23:00:31 UTC
Hi Hakan,

thanks for reporting.

On Mac, the alias is a solution because the two "yarn" are installed in different places.

Here there is a conflict, one "yarn" would overwrite the other one.
The solution is not trivial, but I'll figure out something.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2017-07-03 05:24:36 UTC
Pending maintainer feedback and patch.

In the meantime a CONFLICTS_INSTALL can be set.

Assign demon@ accordingly (maintainer of conflicting port, and committer)
Comment 3 Dmitry Sivachenko freebsd_committer freebsd_triage 2017-07-03 07:40:41 UTC
okay, I registered a conflict until better solution is found.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-07-03 07:40:44 UTC
A commit references this bug:

Author: demon
Date: Mon Jul  3 07:40:17 UTC 2017
New revision: 444916
URL: https://svnweb.freebsd.org/changeset/ports/444916

Log:
  Register conflict with hadoop2 and www/yarn because of bin/yarn binary until
  better solution is found.

  PR:		220337
  Submitted by:	hakan@siktas.com

Changes:
  head/devel/hadoop2/Makefile
  head/www/yarn/Makefile
Comment 5 luca.pizzamiglio 2017-07-08 10:38:57 UTC
This is how would solve the issue.

#1 Adding an option to www/yarn, to optionally install yarn (default: yes)
#2 Adding a new port (name to be defined, like www/yarn-compat), with the option set to no

Basically, the new port is a FLAVOR of www/yarn, but AFAIK FLAVOR support is not yet present.

I'd like to have some feedback, before to start
Comment 6 Walter Schwarzenfeld 2018-01-16 10:34:51 UTC
Seems fixed. Could this closed.