Byzantine Reality

Searching for Byzantine failures in the world around us

“Portable” Package Management Is Bullshit {Mostly}

I don’t always want to code in Java. In fact, I’ve recently wanted to not program in Java and get a feel for everything else that’s neat and nifty and blah blah blah. But Java spoiled me. I got used to having my libraries distributed with my package, and having it work on other systems pretty easily. So imagine the fun times I had trying to get MySQL and SMTP support working in other languages…

So all I need to do is read in a file, parse some e-mail addresses and names out of it, make accounts in MySQL, and send the users e-mails using SMTP. Doesn’t sound too tricky, and in fact, this sounds like something Perl would be great for. But the fact of the matter is that it took goddamn forever to figure out how to install the MySQL package with CPAN (the Perl package manager), and I couldn’t even get the SMTP package working on the server I needed it on (although it works fine on my local box). That’s completely ridiculous. I can’t get MySQL and SMTP support in Perl for Linux. Standard, vanilla Linux.

So I tried it in Ruby. I really wanted to do it in Ruby. The new Netbeans beta supports Ruby development (a whole ‘nother blog post on that may be coming soon…), and it got me really excited about Ruby. Unfortunately, that whole predicament went even worse, and the error messages that either of these give you will make sure that you’re not fixing these problems on your own.

I’m not asking for a quantum computer simulator that works on all systems. Ironically enough, that is available here (jQuantum) for all systems and it looks very interesting on first glance. What I am saying is that MySQL and SMTP are not new players in their fields, and in fact are very well-established in their fields. These things need to work on all platforms in their languages, especially on the common Linux distributions.

For anyone who cared long enough to get here, I ended up with a Perl script that parses the file and does the MySQL stuff, and produces a file of e-mail addresses that a bash script takes in and e-mails out using sendmail (that script was readily on hand). Better luck next time. Sigh.