cvs: pear-core /PEAR/Command Package.php
| From: | Greg Beaver | Date: | Mon, 21 Feb 2005 17:31:56 +0000 |
| Subject: | cvs: pear-core /PEAR/Command Package.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-29622@lists.php.net to get a copy of this message | ||
cellog Mon Feb 21 12:31:56 2005 EDT
Modified files:
/pear-core/PEAR/Command Package.php
Log:
fix Bug #3429 pear sign fails with notice
http://cvs.php.net/diff.php/pear-core/PEAR/Command/Package.php?r1=1.93&r2=1.94&ty=u
Index: pear-core/PEAR/Command/Package.php
diff -u pear-core/PEAR/Command/Package.php:1.93 pear-core/PEAR/Command/Package.php:1.94
--- pear-core/PEAR/Command/Package.php:1.93 Mon Feb 21 12:23:14 2005
+++ pear-core/PEAR/Command/Package.php Mon Feb 21 12:31:55 2005
@@ -18,7 +18,7 @@
// | Greg Beaver <cellog@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Package.php,v 1.93 2005/02/21 17:23:14 cellog Exp $
+// $Id: Package.php,v 1.94 2005/02/21 17:31:55 cellog Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Packager.php';
@@ -794,15 +794,19 @@
if (file_exists("$tmpdir/package.sig")) {
return $this->raiseError("package already signed");
}
+ $packagexml = 'package.xml';
+ if (file_exists("$tmpdir/package2.xml")) {
+ $packagexml = 'package2.xml';
+ }
@unlink("$tmpdir/package.sig");
$input = $this->ui->userDialog($command,
array('GnuPG Passphrase'),
array('password'));
- $gpg = popen("gpg --batch --passphrase-fd 0 --armor --detach-sign --output
$tmpdir/package.sig $tmpdir/package.xml 2>/dev/null", "w");
+ $gpg = popen("gpg --batch --passphrase-fd 0 --armor --detach-sign --output
$tmpdir/package.sig $tmpdir/$packagexml 2>/dev/null", "w");
if (!$gpg) {
return $this->raiseError("gpg command failed");
}
- fwrite($gpg, "$input[0]\r");
+ fwrite($gpg, "$input[0]\n");
if (pclose($gpg) || !file_exists("$tmpdir/package.sig")) {
return $this->raiseError("gpg sign failed");
}