diff options
Diffstat (limited to 'src/etc/inc/pkg-utils.inc')
-rw-r--r-- | src/etc/inc/pkg-utils.inc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index d76afbc..0303092 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -192,7 +192,7 @@ function pkg_call($params, $mute = false) { $now = time(); - if(($now - $started) >= $maxwaittime) { + if (($now - $started) >= $maxwaittime) { $rc = -1; proc_terminate($process); break; @@ -204,7 +204,7 @@ function pkg_call($params, $mute = false) { fclose($pipes[2]); proc_close($process); - if(!isset($rc)) { + if (!isset($rc)) { $rc = $status['exitcode']; } @@ -353,7 +353,7 @@ function get_package_id($package_name) { foreach ($config['installedpackages']['package'] as $idx => $pkg) { if ($pkg['name'] == $package_name || - get_package_internal_name($pkg) == $package_name) { + get_package_internal_name($pkg) == $package_name) { return $idx; } } @@ -702,10 +702,9 @@ function install_package_xml($package_name) { return false; } - $configfile = substr(strrchr($pkg_info['config_file'], '/'), 1); - if (file_exists("/usr/local/pkg/" . $configfile)) { + if (file_exists("/usr/local/pkg/" . $pkg_info['configurationfile'])) { update_status(gettext("Loading package configuration... ")); - $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $configfile, "packagegui"); + $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $pkg_info['configurationfile'], "packagegui"); update_status(gettext("done.") . "\n"); update_status(gettext("Configuring package components...") . "\n"); if (!empty($pkg_config['filter_rules_needed'])) { |