Author: Dan
Date: 05-02-11 15:11
The issue I see is how this information is presently stored in the database. For each port, there are three depends fields:
depends_build
depends_run
depends_lib
Each one is a text field. For example, the depends_run field contains the output of the 'make -V RUN_DEPENDS' command. Going back to our previous example, libtool, the data stored for textproc/libwps is:
freshports.org=# SELECT depends_build FROM ports_active WHERE name = 'libwps';
depends_build
------------------------------------------------------------------------
doxygen:/usr/ports/devel/doxygen libtool>=2.2:/usr/ports/devel/libtool
(1 row)
freshports.org=#
As you can see, this is a multi-value field; there are two depends in there: doxygen and libtool. That design decision is what is stopping us from quickly and easily implementing your request.
What is needed is a cross reference table, which references the dependent port from the depending port. Something such as:
depending_port_id int
dependent_port_id int
dependency_type char(1)
Where:
depending_port_id points to libwps
dependent_port_id points to libtool
dependency_type is 'B' for build
There would be a similar entry for doxygen:
depending_port_id points to libwps
dependent_port_id points to doxygen
dependency_type is 'B' for build
This table could be maintained through triggers. Each time a port is changed, this table would be updated.
Suggestion welcome. Consider alternative solutions, field names, etc. It's early in my day and I may not be thinking clearly. ;)
--
The Man Behind The Curtain
|
|