From 3e155fab442ea22d4e4fee1c841013cc25e2b356 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 7 Feb 2007 16:56:22 +0000 Subject: [PATCH] Handle include files correctly Ticket #1250 --- etc/inc/pkg-utils.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 1ebfcbb8f1..748497e697 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -176,7 +176,7 @@ function get_pkg_depends($pkg_name, $filetype = ".xml", $format = "files", $retu } else { $prefix = "/usr/local/pkg/"; } - if(!file_exists($prefix . $pkg_name)) + if(!file_exists($prefix . $depend_file)) log_error("The {$package['name']} package is missing required dependencies and must be reinstalled."); switch ($format) { case "files": @@ -241,10 +241,10 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) { /* Bring in package include files */ if (isset($pkg_config['include_file']) && $pkg_config['include_file'] != "") { $include_file = $pkg_config['include_file']; - if (file_exists('/usr/local/pkg/' . $include_file)) - require_once('/usr/local/pkg/' . $include_file); + if (file_exists($include_file)) + require_once($include_file); else - if (file_exists('/usr/local/pkg/' . $include_file)) { + if (file_exists($include_file)) { require_once($include_file); } else { log_error("Could not locate {$include_file}."); @@ -915,4 +915,4 @@ function squash_from_bytes($size, $round = "") { } return; } -?> \ No newline at end of file +?>