Bug 243432 - ports-mgmt/portmaster: always recompiles binutils even if already up-to-date
Summary: ports-mgmt/portmaster: always recompiles binutils even if already up-to-date
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Stefan Esser
Depends on:
Reported: 2020-01-18 16:41 UTC by Martin Birgmeier
Modified: 2020-01-23 16:46 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (se)

patch-portmaster-flavors (16.20 KB, patch)
2020-01-19 06:24 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2020-01-18 16:41:25 UTC
- Building ports using portmaster

- If there is a dependency on binutils, the latter always gets rebuilt even if it is up to date.
- The same seems to be the case for py-sphinx and possibly other ports (maybe gperf)

Expected result:
- portmaster should not rebuild a port if it is up-to-date

Maybe this is the case because the BUILD_DEPENDS+= line in ports/Mk/... includes the full path to the desired executable (i.e., "${LOCALBASE}/...")?

-- Martin
Comment 1 Walter Schwarzenfeld freebsd_triage 2020-01-19 06:24:21 UTC
Created attachment 210855 [details]

Please, try this patch. (Only tested quick with a few ports - binutils, gcc9, cmake).
Comment 2 Martin Birgmeier 2020-01-19 08:55:58 UTC
Just trying this now, first with the unpatched and now with the patched version of portmaster, and it seems to work - the unpatched version again tried to recompile binutils, the patched version does not.

So thanks!

-- Martin
Comment 3 commit-hook freebsd_committer 2020-01-21 21:06:03 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

  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)

Comment 4 Walter Schwarzenfeld freebsd_triage 2020-01-22 23:46:58 UTC
Seems to work after ports r523835.
Comment 5 Martin Birgmeier 2020-01-23 16:46:48 UTC
Thank you for committing the fix, it seems to work!

-- Martin