July 03, 2003

Why did I need to fix the Installer?

I can finally install things again. A bit more than a month ago my system hiccuped and I've been unable to run an installer ever since.

When Safari informed me that I had better fix it soon or I'd be toast (the old beta I had expired on June 30) I finally got around to chasing it down. Nuts, I have enough things to think about without dealing with this nonsense.

Back to research I went. I knew that I was dying in update_prebinding (or the equivalent call from the installer). Everytime I ran the following command I'd get an array out of bounds error and update_prebinding would fail fatally.

sudo update_prebinding -verbose -root /

I poked around for a while and finally found an interesting thread on the macosx-admin@omnigroup.com list from a while back. Someone there mentioned using fs_usage. I ultimately used the following command after starting update_prebinding:


fp update_prebinding | awk '{ print $2 }' | sudo fs_usage -w

My fp script looks like this:


#!/bin/sh
#
# fp - find process
#
# find information about a particular process
#

if [ $# -eq 1 ] ; then
	ps -auxwww | grep "$@" | grep -v grep | grep -v bin/fp
else
	echo ""; echo "fp (find process) usage:"; echo "";
	echo "    fp process-name"; echo "";
fi

I should probably add a PID printing option, eh?

Anyway, I found the culprit, the BBEdit Unix Utilities reciept package was somehow damaged. Killing that off got update_prebinding to finish and I have now installed 10.2.6, plus a boatload of stuff I should have installed over the last month or two.

I'm struck by one thing. It was a hell of a lot easier to find damaged files in OS9 and prior. A resource fork had a checksum and writing a resource fork scanner was well documented. There are all kinds of files in the current MacOS that barf when they are slightly mangled. Since the applications don't take down the machine, there is a lot of sloppy code out there. The worst offenders that I've come across are applications that terminate when launching because of some minor nit or another with config files or application generated files. Gone are the days of detection, reporting and moving on.

I blame part of this on Cocoa. The lack of a reasonable exception model means you have to do much it yourself, which is a proper pain in multi-threaded applications.

Posted by Dave at July 3, 2003 09:03 PM
Comments