|
Author: tjp
Date: 02-02-11 02:26
You know what would be really handy is the ability to see what ports require the port shown. This would particularly be helpful when you have a library and want to know who is using it.
Thanks for the great website/service.
|
|
Reply To This Message
|
|
Author: Dan
Date: 02-02-11 23:38
For example, http://www.freshports.org/textproc/libwps/ shows:
Required To Build: devel/doxygen, devel/libtool
Required To Run: misc/gnomehier
Required Libraries: textproc/libwpd
What you'd like to see at devel/libtool is a reference to textproc/libwps.
Do I understand correctly?
--
The Man Behind The Curtain
|
|
Reply To This Message
|
|
Author: tjp
Date: 04-02-11 14:49
Yes, exactly.
If I maintain a library, I would like to know who is using it without having to install every port and use pkg_info.
|
|
Reply To This Message
|
|
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
|
|
Reply To This Message
|
|
Author: tjp
Date: 06-02-11 14:58
I took a look at the proof of concept. You have the new field named as "These ports depend upon this port: for Libraries". What about shortening this to "Required by"?
|
|
Reply To This Message
|
|
Author: Dan
Date: 07-02-11 02:37
We also have: PATCH_DEPENDS FETCH_DEPENDS and EXTRACT_DEPENDS.
Thanks for bf for pointing this out. I shall leave this for another weekend. It should be trivial to add in. It's just code. No database changes.
--
The Man Behind The Curtain
|
|
Reply To This Message
|
|