FreshPorts -- The Place For Ports If you buy from Amazon USA, please support us by using this link.
Follow us
Blog
Twitter

I am looking for an LTO tape library. Do you have one to spare?
Website Feedback
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Re: Feature Request: upstream dependents
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  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 Feature Request: upstream dependents   new
tjp 02-02-11 02:26 
 Re: Feature Request: upstream dependents   new
Dan 02-02-11 23:38 
 Re: Feature Request: upstream dependents   new
tjp 04-02-11 14:49 
 Re: Feature Request: upstream dependents   new
Dan 05-02-11 15:11 
 Re: Feature Request: upstream dependents   new
Dan 05-02-11 17:32 
 Re: Feature Request: upstream dependents   new
tjp 06-02-11 14:58 
 Re: Feature Request: upstream dependents   new
Dan 06-02-11 13:03 
 Re: Feature Request: upstream dependents   new
tjp 06-02-11 15:02 
 Re: Feature Request: upstream dependents   new
Dan 06-02-11 15:16 
 But wait! There's more.   new
Dan 07-02-11 02:37 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.


Servers and bandwidth provided by
New York Internet, SuperNews, and RootBSD
Valid HTML, CSS, and RSS.
Copyright © 2000-2014 Dan Langille. All rights reserved.