cvs: php4 /pear/PEAR Installer.php
| From: | Stig Bakken | Date: | Mon, 20 May 2002 10:44:53 +0000 |
| Subject: | cvs: php4 /pear/PEAR Installer.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3966@lists.php.net to get a copy of this message | ||
ssb Mon May 20 06:44:53 2002 EDT
Modified files:
/php4/pear/PEAR Installer.php
Log:
* some verbosity changes: 0 - only errors, 1 - status report when the
install is done, 2 - show each operation, 3 - show file operations
Index: php4/pear/PEAR/Installer.php
diff -u php4/pear/PEAR/Installer.php:1.56 php4/pear/PEAR/Installer.php:1.57
--- php4/pear/PEAR/Installer.php:1.56 Sun May 19 02:19:26 2002
+++ php4/pear/PEAR/Installer.php Mon May 20 06:44:53 2002
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Installer.php,v 1.56 2002/05/19 06:19:26 ssb Exp $
+// $Id: Installer.php,v 1.57 2002/05/20 10:44:53 ssb Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Registry.php';
@@ -122,12 +122,12 @@
}
$path = $props['installed_as'];
if (!@unlink($path)) {
- $this->log(1, "unable to delete: $path");
+ $this->log(2, "unable to delete: $path");
} else {
- $this->log(1, "deleted file $path");
+ $this->log(2, "deleted file $path");
// Delete package directory if it's empty
if (@rmdir(dirname($path))) {
- $this->log(2, "+ rmdir $path");
+ $this->log(3, "+ rmdir $path");
}
}
}
@@ -147,7 +147,7 @@
}
// return if this file is meant for another platform
if (!$os->matchSignature($atts['platform'])) {
- $this->log(1, "skipped $file (meant for $atts[platform], we are
".$os->getSignature().")");
+ $this->log(2, "skipped $file (meant for $atts[platform], we are
".$os->getSignature().")");
return;
}
}
@@ -197,7 +197,7 @@
$this->log(0, "failed to mkdir $dest_dir");
return false;
}
- $this->log(2, "+ mkdir $dest_dir");
+ $this->log(3, "+ mkdir $dest_dir");
}
$orig_file = $tmp_path . DIRECTORY_SEPARATOR . $file;
if (empty($atts['replacements'])) {
@@ -205,7 +205,7 @@
$this->log(0, "failed to copy $orig_file to $dest_file");
return false;
}
- $this->log(2, "+ cp $orig_file $dest_file");
+ $this->log(3, "+ cp $orig_file $dest_file");
} else {
$fp = fopen($orig_file, "r");
$contents = fread($fp, filesize($orig_file));
@@ -228,7 +228,7 @@
$subst_to = $to;
}
}
- $this->log(1, "doing ".sizeof($subst_from)." substitution(s) for
$dest_file");
+ $this->log(2, "doing ".sizeof($subst_from)." substitution(s) for
$dest_file");
if (sizeof($subst_from)) {
$contents = str_replace($subst_from, $subst_to, $contents);
}
@@ -243,7 +243,7 @@
if (!OS_WINDOWS) {
if ($atts['role'] == 'script') {
$mode = 0777 & ~$this->config->get('umask');
- $this->log(2, "+ chmod +x $dest_file");
+ $this->log(3, "+ chmod +x $dest_file");
} else {
$mode = 0666 & ~$this->config->get('umask');
}
@@ -255,7 +255,7 @@
// Store the full path where the file was installed for easy unistall
$this->pkginfo['filelist'][$file]['installed_as'] = $dest_file;
- $this->log(1, "installed file $dest_file");
+ $this->log(2, "installed file $dest_file");
return true;
}