Jul 082012
 

The FreeBSD ports tree is moving to svn.

FreshPorts is ready. Nearly.

FreshPorts has been processing doc and src commits via svn for some time. Now it’s time for prots.

The first problem to solve: how to resolve the change in pathnames. At present, all files in the ports tree reside under ports/. With the move to svn, they go to head/.

This will not affect end users.

But it does affect FreshPorts.

There are two solutions from what I see now:

  1. rename ports to head within the FreshPorts database
  2. alter the incoming pathnames from head/ to ports/

At first look, either solution will work. I just have to decide which one to do. I will also look at the I do for doc and src.

Here is the first svn commit I did through a test website:

http://dev.freshports.org/commit.php?message_id=201207082200.q68M0qGF018368@svn.chruetertee.ch

As you can see, the filename became /databases/mantis/Makefile instead of /ports/databases/mantis/Makefile. Ignore the links to cvsweb and the mailing list archive; by the nature of this test, they will be invalid.

You will see that the test commit is not listed under databases/mantis. This is because FreshPorts did not recognize the pathname of the files.

Here is the svn commit message in part:

Subject: svn commit: r297406 - head/databases/mantis
X-SVN-Group: ports-head
List-Id: FreeBSD ports head commit mailing list 
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: dvl
Date: Sun Jul  8 22:00:52 2012
New Revision: 297406
URL: http://svn.freebsd.org/changeset/ports/297406

Log:
  Give up maintainer

Modified:
  head/databases/mantis/Makefile

Modified: head/databases/mantis/Makefile
==============================================================================
--- head/databases/mantis/Makefile      Sun Jul  8 21:29:06 2012        (r297405)
+++ head/databases/mantis/Makefile      Sun Jul  8 22:00:52 2012        (r297406)
@@ -11,7 +11,7 @@ CATEGORIES=   databases www
 MASTER_SITES=  SF/${PORTNAME}bt/${PORTNAME}-stable/${PORTVERSION}
 DISTNAME=      mantisbt-${PORTVERSION}
 
-MAINTAINER=    dan@langille.org
+MAINTAINER=    ports@FreeBSD.org
 COMMENT=       A bug tracking system written in PHP
 
 NO_BUILD=      yes

Clearly, the pathname is under head/, and because FreshPorts thinks all port commits are under ports/, it does not associate this commit with a port, let alone the databases/mantis port.

More to come. Conversion day is 14 July. I have to be ready by Saturday or so.

Another example. Compare the files associated with these two commits, the first of which is the test commit, the second of which is from net-im/mikutter


freshports.org=# select *, element_pathname(element_id) from commit_log_elements where commit_log_id = (select id from commit_log where message_id ='201207082200.q68M0qGF018368@svn.chruetertee.ch');
   id    | commit_log_id | element_id | revision_name | change_type |      element_pathname      
---------+---------------+------------+---------------+-------------+----------------------------
 1884635 |        441693 |     435559 | 297406        | M           | /databases/mantis/Makefile
(1 row)

freshports.org=# select *, element_pathname(element_id) from commit_log_elements where commit_log_id = (select id from commit_log where message_id = '201207082201.q68M1deR017796@repoman.freebsd.org');
   id    | commit_log_id | element_id | revision_name | change_type |        element_pathname         
---------+---------------+------------+---------------+-------------+---------------------------------
 1884634 |        441692 |     377886 | 1.9           | M           | /ports/net-im/mikutter/distinfo
 1884633 |        441692 |     377885 | 1.10          | M           | /ports/net-im/mikutter/Makefile
(2 rows)

Obviously, I can’t be putting port commits into two different paths. Either they all go under /ports or they all go under another location. I think ports/ is the right place. In which case, a simple munge of the incoming pathnames will suffice to solve this problem.

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