Home Forums Software InstaDMG Working towards a solution for Xcode installs

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #378592
    toddpalino
    Participant

    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

    #378593
    toddpalino
    Participant

    Looks like a command line install with ‘-target /’ works just fine. While it’s extracting, all of the files (in the sandbox) are in Root, but when they are shoved into place they go to the right place. So this appears to be a flaw in installer when using a target other than /, where it’s not processing the customLocation attribute correctly.

    I don’t suppose anyone has a copy of the installer source code (or a pointer to it) handy?

    -Todd

    #378801
    zeb
    Participant

    I’ve had trouble getting this working, too. Today I modified the Distribution file, changing [b]rootVolumeOnly[/b] to [b]”false”[/b] and that seems to have done the trick. I hope that helps.

    -zeb

    #378843
    Ebonfyre
    Participant

    While it certainly “shouldn’t” be necessary, have you considered taking a snapshot of the install process and then re-creating a pkg of your own? Might be more efficient than digging around in someone else’s code.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Comments are closed