Working towards a solution for Xcode installs
I've been doing quite a bit of poking around with the Xcode install problem, since the image I'm generating is primarily for developers, so it's an important piece. I'm running InstaDMG on a 10.6.3 server, creating a (non-server) 10.6.3 image. Like many, I've been getting this error when trying to add Xcode to my image:
[quote]An exception was thrown from the install queue while running IFPKInstallElement. IFPKInstallElementException. Package PKLeopardPackage cannot be installed at /tmp/InstaDMG_temp_folder.8y0LfX/mount_point.moYM0Y/Developer using destination path /private/tmp/InstaDMG_temp_folder.8y0LfX/mount_point.moYM0Y/Developer.[/quote]
After much testing, I was able to isolate the problem to the use of the customLocation attribute within the distribution file to put the apps into /Developer on the target system. Rewrite the distribution file and remove that and the package installs just fine (though it gets scattered all over the filesystem, which is less than ideal). I then tried creating the /Developer directory before trying to install Xcode. I'm doing that using a small no payload package that I install just before Xcode that has a preinstall script that is simply:
[code]
#!/bin/bash
mkdir "$3/Developer"
[/code]
This worked as well (using the unmodifed Xcode installer from the DMG), but the files still ended up getting scattered, rather than installing into /Developer as they should. That points to a flaw in installer where it's not honoring the customLocation attribute for some reason. Actually, a couple flaws. It looks like it's throwing an error if the directory doesn't exist (so it knows about it), but even if it does exist it's not installing there. But you don't get these problems when using the installer GUI or presumably when doing a command line install with '-target /'.
I'm continuing to work on this, and will update as I continue testing.
-Todd