database tables for VuXML

Dan Langille dan at langille.org
Wed Aug 25 13:12:25 PDT 2004


On 25 Aug 2004 at 13:58, Jacques Vidrine wrote:

> > FreshPorts stores PORTVERSION and PORTREVISION as separate text
> > fields.  I take it that the ranges equations should compare only
> > PORTVERSION and ignore PORTREVISION.
> 
> One can think a version number as a tuple as follows (most significant 
> first):  (PORTEPOCH, PORTVERSION, PORTREVISION).  Comparisons are done 
> on these tuples.

Oh, PORTEPOCH is first?  Why?  Shouldn't it be last?  Here is the 
value forumula from bsd.port.mk

PKGNAME=        ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-
${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}

where _SUF2=  ,${PORTEPOCH}

> > My plan is to populate empty the vuxml_* tables each time there is a
> > commit to the data file.  This keeps the vuxml system totally
> > separate from FreshPorts.
> >
> > Each row under Commit History (e.g.
> > http://beta.freshports.org/sysutils/bacula/) relates to a row from
> > the commit_log_ports table.  That looks something like this:
> >
> > create table commit_log_ports
> > (
> >     commit_log_id      integer               not null,
> >     port_id            integer               not null,
> >     needs_refresh      smallint              not null,
> >     port_version       text                          ,
> >     port_revision      text                          ,
> >     primary key (commit_log_id, port_id)
> > );
> 
> You'll need a `port_epoch' here as well.  So these get created as 
> commits "come in"?

Yes, for each commit, a row is added to the commit_log table.  For 
each port in a commit, a row is added to the commit_log_ports table.

In addition to PORTEPOCH, I think I need to add:

   NO_LATEST_LINK
   NO_PACKAGE

I may also want to add PKGNAME
-- 
Dan Langille : http://www.langille.org/



More information about the freebsd-ports mailing list