diff options
author | Scott Ullrich <sulrich@pfsense.org> | 2010-03-17 11:46:59 -0400 |
---|---|---|
committer | Scott Ullrich <sulrich@pfsense.org> | 2010-03-17 11:46:59 -0400 |
commit | 40a721c0b8ca331fdb67dd496f2f878577d40a19 (patch) | |
tree | 7832fa390775322d37597db75de3ee6691d6496a /etc | |
parent | a45e27ba70e30d67e380da33f332cd686441788c (diff) | |
download | pfsense-40a721c0b8ca331fdb67dd496f2f878577d40a19.zip pfsense-40a721c0b8ca331fdb67dd496f2f878577d40a19.tar.gz |
get_pkg_depends must return the whole paths of dependency files in order
to enable sync_package to check for files which are not installed in the
standard pkg location (i.e. outside of /usr/local/pkg).
Ticket #431
Submitted-by: Lorenz Schori
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index b206959..a443c28 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -246,7 +246,7 @@ function get_pkg_depends($pkg_name, $filetype = ".xml", $format = "files", $retu log_error("The {$package['name']} package is missing required dependencies and must be reinstalled."); switch ($format) { case "files": - $depends[] = $depend_file; + $depends[] = $prefix . $depend_file; break; case "names": switch ($filetype) { @@ -341,14 +341,14 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) { $depends = get_pkg_depends($pkg_name, ".xml", "files", 1); // Call dependency handler and do a little more error checking. if(is_array($depends)) { foreach($depends as $item) { - if(!file_exists("/usr/local/pkg/" . $item)) { + if(!file_exists($item)) { 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); log_error("Could not find {$item}. Reinstalling package."); install_package($pkg_name); uninstall_package_from_name($pkg_name); install_package($pkg_name); } else { - $item_config = parse_xml_config_pkg("/usr/local/pkg/" . $item, "packagegui"); + $item_config = parse_xml_config_pkg($item, "packagegui"); if(isset($item_config['nosync'])) continue; if($item_config['custom_php_command_before_form'] <> "") { eval($item_config['custom_php_command_before_form']); |