]> granicus.if.org Git - php/commitdiff
Check dependencies on uninstall
authorTomas V.V.Cox <cox@php.net>
Tue, 8 Jul 2003 10:33:38 +0000 (10:33 +0000)
committerTomas V.V.Cox <cox@php.net>
Tue, 8 Jul 2003 10:33:38 +0000 (10:33 +0000)
pear/PEAR/Installer.php

index 58541c5a67d34b5fbd39958fa13833927e71d9a6..9f95e25aa6794d05c034707c0ec370cc4d0618bd 100644 (file)
@@ -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();