Home Forums Software InstaDMG mis-linked frameworks result when including iLifeSupport.mpkg in build

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #371838
    pmbuko
    Participant

    I recently built an InstaDMG deployment based on 10.5.2 build 9C2028 (ships with the latest multi-touch MBPs) and it resulted in some mis-linked frameworks. I only discovered this when the Desktop & Screen Savers pref pane refused to open and the Console pointed to the ImageKit.framework not being loaded. Searching through the list of packages I included in the build singled out [b]iLifeSupport.mpkg[/b] (v8.2) as the one that touches these frameworks.

    The undesirable effect, specifically, was that in [b]/System/Library/PrivateFrameworks/GraphicsAppSupport.framework/Versions/A/Frameworks[/b], both the [b]ImageKit.framework[/b] and [b]QuartzComposer.framework[/b] links were pointing to [b]/Volumes/InstaDMG/…[/b] rather than the root volume. I was able to repair the broken links by manually applying iLifeSupport.mpkg.

    #371840
    Patrick Fergus
    Participant

    Broken in the same manner on our InstaDMG build. Thanks–you just saved some head-scratching here.

    – Patrick

    #371889
    jlevitsk
    Participant

    I hit this too. Someone reported to Apple? This seems like a flaw in the PKG…

    #371896
    jlevitsk
    Participant

    Take a look in the postflight_actions folder at the one script in there. I think I see the problem. See they repair the symlink but for the Target they include $TargetDisk which I don’t think is right. Right? If you do the SymLink with the $ImageKitTarget and $QuartzComposerTarget set without a $TargetDisk I think then the link destination would not include the disk name so it would properly resolve when you run this patch. I haven’t tried it yet but I think that’s the problem.

    # ImageKit
    my $ImageKitLink = $GAS_Framework . “ImageKit.framework”;
    my $ImageKitTarget = $TargetDisk . “/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework”;
    repairLink($ImageKitLink, $ImageKitTarget);

    # QuartzComposer
    my $QuartzComposerLink = $GAS_Framework . “QuartzComposer.framework”;
    my $QuartzComposerTarget = $TargetDisk . “/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework”;
    repairLink($QuartzComposerLink, $QuartzComposerTarget);

    #371897
    jlevitsk
    Participant

    Specifically it should look like this after the fix… I looked and it seems to make the link right now…

    # ImageKit
    my $ImageKitLink = $GAS_Framework . “ImageKit.framework”;
    my $ImageKitTarget = “/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework”;
    repairLink($ImageKitLink, $ImageKitTarget);

    # QuartzComposer
    my $QuartzComposerLink = $GAS_Framework . “QuartzComposer.framework”;
    my $QuartzComposerTarget = “/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework”;
    repairLink($QuartzComposerLink, $QuartzComposerTarget);

    #371995
    pmbuko
    Participant

    Thanks, jlevitsk. I’ve incorporated your fix and it has resolved the issue for me. I’m including a summary of the fix below. The following applies to the iLifeSupport 8.2 package downloaded from apple.com/support/downloads:
    [list=1]
    [*]Open the file located here with your favorite text editor: iLifeSupport.mpkg/Contents/Installers/iLifeMediaBrowser/Contents/Resources/postflight_actions/repairLeopardLinks
    [*]On lines 25 and 30, immediately following the equal sign, remove “$TargetDisk . ” (<-- that's $TargetDisk - space - dot - space) [*]Save the file. [/list]

    #372671
    larkost
    Participant

    I am trying to create a generic fix for this, and have come up with the following code:

    [code]# clean up some generic installer mistakes
    clean_up_image() {
    # find all the symlinks that are pointing to $CURRENT_IMAGE_MOUNT, and make them point at the “root”
    /usr/bin/find -x “$CURRENT_IMAGE_MOUNT” -type l | while read THIS_LINK
    do
    if [ `/usr/bin/readlink “$THIS_LINK” | /usr/bin/grep -c “$CURRENT_IMAGE_MOUNT”` -gt 0 ]; then

    /bin/echo “Correcting soft-link: $THIS_LINK” | /usr/bin/tee -a $LOG_FILE
    CORRECTED_LINK=`/usr/bin/readlink “$THIS_LINK” | awk “sub(\”$CURRENT_IMAGE_MOUNT\”, \”\”) { print }”`
    /bin/ln -s -f “$CORRECTED_LINK” “$THIS_LINK”

    fi
    done
    }[/code]

    You also have to add “clean_up_image” on a line by itself before “close_up_and_compress”. I think it works, but am still waiting for the final check-run to process.

    #372686
    larkost
    Participant

    Ok… slight change to the code:

    [code]# clean up some generic installer mistakes
    clean_up_image() {
    /bin/date “+$CREATE_DATE %H:%M:%S: Correcting some generic installer errors” | /usr/bin/tee -a “$LOG_FILE” “$PKG_LOG”

    # find all the symlinks that are pointing to $CURRENT_IMAGE_MOUNT, and make them point at the “root”
    /usr/bin/find -x “$CURRENT_IMAGE_MOUNT” -type l | while read THIS_LINK
    do
    if [ `/usr/bin/readlink “$THIS_LINK” | /usr/bin/grep -c “$CURRENT_IMAGE_MOUNT”` -gt 0 ]; then

    /bin/echo “Correcting soft-link: $THIS_LINK” | /usr/bin/tee -a “$LOG_FILE”
    CORRECTED_LINK=`/usr/bin/readlink “$THIS_LINK” | awk “sub(\”$CURRENT_IMAGE_MOUNT\”, \”\”) { print }”`

    /bin/rm “$THIS_LINK”
    /bin/ln -s “$CORRECTED_LINK” “$THIS_LINK”

    fi
    done

    # make sure that we have not left any open files behind
    /usr/sbin/lsof | /usr/bin/grep “$CURRENT_IMAGE_MOUNT/” | /usr/bin/awk ‘{ print $2 }’ | /usr/bin/sort -u | /usr/bin/xargs /bin/kill 2>&1 | /usr/bin/tee -a “$LOG_FILE”
    }[/code]

    #372702
    larkost
    Participant

    I have confirmed that this works and solves the problem.

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

Comments are closed