Index: wp-admin/includes/class-wp-upgrader.php
===================================================================
--- wp-admin/includes/class-wp-upgrader.php	(revision 18811)
+++ wp-admin/includes/class-wp-upgrader.php	(working copy)
@@ -661,14 +661,97 @@
 		$this->strings['installing_package'] = __('Installing the theme&#8230;');
 		$this->strings['process_failed'] = __('Theme install failed.');
 		$this->strings['process_success'] = __('Theme installed successfully.');
+		/* translators: 1: theme name, 2: version */
+		$this->strings['process_success_specific'] = __('Successfully installed the theme <strong>%1$s %2$s</strong>.');
+		$this->strings['parent_theme_search'] = __('This theme requires a parent theme, Checking if <strong>%s</strong> is installed&#8230;');
+		/* translators: 1: theme name, 2: version */
+		$this->strings['parent_theme_prepare_install'] = __('Preparing to install <strong>%1$s %2$s</strong>&#8230;');
+		/* translators: 1: theme name, 2: version */
+		$this->strings['parent_theme_currently_installed'] = __('The Parent theme, <strong>%1$s %2$s</strong>, is currently installed.');
+		/* translators: 1: theme name, 2: version */
+		$this->strings['parent_theme_install_success'] = __('Successfully installed the parent theme <strong>%1$s %2$s</strong>.');
+		$this->strings['parent_theme_not_found'] = __('<strong>The parent theme could not be found, You will need to install the parent theme %s before you can use this child theme.</strong>');
 	}
 
+	function check_parent_theme_filter($install_result, $hook_extra, $child_result) {
+		// Check to see if we need to install a parent theme
+		$theme_info = $this->theme_info();
+		$theme_info['Template'] = 'the-common-blog'; //@TODO: This is a DEBUG line
+
+		// Do we have any business here?
+		if ( empty($theme_info['Template']) )
+			return $install_result;
+
+		$this->skin->feedback('parent_theme_search', $theme_info['Template'] );
+
+		foreach ( get_themes() as $this_theme ) {
+			if ( !empty($this_theme['Stylesheet']) && $this_theme['Stylesheet'] == $theme_info['Template'] ) {
+				$this->skin->feedback('parent_theme_currently_installed', $this_theme['Name'], $this_theme['Version'] );
+				return $install_result; // Fall through, we already have the theme
+			}
+		}
+
+		// We don't have the parent theme, lets install it
+		$api = themes_api('theme_information', array('slug' => $theme_info['Template'], 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
+
+		if ( ! $api || is_wp_error($api) ) {
+			$this->skin->feedback('parent_theme_not_found', $theme_info['Template']);
+			// Don't show activate or preview actions after install
+			add_filter('install_theme_complete_actions', array(&$this, 'hide_activate_preview_actions') );
+			return $install_result;
+		}
+
+		// Backup required data we're going to override:
+		$child_api = $this->skin->api;
+		$child_success_message = $this->strings['process_success'];
+
+		// Override them
+		$this->skin->api = $api;
+		$this->strings['process_success_specific'] = $this->strings['parent_theme_install_success'];//, $api->name, $api->version);
+
+		$this->skin->feedback('parent_theme_prepare_install', $api->name, $api->version);
+		
+		//@TODO: This is a DEBUG line! Only needed with the-common-blog line above.
+		remove_filter('upgrader_post_install', array(&$this, 'check_parent_theme_filter'), 10, 3); // This is only needed when we're forcing a template on line 676 above.
+
+		add_filter('install_theme_complete_actions', '__return_false', 999); // Don't show any actions after installing the theme.
+
+		// Install the parent theme
+		$parent_result = $this->run( array(
+								'package' => $api->download_link,
+								'destination' => WP_CONTENT_DIR . '/themes',
+								'clear_destination' => false, //Do not overwrite files.
+								'clear_working' => true
+								)
+						   );
+
+		if ( is_wp_error($parent_result) ) {
+			add_filter('install_theme_complete_actions', array(&$this, 'hide_activate_preview_actions') );
+		}
+
+		// Start cleaning up after the parents installation
+		remove_filter('install_theme_complete_actions', '__return_false', 999);
+
+		// Reset child's result and data
+		$this->result = $child_result;
+		$this->skin->api = $child_api;
+		$this->strings['process_success'] = $child_success_message;
+
+		return $install_result;
+	}
+	
+	function hide_activate_preview_actions($actions) {
+		unset($actions['activate'], $actions['preview']);
+		return $actions;
+	}
+
 	function install($package) {
 
 		$this->init();
 		$this->install_strings();
 
 		add_filter('upgrader_source_selection', array(&$this, 'check_package') );
+		add_filter('upgrader_post_install', array(&$this, 'check_parent_theme_filter'), 10, 3);
 
 		$options = array(
 						'package' => $package,
@@ -680,6 +763,7 @@
 		$this->run($options);
 
 		remove_filter('upgrader_source_selection', array(&$this, 'check_package') );
+		remove_filter('upgrader_post_install', array(&$this, 'check_parent_theme_filter'), 10, 3);
 
 		if ( ! $this->result || is_wp_error($this->result) )
 			return $this->result;
@@ -1396,10 +1480,8 @@
 	}
 
 	function before() {
-		if ( !empty($this->api) ) {
-			/* translators: 1: theme name, 2: version */
-			$this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the theme <strong>%1$s %2$s</strong>.'), $this->api->name, $this->api->version);
-		}
+		if ( !empty($this->api) )
+			$this->upgrader->strings['process_success'] = sprintf( $this->upgrader->strings['process_success_specific'], $this->api->name, $this->api->version);
 	}
 
 	function after() {
@@ -1419,7 +1501,7 @@
 		$install_actions = array(
 			'preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $name)) . '">' . __('Preview') . '</a>',
 			'activate' => '<a href="' . $activate_link .  '" class="activatelink" title="' . esc_attr( sprintf( __('Activate &#8220;%s&#8221;'), $name ) ) . '">' . __('Activate') . '</a>'
-							);
+		);
 
 		if ( is_network_admin() && current_user_can( 'manage_network_themes' ) )
 			$install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . $template, 'enable-theme_' . $template ) ) . '" title="' . esc_attr__( 'Enable this theme for all sites in this network' ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>';
@@ -1562,4 +1644,4 @@
 
 		return true;
 	}
-}
+}
\ No newline at end of file
Index: wp-admin/update.php
===================================================================
--- wp-admin/update.php	(revision 18811)
+++ wp-admin/update.php	(working copy)
@@ -199,7 +199,7 @@
 		include_once ABSPATH . 'wp-admin/includes/theme-install.php'; //for themes_api..
 
 		check_admin_referer('install-theme_' . $theme);
-		$api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.
+		$api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
 
 		if ( is_wp_error($api) )
 	 		wp_die($api);
