<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: MASTERPORT : who uses it?</title>
	<atom:link href="http://news.freshports.org/2007/10/11/masterport-who-uses-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://news.freshports.org/2007/10/11/masterport-who-uses-it/</link>
	<description>News and announcements regarding FreshPorts, The Place For Ports.</description>
	<pubDate>Thu, 07 Aug 2008 20:04:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Dan Langille</title>
		<link>http://news.freshports.org/2007/10/11/masterport-who-uses-it/#comment-1449</link>
		<dc:creator>Dan Langille</dc:creator>
		<pubDate>Fri, 12 Oct 2007 14:58:51 +0000</pubDate>
		<guid isPermaLink="false">http://news.freshports.org/2007/10/11/masterport-who-uses-it/#comment-1449</guid>
		<description>After running set-master-port.pl, the master port for each port is correctly set.  Then, I ran refresh-slave-ports.pl to refresh all the slave ports based on the current master port definitions.  This needed to be done because all slave ports are updated automatically after a commit to a master port. Since master/slave relationships were not correct in the database, this last step was required to get things up to date.

One relationship was missed in all this: I needed to clear the cache for each master port.  Each master port lists all the slave ports.  Similarly, each slave port list its master port.  Rather than code a solution, I did this:

&lt;pre&gt;
SELECT DISTINCT('rm -rf /usr/websites/freshports.org/dynamic/caching/cache/ports/' 
&#124;&#124; master_port &#124;&#124; '/*') FROM ports_active WHERE master_port &lt;&gt; '';
&lt;/pre&gt;
The resulting output became a shell script, which cleared out the cache.

More about this in the next article.</description>
		<content:encoded><![CDATA[<p>After running set-master-port.pl, the master port for each port is correctly set.  Then, I ran refresh-slave-ports.pl to refresh all the slave ports based on the current master port definitions.  This needed to be done because all slave ports are updated automatically after a commit to a master port. Since master/slave relationships were not correct in the database, this last step was required to get things up to date.</p>
<p>One relationship was missed in all this: I needed to clear the cache for each master port.  Each master port lists all the slave ports.  Similarly, each slave port list its master port.  Rather than code a solution, I did this:</p>
<pre>
SELECT DISTINCT('rm -rf /usr/websites/freshports.org/dynamic/caching/cache/ports/'
|| master_port || '/*') FROM ports_active WHERE master_port <> &#8221;;
</pre>
<p>The resulting output became a shell script, which cleared out the cache.</p>
<p>More about this in the next article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Langille</title>
		<link>http://news.freshports.org/2007/10/11/masterport-who-uses-it/#comment-1448</link>
		<dc:creator>Dan Langille</dc:creator>
		<pubDate>Fri, 12 Oct 2007 09:47:49 +0000</pubDate>
		<guid isPermaLink="false">http://news.freshports.org/2007/10/11/masterport-who-uses-it/#comment-1448</guid>
		<description>The fix may be as simple as:

$ cvs di port.pm
Index: port.pm
===================================================================
RCS file: /home/repositories/freshports-1/scripts/port.pm,v
retrieving revision 1.43
diff -r1.43 port.pm
534a535,536
&gt;
&gt;               $master_port =~ s&#124;$FreshPorts::Config::path_to_ports/&#124;&#124;;
$


I'm running the Verify/set-master-port.pl script now.</description>
		<content:encoded><![CDATA[<p>The fix may be as simple as:</p>
<p>$ cvs di port.pm<br />
Index: port.pm<br />
===================================================================<br />
RCS file: /home/repositories/freshports-1/scripts/port.pm,v<br />
retrieving revision 1.43<br />
diff -r1.43 port.pm<br />
534a535,536<br />
><br />
>               $master_port =~ s|$FreshPorts::Config::path_to_ports/||;<br />
$</p>
<p>I&#8217;m running the Verify/set-master-port.pl script now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Langille</title>
		<link>http://news.freshports.org/2007/10/11/masterport-who-uses-it/#comment-1447</link>
		<dc:creator>Dan Langille</dc:creator>
		<pubDate>Thu, 11 Oct 2007 23:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://news.freshports.org/2007/10/11/masterport-who-uses-it/#comment-1447</guid>
		<description>I now think this problem can be solved with a simple string match and optional removal.  In which case, the problem goes away entirely.</description>
		<content:encoded><![CDATA[<p>I now think this problem can be solved with a simple string match and optional removal.  In which case, the problem goes away entirely.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
