Re: [MacPorts] #5063: RFE: sped up dependency searching and added dependent finding
#5063: RFE: sped up dependency searching and added dependent finding ------------------------------------+--------------------------------------- Reporter: erickt@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: Resolution: fixed | Keywords: Port: | ------------------------------------+--------------------------------------- Changes (by jmr@…): * cc: erickt@… (added) * status: new => closed * resolution: => fixed Old 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
New 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 -- Comment: It looks like everything applicable here has been done. -- Ticket URL: <http://trac.macports.org/ticket/5063#comment:23> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts