svn: /pear2/Pyrus/trunk/ package.xml package_compatible.xml pyrus.phar src/Pyrus/Installer/Role/Common.php

From: Date: Mon, 03 Aug 2009 20:43:58 +0000
Subject: svn: /pear2/Pyrus/trunk/ package.xml package_compatible.xml pyrus.phar src/Pyrus/Installer/Role/Common.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-56880@lists.php.net to get a copy of this message
saltybeagle Mon, 03 Aug 2009 20:43:58 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=286767 Log: Trim extra {package}/{channel}/ directories so that installs don't end up with those directories doubled up. Changed paths: U pear2/Pyrus/trunk/package.xml U pear2/Pyrus/trunk/package_compatible.xml U pear2/Pyrus/trunk/pyrus.phar U pear2/Pyrus/trunk/src/Pyrus/Installer/Role/Common.php Modified: pear2/Pyrus/trunk/package.xml =================================================================== --- pear2/Pyrus/trunk/package.xml 2009-08-03 20:38:32 UTC (rev 286766) +++ pear2/Pyrus/trunk/package.xml 2009-08-03 20:43:58 UTC (rev 286767) @@ -35,8 +35,8 @@ <email>cellog@php.net</email> <active>yes</active> </lead> - <date>2009-08-01</date> - <time>13:10:29</time> + <date>2009-08-03</date> + <time>15:32:56</time> <version> <release>2.0.0a1</release> <api>2.0.0a1</api> Modified: pear2/Pyrus/trunk/package_compatible.xml =================================================================== --- pear2/Pyrus/trunk/package_compatible.xml 2009-08-03 20:38:32 UTC (rev 286766) +++ pear2/Pyrus/trunk/package_compatible.xml 2009-08-03 20:43:58 UTC (rev 286767) @@ -35,8 +35,8 @@ <email>cellog@php.net</email> <active>yes</active> </lead> - <date>2009-08-01</date> - <time>13:10:30</time> + <date>2009-08-03</date> + <time>15:32:57</time> <version> <release>2.0.0a1</release> <api>2.0.0a1</api> Modified: pear2/Pyrus/trunk/pyrus.phar =================================================================== (Binary files differ) Modified: pear2/Pyrus/trunk/src/Pyrus/Installer/Role/Common.php =================================================================== --- pear2/Pyrus/trunk/src/Pyrus/Installer/Role/Common.php 2009-08-03 20:38:32 UTC (rev 286766) +++ pear2/Pyrus/trunk/src/Pyrus/Installer/Role/Common.php 2009-08-03 20:43:58 UTC (rev 286767) @@ -158,24 +158,22 @@ } if ($this->info['honorsbaseinstall']) { - $dest_dir = $save_destdir = ''; + $dest_dir = ''; if ($file->baseinstalldir) { $dest_dir .= $file->baseinstalldir; } } elseif ($this->info['unusualbaseinstall']) { if (!$pkg->isNewPackage()) { // Place files using the old doc dir structure - $dest_dir = $save_destdir = $pkg->name; + $dest_dir = $pkg->name; } else { - $dest_dir = $save_destdir = - $pkg->name . DIRECTORY_SEPARATOR . $pkg->channel; + $dest_dir = $pkg->name . DIRECTORY_SEPARATOR . $pkg->channel; } if ($file->baseinstalldir) { $dest_dir .= DIRECTORY_SEPARATOR . $file->baseinstalldir; } } else { - $dest_dir = $save_destdir = - $pkg->name . DIRECTORY_SEPARATOR . $pkg->channel; + $dest_dir = $pkg->name . DIRECTORY_SEPARATOR . $pkg->channel; } if (dirname($file->name) != '.' && empty($file['install-as'])) { @@ -200,6 +198,14 @@ $newpath = ''; } } + $r = $pkg->name . DIRECTORY_SEPARATOR . $pkg->channel; + if (strpos($newpath, $r) === 0) { + // Trim off extra channel and package name directories + $newpath = substr($newpath, strlen($r) + 1); + if ($newpath === false) { + $newpath = ''; + } + } } if ($dest_dir && $newpath) { $dest_dir .= DIRECTORY_SEPARATOR;

« previous php.pear.cvs (#56880) next »