From d633b92fe012dcdbded33626dc1379b8640c1331 Mon Sep 17 00:00:00 2001 From: "Tomas V.V.Cox" Date: Tue, 8 Jul 2003 10:33:38 +0000 Subject: [PATCH] Check dependencies on uninstall --- pear/PEAR/Installer.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php index 58541c5a67..9f95e25aa6 100644 --- a/pear/PEAR/Installer.php +++ b/pear/PEAR/Installer.php @@ -773,7 +773,13 @@ class PEAR_Installer extends PEAR_Common $this->installroot = ''; } $this->registry = &new PEAR_Registry($php_dir); - + if (empty($options['nodeps'])) { + $depchecker = &new PEAR_Dependency($this->registry); + $error = $depchecker->checkPackageUninstall($errors, $package); + if ($error) { + return $this->raiseError($errors . 'uninstall failed'); + } + } // Delete the files if (PEAR::isError($err = $this->_deletePackageFiles($package))) { $this->rollbackFileTransaction(); -- 2.50.1