Re: Making package (windows)

From: Date: Thu, 31 Jul 2003 17:53:25 +0000
Subject: Re: Making package (windows)
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19058@lists.php.net to get a copy of this message
I did it. I clicked go-pear.bat and now it works. So that was my fault :-( Regards, Maciek Szczytowski Uzytkownik "Greg Beaver" <greg@chiaraquartet.net> napisal w wiadomosci news:3F29545B.8060009@chiaraquartet.net... > Hi, > > This is most likely caused by one of two possible bugs. > > 1) pear upgrade Archive_Tar and try again > 2) the directory your package is located in contains spaces. > > If it is the second option, that is the "non-existent" bug that causes > PEAR to fail on windows. You can fix it with this patch, or through a > temporary method: copy your package to a directory with no spaces, and > attempt a re-packaging. > > If this does fix your problem, please post a comment at > http://bugs.php.net/bug.php?id=24845 to help move the process > along. > > Greg > > Maciek Szczytowski wrote: > > Hi, > > Maybe this is a stupid question. But I have a problem. I can't do the > > package. > > I work on Win XP (yes, I know that isn't a proffesional os). > > > > I write: > > > > $package = new PEAR_Packager(); > > $package->package('package.xml'); > > > > I run it and I have: > > > > Analyzing RPN.php > > > > and nothing more. Ones tar file was made - but it was corrupted. > > > > I don't know why, but I have php_dir = 'c:\php4\pear' - I have pear in > > 'c:\usr\php\pear\' directory. Where I can change it? Maybe this is a > > problem? > > > > Any suggestion? > > > > Regards, > > Maciej Szczytowski > > > > > > ---------------------------------------------------------------------------- ---- > ? pear/install-pear-withpublicweb.php > ? pear/package-with-publicweb.dtd > ? pear/PEAR/Common-with-publicweb.php > ? pear/PEAR/Config-with-publicweb.php > ? pear/PEAR/Installer-with-publicweb.php > Index: pear/PEAR/Common.php > =================================================================== > RCS file: /repository/php-src/pear/PEAR/Common.php,v > retrieving revision 1.93 > diff -u -r1.93 Common.php > --- pear/PEAR/Common.php 12 Jul 2003 15:15:38 -0000 1.93 > +++ pear/PEAR/Common.php 29 Jul 2003 18:25:11 -0000 > @@ -156,7 +156,12 @@ > $tempfiles =& $GLOBALS['_PEAR_Common_tempfiles']; > while ($file = array_shift($tempfiles)) { > if (@is_dir($file)) { > - System::rm("-rf $file"); > + $options = > + array( > + '-rf', > + $file, > + ); > + System::rm($options); > } elseif (file_exists($file)) { > unlink($file); > } > @@ -198,7 +203,12 @@ > function mkDirHier($dir) > { > $this->log(2, "+ create dir $dir"); > - return System::mkDir("-p $dir"); > + $options = > + array( > + '-p', > + $dir, > + ); > + return System::mkDir($options); > } > > // }}} > @@ -242,11 +252,12 @@ > function mkTempDir($tmpdir = '') > { > if ($tmpdir) { > - $topt = "-t $tmpdir "; > + $topt = array('-t', $tmpdir); > } else { > - $topt = ''; > + $topt = array(); > } > - if (!$tmpdir = System::mktemp($topt . '-d pear')) { > + $topt = array_merge($topt, array('-d', 'pear')); > + if (!$tmpdir = System::mktemp($topt)) { > return false; > } > $this->addTempFile($tmpdir); > Index: pear/PEAR/Config.php > =================================================================== > RCS file: /repository/php-src/pear/PEAR/Config.php,v > retrieving revision 1.48 > diff -u -r1.48 Config.php > --- pear/PEAR/Config.php 3 Jul 2003 06:43:31 -0000 1.48 > +++ pear/PEAR/Config.php 29 Jul 2003 18:25:11 -0000 > @@ -577,7 +577,8 @@ > } > $data = ($data === null) ? $this->configuration[$layer] : $data; > $this->_encodeOutput($data); > - if (!@System::mkDir("-p " . dirname($file))) { > + $opt = array('-p', dirname($file)); > + if (!@System::mkDir($opt)) { > return $this->raiseError("could not create directory: " . dirname($file)); > } > if (@is_file($file) && !@is_writeable($file)) { > Index: pear/PEAR/Packager.php > =================================================================== > RCS file: /repository/php-src/pear/PEAR/Packager.php,v > retrieving revision 1.48 > diff -u -r1.48 Packager.php > --- pear/PEAR/Packager.php 27 Jun 2003 10:46:53 -0000 1.48 > +++ pear/PEAR/Packager.php 29 Jul 2003 18:25:12 -0000 > @@ -116,7 +116,13 @@ > chdir($oldcwd); > return $this->raiseError($new_xml); > } > - if (!($tmpdir = System::mktemp('-t '.getcwd().' -d'))) { > + $opt = > + array( > + '-t', > + getcwd(), > + '-d', > + ); > + if (!($tmpdir = System::mktemp($opt))) { > chdir($oldcwd); > return $this->raiseError("PEAR_Packager: mktemp failed"); > } > @@ -135,7 +141,7 @@ > $tar =& new Archive_Tar($dest_package, $compress); > $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors > // ----- Creates with the package.xml file > - $ok = $tar->createModify($newpkgfile, '', $tmpdir); > + $ok = $tar->createModify(array($newpkgfile), '', $tmpdir); > if (PEAR::isError($ok)) { > chdir($oldcwd); > return $this->raiseError($ok); > Index: pear/PEAR/Registry.php > =================================================================== > RCS file: /repository/php-src/pear/PEAR/Registry.php,v > retrieving revision 1.46 > diff -u -r1.46 Registry.php > --- pear/PEAR/Registry.php 7 Jul 2003 15:42:58 -0000 1.46 > +++ pear/PEAR/Registry.php 29 Jul 2003 18:25:13 -0000 > @@ -146,7 +146,11 @@ > function _assertStateDir() > { > if (!@is_dir($this->statedir)) { > - if (!System::mkdir("-p {$this->statedir}")) { > + $opt = array( > + '-p', > + $this->statedir, > + ); > + if (!System::mkdir($opt)) { > return $this->raiseError("could not create directory '{$this->statedir}'"); > } > } > Index: pear/PEAR/Remote.php > =================================================================== > RCS file: /repository/php-src/pear/PEAR/Remote.php,v > retrieving revision 1.41 > diff -u -r1.41 Remote.php > --- pear/PEAR/Remote.php 12 Jul 2003 14:25:06 -0000 1.41 > +++ pear/PEAR/Remote.php 29 Jul 2003 18:25:13 -0000 > @@ -56,7 +56,8 @@ > $id = md5(serialize($args)); > $cachedir = $this->config->get('cache_dir'); > if (!file_exists($cachedir)) { > - System::mkdir('-p '.$cachedir); > + $opt = array('-p', $cachedir); > + System::mkdir($opt); > } > $filename = $cachedir . DIRECTORY_SEPARATOR . 'xmlrpc_cache_' . $id; > if (!file_exists($filename)) { > @@ -86,7 +87,8 @@ > $id = md5(serialize($args)); > $cachedir = $this->config->get('cache_dir'); > if (!file_exists($cachedir)) { > - System::mkdir('-p '.$cachedir); > + $opt = array('-p', $cachedir); > + System::mkdir($opt); > } > $filename = $cachedir.'/xmlrpc_cache_'.$id; > >

« previous php.pear.dev (#19058) next »