Sep 172008

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 Digg Google StumbleUpon Premium Responsive

  11 Responses to “Ports freeze”

  1. Neither do the link to the diff.

  2. How ironic. That link should go to not CVSROOT/approvers

    That is the whole issue that my ‘convert file path’ issue was trying to correct. :)

  3. Nisse: The link to the diff does not work? What link do you mean? This one?

    It just worked here. Details please. :)

  4. The URL gives me:

    Error 404 – Not Found

    The page you are looking for was not found on the server. You can try to search for what you were looking for or visit our home page.

  5. Interesting… How does enter the picture? Nothing to do with me.

  6. Strange :)

    Maybe a missbehaving mod_rewrite-rule?

    I have tried both from home and from work, the same problem.

    Here is a screendump:

  7. Success.

    I have duplicated the problem. :)

  8. And fixed.

    I still don’t know why streethound is involved, but the diff was marked private. Marking it public fixed the issue.

  9. Ahh, the culprit:


    Thanks. Interesting situation.

  10. Yeap, now it’s working :)