Repo copies are evil. What are repo copies? A repo copy occurs when you move things around in the repository manually. For example, this commit contains a lot of repo copy work. Ports are being moved from their current category to a new category, ports-mgmt. The original files in the CVS repository are manually moved to the new location. This is done to preserve the history of the port.
FreshPorts acts on commits. And only commits. There is no commit in a repo copy. This means FreshPorts does not know about the files which were moved manually. The result: incomplete port descriptions, no links to home pages, etc. FreshPorts knows that the port moved, because of entries in MOVED. It records those ports in the old and new home page of the affected ports.
In this case, Matthew Seaman (who contributed most of the FreshPorts code that parses the vuxml updates) contacted me regarding a problem he saw with ports-mgmt/p5-FreeBSD-Portindex. Specifcally, the Main Web Site link (i.e. home page) was missing. I checked. Sure enough. It wasn’t there. It was there on the old port, but not in its new location. Not only that, the port description was missing… It was a mostly blank port.
- refresh my local copy of the ports tree
- mark those commits as needing a refresh
- refresh those ports
Step 1 was done some time ago. This was an old commit (nearly a month ago).
Step 2 involved SQL. Here it is:
UPDATE commit_log_ports SET needs_refresh = 7 WHERE commit_log_id = (select id from commit_log where message_id = '200702050108.l1518kVE067273@repoman.freebsd.org') AND port_id in ( SELECT CLP.port_id FROM commit_log_ports CLP, ports_active P WHERE CLP.commit_log_id = (select id from commit_log where message_id = '200702050108.l1518kVE067273@repoman.freebsd.org') AND CLP.port_id = P.id );
52 ports were affected.
Refreshing them through an existing script took a few minutes: perl refresh-unrefreshed-ports.pl
I’m thinking about how best to handle this situation. I think the processing of MOVED should refresh the destination port. This refresh cannot be done until after a complete cvsup of the local ports tree. Perhaps it is time to ask for access to cvsup-master…