Revision 86af45ec
Added by Scott Ullrich over 14 years ago
etc/inc/pkg-utils.inc | ||
---|---|---|
98 | 98 |
* |
99 | 99 |
******/ |
100 | 100 |
function remove_freebsd_package($packagestring) { |
101 |
exec("/usr/sbin/pkg_delete -x {$packagestring}"); |
|
101 |
exec("/usr/sbin/pkg_delete -x {$packagestring} 2>>/tmp/pkg_delete_errors.txt");
|
|
102 | 102 |
} |
103 | 103 |
|
104 | 104 |
/****f* pkg-utils/is_package_installed |
... | ... | |
222 | 222 |
* package is installed. |
223 | 223 |
*/ |
224 | 224 |
function is_freebsd_pkg_installed($pkg) { |
225 |
if(!$pkg) |
|
226 |
return; |
|
225 | 227 |
$output = ""; |
226 | 228 |
exec("/usr/sbin/pkg_info -E \"{$pkg}*\"", $output, $retval); |
227 | 229 |
|
... | ... | |
826 | 828 |
function delete_package($pkg) { |
827 | 829 |
global $config, $g, $static_output, $vardb; |
828 | 830 |
|
831 |
if(!$pkg) |
|
832 |
return; |
|
833 |
|
|
829 | 834 |
$pkg = substr(reverse_strrchr($pkg, "."), 0, -1); |
830 | 835 |
|
831 | 836 |
// If package has dependencies then skip it |
Also available in: Unified diff
Ensure $pkg is defined. Send pkg_delete errors to /tmp/pkg-delete_errors.txt