<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>PEAR_Server/Server</tt></b> on <span id="info">MAIN</span></td></tr>
<tr><td><tt><a href="#file1">Release.php</a></tt></td><td align="right" id="added">+5</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Release.php?r=1.3">1.3</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Release.php?r1=1.3&r2=1.4">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Release.php?r=1.4">1.4</a></td></tr>
<tr class="alt"><td><tt><a href="#file2">restsetup.php</a></tt></td><td align="right" id="added">+14</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.6">1.6</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/restsetup.php?r1=1.6&r2=1.7">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.7">1.7</a></td></tr>
<tr><td><tt><a href="#file3">Release.php</a></tt></td><td align="right" id="added">+5</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Release.php?r=1.3">1.3</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Release.php?r1=1.3&r2=1.4">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Release.php?r=1.4">1.4</a></td></tr>
<tr class="alt"><td><tt><a href="#file4">restsetup.php</a></tt></td><td align="right" id="added">+14</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.6">1.6</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/restsetup.php?r1=1.6&r2=1.7">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.7">1.7</a></td></tr>
<tr><td><tt>Backend/<a href="#file5">DBDataObject.php</a></tt></td><td align="right" id="added">+38</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.27">1.27</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Backend/DBDataObject.php?r1=1.27&r2=1.28">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.28">1.28</a></td></tr>
<tr><td></td><td align="right" id="added">+76</td><td align="right" id="removed">-1</td><td></td></tr>
</table>
<small id="info">5 modified files</small><br />
<pre class="comment">
implement modifying channel.xml to note REST1.0
support. This requires PEAR 1.4.0a12 because
theres is buggies in PEAR_ChannelFile for all
existing PEAR releases when relating to REST
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a><br /></span>
<div class="fileheader"><big><b>Release.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Release.php?r=1.3">1.3</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Release.php?r1=1.3&r2=1.4">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Release.php?r=1.4">1.4</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- Release.php        6 Apr 2005 21:30:25 -0000        1.3
+++ Release.php        24 Apr 2005 03:26:40 -0000        1.4
@@ -110,6 +110,11 @@
</small></pre><pre class="diff" id="context"> return $this->_releaser;
}
</pre><pre class="diff" id="added">+ public function getDependencies()
+ {
+ return $this->_packageInfo->getDependencies();
+ }
+
</pre><pre class="diff" id="context"> public function getDeps($v2deps = true)
{
if ($v2deps) {
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a><br /></span>
<div class="fileheader"><big><b>restsetup.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.6">1.6</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/restsetup.php?r1=1.6&r2=1.7">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.7">1.7</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- restsetup.php        22 Apr 2005 23:17:53 -0000        1.6
+++ restsetup.php        24 Apr 2005 03:26:40 -0000        1.7
@@ -90,6 +90,17 @@
</small></pre><pre class="diff" id="context"> }
$chan->rest_support = 1;
$chan->update();
</pre><pre class="diff" id="added">+ $this->_ui->outputData('Adding REST 1.0 to channel.xml');
+ $chan = $this->_registry->getChannel($this->channel);
+ if (is_a($chan, 'PEAR_ChannelFile')) {
+ $chan->setBaseURL('REST1.0', 'http://' . $this->channel . '/Chiara_PEAR_Server_REST/');
+ $this->_registry->updateChannel($chan);
+ file_put_contents($answers['webroot'] . DIRECTORY_SEPARATOR . 'channel.xml',
+ $chan->toXml());
+ } else {
+ $this->_ui->outputData('Channel is not registered in local channel database');
+ return false;
+ }
</pre><pre class="diff" id="context"> $channelinfo = parse_url($this->channel);
$backend = new Chiara_PEAR_Server_Backend_DBDataObject($this->channel, $restroot, $options);
// package information directory
</pre><pre class="diff"><small id="info">@@ -131,6 +142,9 @@
</small></pre><pre class="diff" id="context"> foreach ($releases as $version => $release) {
$this->_ui->outputData(' Version ' . $version);
$backend->saveReleaseREST($package['package'], $version);
</pre><pre class="diff" id="added">+ $backend->savePackageDepsREST($package['package'], $version,
+ $backend->getPackageFileObject($package['package'],
+ $version)->getDependencies());
</pre><pre class="diff" id="context"> }
}
}
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a><br /></span>
<div class="fileheader"><big><b>Release.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Release.php?r=1.3">1.3</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Release.php?r1=1.3&r2=1.4">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Release.php?r=1.4">1.4</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- Release.php        6 Apr 2005 21:30:25 -0000        1.3
+++ Release.php        24 Apr 2005 03:26:40 -0000        1.4
@@ -110,6 +110,11 @@
</small></pre><pre class="diff" id="context"> return $this->_releaser;
}
</pre><pre class="diff" id="added">+ public function getDependencies()
+ {
+ return $this->_packageInfo->getDependencies();
+ }
+
</pre><pre class="diff" id="context"> public function getDeps($v2deps = true)
{
if ($v2deps) {
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a><br /></span>
<div class="fileheader"><big><b>restsetup.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.6">1.6</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/restsetup.php?r1=1.6&r2=1.7">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/restsetup.php?r=1.7">1.7</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- restsetup.php        22 Apr 2005 23:17:53 -0000        1.6
+++ restsetup.php        24 Apr 2005 03:26:40 -0000        1.7
@@ -90,6 +90,17 @@
</small></pre><pre class="diff" id="context"> }
$chan->rest_support = 1;
$chan->update();
</pre><pre class="diff" id="added">+ $this->_ui->outputData('Adding REST 1.0 to channel.xml');
+ $chan = $this->_registry->getChannel($this->channel);
+ if (is_a($chan, 'PEAR_ChannelFile')) {
+ $chan->setBaseURL('REST1.0', 'http://' . $this->channel . '/Chiara_PEAR_Server_REST/');
+ $this->_registry->updateChannel($chan);
+ file_put_contents($answers['webroot'] . DIRECTORY_SEPARATOR . 'channel.xml',
+ $chan->toXml());
+ } else {
+ $this->_ui->outputData('Channel is not registered in local channel database');
+ return false;
+ }
</pre><pre class="diff" id="context"> $channelinfo = parse_url($this->channel);
$backend = new Chiara_PEAR_Server_Backend_DBDataObject($this->channel, $restroot, $options);
// package information directory
</pre><pre class="diff"><small id="info">@@ -131,6 +142,9 @@
</small></pre><pre class="diff" id="context"> foreach ($releases as $version => $release) {
$this->_ui->outputData(' Version ' . $version);
$backend->saveReleaseREST($package['package'], $version);
</pre><pre class="diff" id="added">+ $backend->savePackageDepsREST($package['package'], $version,
+ $backend->getPackageFileObject($package['package'],
+ $version)->getDependencies());
</pre><pre class="diff" id="context"> }
}
}
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname"><a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server">PEAR_Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server">Server</a>/<a href="http://cvs.phpdoc.org/cvs.php/PEAR_Server/Server/Backend">Backend</a><br /></span>
<div class="fileheader"><big><b>DBDataObject.php</b></big> <small id="info"><a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.27">1.27</a> <a href="http://cvs.phpdoc.org/diff.php/PEAR_Server/Server/Backend/DBDataObject.php?r1=1.27&r2=1.28">-></a> <a href="http://cvs.phpdoc.org/co.php/PEAR_Server/Server/Backend/DBDataObject.php?r=1.28">1.28</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.27 -r1.28
--- DBDataObject.php        23 Apr 2005 17:25:39 -0000        1.27
+++ DBDataObject.php        24 Apr 2005 03:26:40 -0000        1.28
@@ -174,6 +174,8 @@
</small></pre><pre class="diff" id="context"> $releasedata->packagexml = $release->getXml();
$ret = $releasedata->insert();
if ($ret) {
</pre><pre class="diff" id="added">+ $this->savePackageDepsREST($releasedata->package, $releasedata->version,
+ $release->getDependencies());
</pre><pre class="diff" id="context"> $this->savePackageREST($releasedata->package);
$this->savePackageMaintainersREST($releasedata->package);
$this->saveReleaseREST($releasedata->package, $releasedata->version);
</pre><pre class="diff"><small id="info">@@ -182,6 +184,31 @@
</small></pre><pre class="diff" id="context"> return $ret;
}
</pre><pre class="diff" id="added">+ public function savePackageDepsREST($package, $version, $deps)
+ {
+ $channel = DB_DataObject::factory('channels');
+ $channel->channel = $this->_channel;
+ $channel->find(true);
+ if ($channel->rest_support) {
+ $channelinfo = parse_url($this->_channel);
+ if (isset($channelinfo['host'])) {
+ $extra = $channelinfo['path'] . '/Chiara_PEAR_Server_REST/';
+ } else {
+ $extra = '/Chiara_PEAR_Server_REST/';
+ }
+ $rdir = $this->_restdir . DIRECTORY_SEPARATOR . 'r';
+ if (!file_exists($rdir . DIRECTORY_SEPARATOR . strtolower($package))) {
+ System::mkdir(array('-p', $rdir . DIRECTORY_SEPARATOR . strtolower($package)));
+ @chmod($rdir . DIRECTORY_SEPARATOR . strtolower($package), 0777);
+ }
+
+ file_put_contents($rdir . DIRECTORY_SEPARATOR . strtolower($package) .
+ DIRECTORY_SEPARATOR . 'deps.' . $version . '.txt', serialize($deps));
+ @chmod($rdir . DIRECTORY_SEPARATOR . strtolower($package) .
+ DIRECTORY_SEPARATOR . 'deps.' . $version . '.txt', 0666);
+ }
+ }
+
</pre><pre class="diff" id="context"> public function savePackageMaintainersREST($package)
{
$channel = DB_DataObject::factory('channels');
</pre><pre class="diff"><small id="info">@@ -309,6 +336,8 @@
</small></pre><pre class="diff" id="context"> @unlink($rdir . DIRECTORY_SEPARATOR . strtolower($package) .
DIRECTORY_SEPARATOR . $version . '.xml');
@unlink($rdir . DIRECTORY_SEPARATOR . strtolower($package) .
</pre><pre class="diff" id="added">+ DIRECTORY_SEPARATOR . 'deps.' . $version . '.txt');
+ @unlink($rdir . DIRECTORY_SEPARATOR . strtolower($package) .
</pre><pre class="diff" id="context"> DIRECTORY_SEPARATOR . 'package.' . $version . '.xml');
$this->saveAllReleasesREST($package);
}
</pre><pre class="diff"><small id="info">@@ -394,6 +423,15 @@
</small></pre><pre class="diff" id="context"> }
}
</pre><pre class="diff" id="added">+ public function getPackageFileObject($package, $version)
+ {
+ require_once 'PEAR/PackageFile.php';
+ $config = PEAR_Config::singleton();
+ $pkg = new PEAR_PackageFile($config);
+ return $pkg->fromXmlString($this->getPackageXml($package, $version), PEAR_VALIDATE_DOWNLOADING,
+ '');
+ }
+
</pre><pre class="diff" id="context"> public function listPackages($releasedOnly = true, $onlyStable = true, $nosubpackages = true)
{
$packages = DB_DataObject::factory('packages');
</pre><pre class="diff"><small id="info">@@ -887,7 +925,6 @@
</small></pre><pre class="diff" id="context">
public function getPackage($pkg)
{
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="context"> $p = DB_DataObject::factory('packages');
$p->channel = $this->_channel;
$p->package = $pkg;
</pre></div>
</body></html><pre>