Fix for w3mir With Latest

What brought this all on was that one of my computers died. So I updated software on another computer, and discovered I needed a fix. It’s a fix for a recent improvement in a Perl library, URI::file::Base, that coupled with behavior in URI::file::Unix happens to invoke different behavior in URI::URL, which… Basically, w3mir no longer works.

I’m posting this here, because it appears all the watering holes associated with w3mir have dried up. So I post this in the hope that anyone who uses w3mir will be able to find this post via their favorite search engine and will not need to go through the trouble to debug the problem.

So, my AMD K6-2 400MHz box with the Epox motherboard finally died. I was using it as an email server, CD burner, and other things. The power-supply fan had not spun for some months, or years. And the CPU fan had been limping along. And the CPU would overheat if I asked it to do anything hard.

Now, M begged me to come away with her and the kids to Maine for the weekend. And I’m happy to go. Except that the weekends are the only time I get to spend on my business. And in Maine, I’ll probably be without Internet access. So I decided to make local mirrors of a few web sites I wanted to study over the weekend. I figured I’d put the files on a laptop and bring it all with me. So I started running w3mir, which I had on the K6-2 box, and the box finally just stopped right in the middle, and it never came back.

At first I thought the power supply might have died, but substituting another power supply I had lying around did nothing. I actually do think the power supply is blown. Also something on the motherboard, judging from the smell. It’s not burnt silicon, but it is burnt.

So yesterday I moved that computer’s hard drive and CD burner to my main box, now my only box, an Athlon classic 850MHz that has a few years of its own history. But at least the CPU fan still spins. Earlier this week I had upgraded that box to the latest Mandriva. And I spent last night making sure all the latest packages were installed and setting up sendmail.

Then I installed w3mir, in order to finish what I started with. And it wouldn’t run. It said, “can’t open /path/to/file.html for writing: No such file or directory.” That initial “/” isn’t supposed to be in the file path. After much debugging, I discovered that in URI::file::Base, there’s some new functionality related to the authority part of the URI. And it interacts badly with the code that deals with absolute paths, at least if you have a relative file path. This is probably a bug in the URI library. But the fix for now is just to disable the authority feature, thusly:

eval '
use URI;

eval '
use URI::file;

# Full discipline:
use strict;

The part in the middle is new. Just insert those few lines into w3mir itself—It’s a Perl script—and everything will work again.


This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

One Response to "Fix for w3mir With Latest"

Leave a reply