Adobe Reader X 10.1 preinstall script fail

541 views
Skip to first unread message

Jason Hueske

unread,
Jun 14, 2011, 6:07:38 PM6/14/11
to munk...@googlegroups.com
I just tried installing Adobe Reader X 10.1 at the loginwindow and it failed; here's the end of the result from errors.log:


Jun 14 16:41:28 ERROR: installer:PHASE:Running package scripts…
Jun 14 16:41:28 ERROR: installer:%44.560252
Jun 14 16:41:28 ERROR: installer:%97.750000
Jun 14 16:41:28 ERROR: installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
Jun 14 16:41:28 ERROR: ------------------------------------------------------------------------------


The installer is a flat package but three scripts were deposited in /tmp. The culprit looks like the MoveReaderToTrash function in the preinstall script from the reader.app.pkg component:


#!/bin/bash

function MoveReaderToTrash {

newReaderApp=$readerApp
while [ 1 ]
do
if [ -e ~/.Trash/"$newReaderApp" ]
then
echo "$newReaderApp exists in Trash. Retrying with a new name."
sleep 1
time_to_be_attached=`date "+%k-%M-%S"`
newReaderApp="Adobe Reader""$time_to_be_attached"".app"
else
echo "Moving existing $readerApp to Trash as $newReaderApp"
mv "$installation_path/$readerApp" ~/.Trash/"$newReaderApp"
if [ $? -ne 0 ]
then
echo "ERROR: Could not move existing $readerApp to Trash."
exit -1
else
exit 0
fi
fi
done
}

My brutish but effective solution was this:

<key>preinstall_script</key>
<string>#!/bin/sh

rm -rf "/Applications/Adobe Reader.app"

</string>

The embedded pkginfo script capabilities in munki are solid gold.

- Jason

Greg Neagle

unread,
Jun 14, 2011, 6:09:07 PM6/14/11
to munk...@googlegroups.com
I do the same, and for the same reason.

-Greg
Reply all
Reply to author
Forward
0 new messages