Opened 19 years ago

Last modified 14 years ago

#5063 closed enhancement

sped up dependency searching and added dependent finding — at Initial Version

Reported by: erickt@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version:
Keywords: Cc:
Port:

Description

Hello All,

I whipped up a little patch to darwinports to figure out what packages depend on a particular port (opposite to the deps command). This allows some nice things. In addition, I've added a mode -R to the upgrade command that if specified, should rebuild all of the ports that depend on the one we're upgrading. I could also see having something similar to be added to the uninstall, but I haven't gotten around to that yet.

Finally, in order to make this usable, I had to speed up the loading of the portindex file. Previously, each time you did a dportsearch, each source file would have to be walked. Since I have to build a list of all the dependencies, I had to walk each file for each installed port. So to optimize this, I read each file once, and throw all the results into an array. All my testing appeared that this provided the same functionality, but I'm not sure if some other command modifies these files while port is running, so it'd break that functionality.

I've attached diffs for port.tcl and darwinports.tcl. Thanks!

-e

Change History (2)

Changed 19 years ago by erickt@…

Attachment: port.tcl.diff added

update for port/port.tcl against the latest head release

Changed 19 years ago by erickt@…

Attachment: darwinports.tcl.diff added

diff against latest head release of darwinports/darwinports.tcl

Note: See TracTickets for help on using tickets.