Bug 250335

Summary: ports-mgmt/portmaster: tries to build devel/git@lite even if devel/git@default is already installed
Product: Ports & Packages Reporter: Martin Birgmeier <d8zNeCFG>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Open ---    
Severity: Affects Only Me CC: fernape, garga, se, tatsuki_makino
Priority: --- Flags: fernape: maintainer-feedback? (se)
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
Part of script script.log sh -x `which \portmaster` -n java/eclipse none

Description Martin Birgmeier 2020-10-14 10:44:42 UTC
- FreeBSD 12.1
- Ports at head
- devel/git is installed
- all other dependencies for java/eclipse are installed (note that java/eclipse depends on devel/git@lite)
- execute "portmaster java/eclipse"

- portmaster tries to build and install devel/git@lite and java/eclipse
- Not unexpectedly, this fails with

----------------------------------- snip -----------------------------------
===>>> eclipse-4.16 >> devel/git@lite (1/1)

===>  Installing for git-lite-2.28.0
===>  Checking if git-lite is already installed
===>   Registering installation for git-lite-2.28.0 as automatic
Installing git-lite-2.28.0...
pkg-static: git-lite-2.28.0 conflicts with git-2.28.0 (installs files into the same place).  Problematic file: /usr/local/bin/git
*** Error code 70

make[1]: stopped in /a/SRC/FreeBSD-ports/head/devel/git
*** Error code 1

make: stopped in /a/SRC/FreeBSD-ports/head/devel/git

===>>> Installation of git-lite-2.28.0 (devel/git@lite) failed
===>>> Aborting update

===>>> Update for devel/git@lite failed
===>>> Aborting update

===>>> You can restart from the point of failure with this command line:
       portmaster <flags> java/eclipse devel/git@lite 

This command has been saved to ~/portmasterfail.txt
----------------------------------- snip -----------------------------------

Expected result:
- portmaster detects that devel/git is already installed and compiles java/eclipse without building devel/git@lite first.

- This might also be a problem in the way flavors are used in the devel/git port. It does not seem they are used quite correctly because different flavors should install into different locations. It does not seem that flavors are intended to distinguish between different default port options as done in that port.

-- Martin
Comment 1 Tatsuki Makino 2020-10-15 04:14:18 UTC
> - devel/git is installed

/usr/bin/which -s git is executed to determine this.
Which line of "depends on executable: git" outside of snip is "- found" or "- not found"?
Comment 2 Tatsuki Makino 2020-10-15 05:37:43 UTC
Created attachment 218750 [details]
Part of script script.log sh -x `which \portmaster` -n java/eclipse

comment #1 had nothing to do with it at all...
So I'll provide a log of script that may be relevant :)
Comment 3 Fernando ApesteguĂ­a freebsd_committer 2020-10-27 08:21:39 UTC
^Triage: notify maintainer