array(6) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
}
string(823) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
array(6) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
}
string(823) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
array(6) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
}
string(823) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
array(6) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
}
string(823) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
array(7) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
["packagenameregex"]=>
string(6) "[A-Z]+"
}
string(868) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<packagenameregex>[A-Z]+</packagenameregex>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
array(7) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
}
string(868) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<packagenameregex>[A-Z]+</packagenameregex>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
array(8) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
["provides"]=>
array(3) {
[1]=>
string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<provides>
</provides>
<packagenameregex>[A-Z]+</packagenameregex>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
array(8) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
}
string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<provides>
</provides>
<packagenameregex>[A-Z]+</packagenameregex>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
array(9) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
["mirrors"]=>
array(1) {
[1]=>
string(1313) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<provides>
</mirror>
</mirrors>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
array(9) {
["version"]=>
string(3) "1.0"
- ["deps"]=>
- array(1) {
- [1]=>
- array(3) {
- ["type"]=>
- string(3) "php"
- ["rel"]=>
- string(2) "ge"
- ["version"]=>
- string(5) "5.0.0"
- }
- }
["name"]=>
- string(5) "PEAR5"
+ string(5) "pear5"
["summary"]=>
string(23) "PEAR packages for PHP 5"
["server"]=>
}
}
["packagenameregex"]=>
- string(12) "release.list"
+ string(6) "[A-Z]+"
["mirrors"]=>
array(1) {
[1]=>
[1]=>
array(4) {
["name"]=>
- string(8) "PEAR5.qa"
+ string(8) "pear5.qa"
["server"]=>
string(15) "qa.pear.php.net"
["summary"]=>
}
}
}
+ ["deps"]=>
+ array(1) {
+ [1]=>
+ array(3) {
+ ["type"]=>
+ string(3) "php"
+ ["rel"]=>
+ string(2) "ge"
+ ["version"]=>
+ string(5) "5.0.0"
+ }
+ }
}
-string(1319) "<?xml version="1.0" encoding="ISO-8859-1" ?>
+string(1313) "<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
<channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
<summary>PEAR packages for PHP 5</summary>
<server>pear.php.net</server>
<provides>
<protocol type="xml-rpc" version="1.0">release.list</protocol>
<protocol type="get" version="1.0"/>
</provides>
- <packagenameregex>release.list</packagenameregex>
+ <packagenameregex>[A-Z]+</packagenameregex>
<mirrors>
<mirror type="server" name="mirror.php.net">
<provides>
</mirror>
</mirrors>
<subchannels>
- <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+ <subchannel name="pear5.qa" server="qa.pear.php.net">
<summary>Quality Assurance releases of unmaintained packages</summary>
<deps>
<dep type="pkg" rel="ge" version="1.4">PEAR</dep>
no error
has pkg2 works? no
$ret is PEAR_DEPENDENCY_MISSING? yes
-requires package `pkg2'
+requires package `pear::pkg2'
has optional pkg2 works? no
$ret is PEAR_DEPENDENCY_MISSING_OPTIONAL? yes
-package `pkg2' is recommended to utilize some features.
+package `pear::pkg2' is recommended to utilize some features.
le 0.9 works? no
$ret is PEAR_DEPENDENCY_CONFLICT? yes
-requires package `pkg1' <= 0.9
+requires package `pear::pkg1' <= 0.9
optional le 0.9 works? no
$ret is PEAR_DEPENDENCY_CONFLICT_OPTIONAL? yes
-package `pkg1' version <= 0.9 is recommended to utilize some features. Installed version is 1.0
+package `pear::pkg1' version <= 0.9 is recommended to utilize some features. Installed version is 1.0
ne 1.0 works? no
$ret is PEAR_DEPENDENCY_CONFLICT? yes
-requires package `pkg1' != 1.0
+requires package `pear::pkg1' != 1.0
optional ne 1.0 works? no
$ret is PEAR_DEPENDENCY_CONFLICT_OPTIONAL? yes
-package `pkg1' version != 1.0 is recommended to utilize some features. Installed version is 1.0
+package `pear::pkg1' version != 1.0 is recommended to utilize some features. Installed version is 1.0
ge 1.1 works? no
$ret is PEAR_DEPENDENCY_UPGRADE_MINOR? yes
-requires package `pkg1' >= 1.1
+requires package `pear::pkg1' >= 1.1
optional ge 1.1 works? no
$ret is PEAR_DEPENDENCY_UPGRADE_MINOR_OPTIONAL? yes
-package `pkg1' version >= 1.1 is recommended to utilize some features. Installed version is 1.0
+package `pear::pkg1' version >= 1.1 is recommended to utilize some features. Installed version is 1.0
ge 2.0 works? no
$ret is PEAR_DEPENDENCY_UPGRADE_MAJOR? yes
-requires package `pkg1' >= 2.0
+requires package `pear::pkg1' >= 2.0
optional ge 2.0 works? no
$ret is PEAR_DEPENDENCY_UPGRADE_MAJOR_OPTIONAL? yes
-package `pkg1' version >= 2.0 is recommended to utilize some features. Installed version is 1.0
+package `pear::pkg1' version >= 2.0 is recommended to utilize some features. Installed version is 1.0
gt 1.0 works? no
$ret is PEAR_DEPENDENCY_UPGRADE_MINOR? yes
-requires package `pkg1' > 1.0
+requires package `pear::pkg1' > 1.0
optional gt 1.0 works? no
$ret is PEAR_DEPENDENCY_UPGRADE_MINOR_OPTIONAL? yes
-package `pkg1' version > 1.0 is recommended to utilize some features. Installed version is 1.0
+package `pear::pkg1' version > 1.0 is recommended to utilize some features. Installed version is 1.0
not pkg1 works? no
$ret is PEAR_DEPENDENCY_CONFLICT? yes
-conflicts with package `pkg1'
+conflicts with package `pear::pkg1'
foobar pkg1 works? no
$ret is PEAR_DEPENDENCY_BAD_DEPENDENCY? yes
-relation 'foobar' with requirement '' is not supported (name=pkg1)
+relation 'foobar' with requirement '' is not supported (name=pear::pkg1)
goompness/Mopreeb.php exists? yes
goompness/oggbrzitzkee.php exists? yes
Test conflicting files:
-Caught error: pkg6conflict: conflicting files found:
+Caught error: pear::pkg6conflict: conflicting files found:
groob\goompness\oggbrzitzkee.php (pkg6)
groob\goompness\Mopreeb.php (pkg6)
}
// make the fake configuration - we'll use one of these and it should work
$config = serialize(array('master_server' => 'pear.php.net',
+ 'default_channel' => 'pear',
'php_dir' => $temp_path . DIRECTORY_SEPARATOR . 'php',
'ext_dir' => $temp_path . DIRECTORY_SEPARATOR . 'ext',
'data_dir' => $temp_path . DIRECTORY_SEPARATOR . 'data',
'doc_dir' => $temp_path . DIRECTORY_SEPARATOR . 'doc',
'test_dir' => $temp_path . DIRECTORY_SEPARATOR . 'test',
- 'bin_dir' => $temp_path . DIRECTORY_SEPARATOR . 'bin',));
+ 'bin_dir' => $temp_path . DIRECTORY_SEPARATOR . 'bin',
+ '__channels' => array(
+ 'frob' => array(
+ 'php_dir' => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob',
+ ))));
touch($temp_path . DIRECTORY_SEPARATOR . 'pear.conf');
$fp = fopen($temp_path . DIRECTORY_SEPARATOR . 'pear.conf', 'w');
fwrite($fp, $config);
// for PEAR_Config initialization
putenv('HOME="'.$temp_path);
}
+require_once 'PEAR/ChannelFile.php';
+require_once 'PEAR/Registry.php';
+$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
+$chan = new PEAR_ChannelFile;
+$chan->setName('frob');
+$chan->setSummary('test');
+$chan->setServer('test');
+$reg->addChannel($chan);
+$chan->setName('groob');
+$reg->addChannel($chan);
require_once "PEAR/Installer.php";
// no UI is needed for these tests
}
echo "Test package.xml direct install:\n";
-$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'package.xml');
+$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'package2.xml');
$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
-var_dump($reg->listPackages());
+var_dump($reg->listAllPackages());
echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
. DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
. DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
. DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
. DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
. DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
-echo "After uninstall:\n";
-$installer->uninstall('pkg6');
-var_dump($reg->listPackages());
-echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
-echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
- . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
-echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
- . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
-echo "goompness exists? ";
-echo (is_dir($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'))
- ? "yes\n" : "no\n";
+echo "goompness/test.dat exists? ";
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'pkg6'
+ . DIRECTORY_SEPARATOR . 'goompness'
+ . DIRECTORY_SEPARATOR . 'test.dat')) ? "yes\n" : "no\n";
-echo "Test .tgz install:\n";
-$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'pkg6-1.1.tgz');
-$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
-var_dump($reg->listPackages());
-echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
-echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
- . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
-echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
- . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
-echo "After uninstall:\n";
-$installer->uninstall('pkg6');
-var_dump($reg->listPackages());
-echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
-echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
- . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
-echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
- . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
-echo "goompness exists? ";
-echo (is_dir($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'))
- ? "yes\n" : "no\n";
+echo "Test conflicting files:\n";
+$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'conflictpackage2.xml');
-echo "Test invalid .tgz install:\n";
-$error_to_catch = 'unable to unpack ' . dirname(__FILE__) . DIRECTORY_SEPARATOR .
- 'test-pkg6' . DIRECTORY_SEPARATOR . 'invalidtgz.tgz';
-$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'invalidtgz.tgz');
-$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
-var_dump($reg->listPackages());
-echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
-echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
- . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
-echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
- . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
- . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
+echo "Test unknown channel:\n";
+$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'package2_invalid.xml');
-echo "Test missing package.xml in .tgz install:\n";
-$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'nopackagexml.tgz');
-$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
-var_dump($reg->listPackages());
+echo "After uninstall:\n";
+$installer->uninstall('frob::pkg6');
+var_dump($reg->listAllPackages());
echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
. DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
. DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
. DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
. DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
. DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
+echo "goompness/test.dat exists? ";
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'pkg6'
+ . DIRECTORY_SEPARATOR . 'goompness'
+ . DIRECTORY_SEPARATOR . 'test.dat')) ? "yes\n" : "no\n";
chdir($curdir);
cleanall($temp_path);
--POST--
--EXPECT--
Test package.xml direct install:
-array(1) {
- [0]=>
- string(4) "pkg6"
-}
-zoorb.php exists? yes
-goompness/Mopreeb.php exists? yes
-goompness/oggbrzitzkee.php exists? yes
-After uninstall:
-array(0) {
-}
-zoorb.php exists? no
-goompness/Mopreeb.php exists? no
-goompness/oggbrzitzkee.php exists? no
-goompness exists? no
-Test .tgz install:
-array(1) {
- [0]=>
- string(4) "pkg6"
+array(3) {
+ ["frob"]=>
+ array(1) {
+ [0]=>
+ string(4) "pkg6"
+ }
+ ["groob"]=>
+ array(0) {
+ }
+ ["pear"]=>
+ array(0) {
+ }
}
zoorb.php exists? yes
goompness/Mopreeb.php exists? yes
goompness/oggbrzitzkee.php exists? yes
+goompness/test.dat exists? yes
+Test conflicting files:
+Caught error: groob::pkg6conflict: conflicting files found:
+groob\goompness\oggbrzitzkee.php (frob::pkg6)
+ groob\goompness\Mopreeb.php (frob::pkg6)
+ groob\goompness\test.dat (frob::pkg6)
+
+Test unknown channel:
+Error: Unknown channel, "gorp"
+Caught error: Installation failed: invalid package file, use option force to install anyway
After uninstall:
-array(0) {
-}
-zoorb.php exists? no
-goompness/Mopreeb.php exists? no
-goompness/oggbrzitzkee.php exists? no
-goompness exists? no
-Test invalid .tgz install:
-Caught error: Invalid checksum for file "<?xml version="1.0" encoding="ISO-8859-1" ?>
- <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/" : 37649 calculated, 0 expected
-Caught expected error
-array(0) {
-}
-zoorb.php exists? no
-goompness/Mopreeb.php exists? no
-goompness/oggbrzitzkee.php exists? no
-Test missing package.xml in .tgz install:
-warning : you are using an archive with an old format
-Caught error: no package.xml file after extracting the archive
-array(0) {
+array(3) {
+ ["frob"]=>
+ array(0) {
+ }
+ ["groob"]=>
+ array(0) {
+ }
+ ["pear"]=>
+ array(0) {
+ }
}
zoorb.php exists? no
goompness/Mopreeb.php exists? no
goompness/oggbrzitzkee.php exists? no
+goompness/test.dat exists? no
putenv('HOME="'.$temp_path);
}
require_once "PEAR/Packager.php";
-
+require_once 'PEAR/Registry.php';
+$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
$packager = new PEAR_Packager();
+$packager->setRegistry($reg);
$curdir = getcwd();
chdir(dirname(__FILE__));
var_dump($reg->deletePackage("pkg2"));
dumpall($reg);
-echo "add package with conflicting files:\n";
-var_dump($reg->addPackage('pkg2', array('name' => 'pkg2', 'version' => '1.0', 'filelist' => $files1)));
-dumpall($reg);
-
$reg->updatePackage("pkg3", array("version" => "3.1b1", "status" => "beta"));
dumpall($reg);
pkg1: version="1.0" filelist=array(pkg1-1.php[role=php],pkg1-2.php[role=php,baseinstalldir=pkg1])
pkg3: version="3.0" filelist=array(pkg3-1.php[role=php],pkg3-2.php[role=php,baseinstalldir=pkg3])
dump done
-add package with conflicting files:
-caught ErrorStack error:
-message: package pear::pkg2 has files that conflict with installed packages pear::pkg1
-code: -5
-bool(false)
-dumping registry...
-channel pear:
-pkg1: version="1.0" filelist=array(pkg1-1.php[role=php],pkg1-2.php[role=php,baseinstalldir=pkg1])
-pkg3: version="3.0" filelist=array(pkg3-1.php[role=php],pkg3-2.php[role=php,baseinstalldir=pkg3])
-dump done
dumping registry...
channel pear:
pkg1: version="1.0" filelist=array(pkg1-1.php[role=php],pkg1-2.php[role=php,baseinstalldir=pkg1])