diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-05-07 11:47:35 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-05-07 11:47:35 -0300 |
commit | 45cd5fcd308cf63e955725289daa57dbb5e1f455 (patch) | |
tree | 07c9899b0662416827faf0851e1748a1817b9ced /etc | |
parent | af5d93f6ff2f890bb457e03d20dd4fde1b5e79e5 (diff) | |
download | pfsense-45cd5fcd308cf63e955725289daa57dbb5e1f455.zip pfsense-45cd5fcd308cf63e955725289daa57dbb5e1f455.tar.gz |
Remove unused functions get_pkg_sizes() and get_package_install_size()
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 0d9f689..6f7d171 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -181,29 +181,6 @@ function get_pkg_info($pkgs = 'all', $info = 'all') { return $resp ? $resp : array(); } -function get_pkg_sizes($pkgs = 'all') { - global $config, $g; - - $freebsd_machine = php_uname("m"); - $params = array( - "pkg" => $pkgs, - "freebsd_version" => get_freebsd_version(), - "freebsd_machine" => $freebsd_machine - ); - $msg = new XML_RPC_Message('pfsense.get_pkg_sizes', array(php_value_to_xmlrpc($params))); - $xmlrpc_base_url = get_active_xml_rpc_base_url(); - $cli = new XML_RPC_Client($g['xmlrpcpath'], $xmlrpc_base_url); - $resp = $cli->send($msg, 10); - if (!is_object($resp)) { - log_error("Could not get response from XMLRPC server!"); - } else if (!$resp->faultCode()) { - $raw_versions = $resp->value(); - return xmlrpc_value_to_php($raw_versions); - } - - return array(); -} - /* * resync_all_package_configs() Force packages to setup their configuration and rc.d files. * This function may also print output to the terminal indicating progress. @@ -1198,24 +1175,6 @@ function walk_depend($depend, $pkgdb = "", $alreadyseen = "") { return $size; } -function get_package_install_size($pkg = 'all', $pkg_info = "") { - global $config, $g; - if ((!is_array($pkg)) and ($pkg != 'all')) { - $pkg = array($pkg); - } - $pkgdb = get_pkg_db(); - if (!$pkg_info) { - $pkg_info = get_pkg_sizes($pkg); - } - foreach ($pkg as $apkg) { - if (!$pkg_info[$apkg]) { - continue; - } - $toreturn[$apkg] = expand_to_bytes(walk_depend(array($pkg_info[$apkg]), $pkgdb)); - } - return $toreturn; -} - function squash_from_bytes($size, $round = "") { $conv = array(1 => "B", "K", "M", "G"); foreach ($conv as $div => $suffix) { |