If like me, your php.ini file has the short_open_tag directive set to off, the upgrade to 4.0.2 will fail.

The problem is in the
Code:
scripts/file_patcher.php
file line 1 as it opens with the old style short open tags e.g.
PHP Code:
<?
Workaround: simply extract the zip file, edit the file_patcher.php to start with
PHP Code:
<?php
instead, re-zip then upload.

HTH,
Jeremy