Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.472
diff -u -p -r1.472 system.install
--- modules/system/system.install	8 Jun 2010 05:44:07 -0000	1.472
+++ modules/system/system.install	13 Jun 2010 19:53:31 -0000
@@ -269,8 +269,18 @@ function system_requirements($phase) {
     // By default no private files directory is configured. For private files
     // to be secure the admin needs to provide a path outside the webroot.
     variable_get('file_private_path', FALSE),
-    variable_get('file_temporary_path', sys_get_temp_dir()),
   );
+
+  // We don't check for the temporary files directory at install time
+  // unless it has been set in settings.php. In this case the user has
+  // no alternative but to fix the directory if it is not writable.
+  if ($phase == 'install') {
+    $directories[] = variable_get('file_temporary_path', FALSE);
+  }
+  else {
+    $directories[] = variable_get('file_temporary_path', file_directory_temp());
+  }
+
   $requirements['file system'] = array(
     'title' => $t('File system'),
   );
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.211
diff -u -p -r1.211 file.inc
--- includes/file.inc	12 Jun 2010 08:15:15 -0000	1.211
+++ includes/file.inc	13 Jun 2010 19:53:32 -0000
@@ -1982,7 +1982,11 @@ function file_directory_temp() {
       $path_delimiter = '/';
     }
     // PHP may be able to find an alternative tmp directory.
-    $directories[] = sys_get_temp_dir();
+    // This function exists in PHP 5 >= 5.2.1, but Drupal
+    // requires PHP 5 >= 5.2.0, so we check for it
+    if (function_exists('sys_get_temp_dir')) {
+      $directories[] = sys_get_temp_dir();
+    }
 
     foreach ($directories as $directory) {
       if (is_dir($directory) && is_writable($directory)) {
