Home › Forums › Software › InstaDMG › mis-linked frameworks result when including iLifeSupport.mpkg in build
- This topic has 9 replies, 5 voices, and was last updated 16 years, 11 months ago by
larkost.
-
AuthorPosts
-
March 10, 2008 at 3:41 pm #371838
pmbuko
ParticipantI 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.
March 10, 2008 at 4:36 pm #371840Patrick Fergus
ParticipantBroken in the same manner on our InstaDMG build. Thanks–you just saved some head-scratching here.
– Patrick
March 14, 2008 at 7:21 pm #371889jlevitsk
ParticipantI hit this too. Someone reported to Apple? This seems like a flaw in the PKG…
March 15, 2008 at 10:05 pm #371896jlevitsk
ParticipantTake 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);March 16, 2008 at 12:38 pm #371897jlevitsk
ParticipantSpecifically 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);March 25, 2008 at 3:12 pm #371995pmbuko
ParticipantThanks, 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]May 13, 2008 at 1:31 am #372671larkost
ParticipantI 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.
May 14, 2008 at 1:25 am #372686larkost
ParticipantOk… 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]May 14, 2008 at 3:44 pm #372702larkost
ParticipantI have confirmed that this works and solves the problem.
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed