From 6d43e1f2e61e91ff49ac18f0094dc318a53133e4 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 18 Feb 2014 11:33:59 +0000 Subject: Check if the package is installed before deleting opteration is started --- etc/inc/pkg-utils.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'etc/inc/pkg-utils.inc') diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 924f223..a5a199d 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -384,7 +384,8 @@ function uninstall_package($pkg_name) { } } } - delete_package_xml($pkg_name); + if (is_package_installed($pkg_name)) + delete_package_xml($pkg_name); $static_output .= gettext("done.") . "\n"; update_output_window($static_output); @@ -578,7 +579,7 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url = function install_package($package, $pkg_info = "", $force_install = false) { global $g, $config, $static_output, $pkg_interface; - /* safe side. Write config below will send to ro again. */ + /* safe side. */ conf_mount_rw(); if($pkg_interface == "console") -- cgit v1.1