Bug 242086

Summary: ports-mgmt/portmaster: When a port is marked LLD_UNSAFE, portmaster tries to reinstall devel/binutils even if it is already installed
Product: Ports & Packages Reporter: Yasuhiro Kimura <yasu>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed DUPLICATE    
Severity: Affects Some People CC: bapt, rhurlin, se, tatsuki_makino
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Yasuhiro Kimura freebsd_committer freebsd_triage 2019-11-19 21:08:18 UTC
When a port is marked LLD_UNSAFE, devel/binutils is added to BUILD_DEPENDS. And when you try to install/upgrade/reinstall such port, portmaster tries to reinstall devel/binutils even if it is already installed. Following is a example of such cases.

root@maybe[2005]# pkg info -aq | grep binutils                                                                       ~
binutils-2.33.1,1
root@maybe[2006]# portmaster archivers/arj                                                                           ~

===>>> Port directory: /usr0/freebsd/ports/head/archivers/arj

===>>> Launching 'make checksum' for archivers/arj in background
===>>> Gathering dependency list for archivers/arj from ports
===>>> Launching child to install devel/binutils

===>>> archivers/arj >> devel/binutils (1/1)

===>>> Currently installed version: binutils-2.33.1,1
===>>> Port directory: /usr0/freebsd/ports/head/devel/binutils

===>>> Launching 'make checksum' for devel/binutils in background
===>>> Gathering dependency list for devel/binutils from ports
===>>> Initial dependency check complete for devel/binutils

===>>> Continuing initial dependency check for archivers/arj
===>>> Initial dependency check complete for archivers/arj


===>>> archivers/arj >> (1)

===>>> The following actions will be taken if you choose to proceed:
        Install archivers/arj
        Re-install binutils-2.33.1,1

===>>> Proceed? y/n [y] n


===>>> If you would like to upgrade or install some, but not
       all of the above try adding '-i' to the command line.
root@maybe[2007]#
Comment 1 Tatsuki Makino 2019-11-20 09:30:27 UTC
(In reply to Yasuhiro KIMURA from comment #0)

binutils now uses flavor, so it's the same as bug 241227, maybe.
Comment 2 Yasuhiro Kimura freebsd_committer freebsd_triage 2019-11-21 03:33:25 UTC
(In reply to Tatsuki Makino from comment #1)

Thanks. Then I close this bug report as duplicate of bug #241227.

*** This bug has been marked as a duplicate of bug 241227 ***
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-01-21 21:06:00 UTC
A commit references this bug:

Author: se
Date: Tue Jan 21 21:05:20 UTC 2020
New revision: 523745
URL: https://svnweb.freebsd.org/changeset/ports/523745

Log:
  Attempt to fix a problem that leads to repeated building of some ports

  There are build dependencies, that were compiled again and again even
  though the latest version was already installed.

  This fix is based on a patch suggested by Tatsuki Makino, with a small
  change to better comply with the existing style used in this program.

  An extended patch has been provided by Walter Schwarzenfeld, but in my
  tests it did not make a difference. If further testing shows a need for
  the additional commands suggested by Walter, I'll add them (or a variation)
  in a follow-up commit.

  PR:		241227, 242086, 243432
  Submitted by:	Tatsuki Makino
  Approved by:	antoine (implicit)

Changes:
  head/ports-mgmt/portmaster/Makefile
  head/ports-mgmt/portmaster/files/patch-portmaster