]> granicus.if.org Git - php/commitdiff
Tomas say:
authorGreg Beaver <cellog@php.net>
Sun, 31 Aug 2003 16:41:27 +0000 (16:41 +0000)
committerGreg Beaver <cellog@php.net>
Sun, 31 Aug 2003 16:41:27 +0000 (16:41 +0000)
"I think you'd have to let the user still install the package with
--force."

I say, OK :)

pear/PEAR/Installer.php

index 12bb502d5b0f2f186e35078b8f4e3b460152e9da..cd850264d81f9df7152dbde68fda5beac3eb60ba 100644 (file)
@@ -284,8 +284,12 @@ class PEAR_Installer extends PEAR_Common
             if (strtolower($md5sum) == strtolower($atts['md5sum'])) {
                 $this->log(3, "md5sum ok: $final_dest_file");
             } else {
-                return $this->raiseError("bad md5sum for file $final_dest_file",
-                                         PEAR_INSTALLER_FAILED);
+                if (empty($options['force'])) {
+                    return $this->raiseError("bad md5sum for file $final_dest_file",
+                                             PEAR_INSTALLER_FAILED);
+                } else {
+                    $this->log(0, "warning : bad md5sum for file $final_dest_file");
+                }
             }
         }
         if (!OS_WINDOWS) {