Project

General

Profile

Bug #431 » 0001-Modify-get_pkg_depends-to-return-whole-paths.patch

znerol znerol, 03/17/2010 09:20 AM

View differences:

etc/inc/pkg-utils.inc
245 245
				log_error("The {$package['name']} package is missing required dependencies and must be reinstalled.");
246 246
			switch ($format) {
247 247
				case "files":
248
					$depends[] = $depend_file;
248
					$depends[] = $prefix . $depend_file;
249 249
					break;
250 250
				case "names":
251 251
					switch ($filetype) {
......
340 340
			$depends = get_pkg_depends($pkg_name, ".xml", "files", 1); // Call dependency handler and do a little more error checking.
341 341
			if(is_array($depends)) {
342 342
				foreach($depends as $item) {
343
					if(!file_exists("/usr/local/pkg/" . $item)) {
343
					if(!file_exists($item)) {
344 344
						file_notice($package['name'], "The {$package['name']} package is missing required dependencies and must be reinstalled.", "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1);
345 345
						log_error("Could not find {$item}. Reinstalling package.");
346 346
						install_package($pkg_name);
347 347
						uninstall_package_from_name($pkg_name);
348 348
						install_package($pkg_name);
349 349
					} else {
350
						$item_config = parse_xml_config_pkg("/usr/local/pkg/" . $item, "packagegui");
350
						$item_config = parse_xml_config_pkg($item, "packagegui");
351 351
						if(isset($item_config['nosync'])) continue;
352 352
						if($item_config['custom_php_command_before_form'] <> "") {
353 353
							eval($item_config['custom_php_command_before_form']);
(1-1/5)