Nov 012012
 

FreshPorts processes commit emails, updates via svn, then extracts data via make -V. That’s the short of it.

However, stuff goes wrong. And sometimes we can’t update. Or the extract fails. This leaves data in the database which does not reflect what is in the port.

This query, which I was creating tonight, may help me create a page which shows the ports needing refreshing.

    SELECT CLP.commit_log_id,
           CLP.port_id,
           CLP.port_version,
           CLP.port_revision,
           CLP.port_epoch,
           E.name AS port,
           C.name AS category,
           CL.description,
           CL.svn_revision,
           CL.repo_id,
           STF.message
      FROM commit_log_ports CLP 
           JOIN ports P                  ON CLP.port_id       = P.id
           JOIN element E                ON P.element_id      = E.id
           JOIN categories C             ON P.category_id     = C.id
           JOIN commit_log CL            ON CLP.commit_log_id = CL.id
LEFT OUTER JOIN sanity_test_failures STF ON CL.id             = STF.id
     WHERE CLP.needs_refresh <> 0
  ORDER BY category, port;

Sometimes you can’t refresh a port from a given commit. There may be an error in the Makefile, which means that particular svn revision / commit can never be used to refresh the database. In such cases, I need to reset that needs_refresh field to zero. I was planning to create a UI for that… something simple, which showed me the commit message, and the sanity test failure message (if any).

This is the start. I’m just running a refresh now.. I may come back to this later.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive