[MacPorts] #60754: Reclaim removes build dependencies

MacPorts noreply at macports.org
Thu Nov 16 10:37:37 UTC 2023


#60754: Reclaim removes build dependencies
-----------------------+--------------------
  Reporter:  haberg-1  |      Owner:  (none)
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:
Resolution:            |   Keywords:
      Port:            |
-----------------------+--------------------

Comment (by CodingMarkus):

 Replying to [comment:1 ryandesign]:
 > Presumably reclaim is designed to remove build dependencies since they
 are not needed after the port has been built. From the list you showed,
 cmake, flex, gmake, and pkgconfig definitely fall into that category. But
 if you then upgrade ports and need to build them from source, build
 dependencies will again be needed and will be reinstalled. This is as
 designed

 In that case the whole thing is "broken by design" because that's not a
 meaningful behavior whatsoever. Nobody has any advantage, if packets gets
 constantly removed just to have all of them re-installed whenever he runs
 `port upgrade outdated`. This only makes upgrading more of a pain and will
 take way longer, just to save a few couple of megabytes in between
 upgrades.

 If something has a broken design, that's a defect as well. Software
 developers cannot use "but it works like designed" as an excuse if the
 design itself is broken. Otherwise I could make an app that always
 destroys your entire system if you click a specific button and when people
 complain I say "no, that's fine, that's how I designed that button". But
 it's not fine, since such a button shouldn't even exist, nobody wants such
 a button, nobody has any use for such a button, the defect in that case is
 the sole existence of the button or what it does, regardless if it works
 as intended by the developer.

 Packets should always list build and run dependencies and both should
 prevent `reclaim` from removing the packet. Also port should remember for
 all installed packets if that packet was built from source or not. If not,
 and only if not, it can ignore its built dependencies. These two are the
 only required changes. If build dependencies change with upgrades or if a
 packet switches from building to pre-built or the other way round, this
 will all would sort out correctly without any additional changes to that.
 Just have port remember if a packet was built and have reclaim treat build
 dependencies as run dependencies in case it was. I'm pretty sure nobody
 will ever oppose that behavior and if that really happens, you can still
 add a flag to reclaim to ignore build dependencies if that's really what
 the user wants.

-- 
Ticket URL: <https://trac.macports.org/ticket/60754#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list