Ports freeze

Vladimir Chukharev wrote in to mention a problem with the ports freeze. FreshPorts usually puts up a notice indicating a Ports Freeze is in effect when the freeze is inacted. This freeze is effected by making a special change to CVSROOT/approvers.

FreshPorts looks for this change and sets a flag. The website notices this flag and adds a notice to every webpage.

It took me a couple of hours to find and fix the problem. First, I had to remember how this processing is done. Eventually, the problem came down to this one line:

if ($File eq $FreshPorts::Constants::CVSROOT_Ports_Approvers) {

The problem is the value for that constant. It is ‘CVSROOT-ports/approvers’. The commit in question affects CVSROOT/approvers. However, the actual file in the repository is CVSROOT-ports/approvers. FreshPorts needs to know this when fetching the file from the repository via http. Previously, FreshPorts invoked a special function to convert from the commit file name to the repository file name. At present, it looks like this:

        # before we do anything, convert the FileName appropriately
        #
#       $FilePath = ConvertFilePath($FilePath);

Yes, it is commented out. This function call was originally added on Tue Oct 16 19:55:51 2007 EDT (11 months ago). Then, on Fri Nov 9 02:38:39 2007 EST (10 months, 1 week ago), I see this cvs log comment:

I now think ConvertFilePath is wrong.  I should not munge the file name like
that.  Do it at fetch time!

Now I think I’m wrong again. But only on the conditional above. I changed it to this:

if ($File eq $FreshPorts::Constants::CVSROOT_Approvers && $Repository eq $FreshPorts::Constants::Repository_Ports) {

This constant is the un-munged filename as found in the commit message. I now explicity check to see what repository we are working against. Even this may prove problematic as FreeBSD continues moviing to svn from cvs.

There are more details to the fix, and you are welcome to review the whole diff if you like.

Me, I’m just off to sleep. I’m dead.

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

11 thoughts on “Ports freeze”

Leave a Comment

Scroll to Top