views:

200

answers:

2

I have an app that updates itself over the internet, and the updated copy won't run on PowerPC machines (G5) running Leopard (10.5.8). Double-clicking the app produces a message saying "You can't open the application "appname" because it is not supported on this architecture." But here's the weird part: if I duplicate the app using the Finder or using a cp -R command, then the duplicate runs fine! And yet, if I do ls -laeR on both apps, the results are identical. I restarted the machine, and the difference between the two copies was still there.

Sometimes, renaming the app made it run. After a few tries, I managed to rename it back to the original name and still have it run.

If this was just on one machine, I'd dismiss it as disk corruption, cosmic rays, or a voodoo hex, but it was reported by a customer and then I reproduced it on my own machine.

Any ideas what could cause this behavior?

A: 

Sounds to me like an extended attribute or some other aspect that isn't being carried over to the duplicate of the program files.

Maybe try looking into running the xattr command on the output of ls -laeR on the app bundle?

Coxy
+2  A: 

It turns out that the Launch Services database had somehow flagged the app as unsupported, which I verified by using the semi-secret lsregister command line tool to dump the database. Anything that would change the mod date of the app, such as touch, sufficed to make Launch Services wake up and smell the coffee.

JWWalker