Tinderbox postgresql fixes

Edwin Groothuis edwin at mavetju.org
Sun Oct 30 06:12:44 EST 2005


Based on the 2.1.1 code

This is a fix the date/time output on a PostgreSQL database. The
time there is stored inclusive of milliseconds. This patch cuts
them off. Should be harmless for MySQL.

Also add some lines to the README about pgsql and www/ files.

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin at mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/
-------------- next part --------------
diff -ru /root/tinderbox-2.1.1/README ./README
--- /root/tinderbox-2.1.1/README	Sun Oct 16 15:15:17 2005
+++ ./README	Sun Oct 30 14:52:46 2005
@@ -26,7 +26,8 @@
 must also be installed (databases/p5-DBD-Pg).
 
 The web front-ends require php4 (lang/php4), php4-mysql extension
-(databases/php4-mysql), and PEAR::DB (databases/pear-DB).
+(databases/php4-mysql) or php4-pgsql extensions (databases/php4-pgsql),
+and PEAR::DB (databases/pear-DB).
 
 The standard web front-end (found in the ``www'' subdirectory) requires you
 have "register_globals=on" in your php.ini.  The experimental web front-end
@@ -89,6 +90,8 @@
    http://tinderbox.marcuscom.com.
 
 7. Edit ${pb}/scripts/tinderbox.ph for your environment.
+   Also edit ${pb}/scripts/www/inc_* and ${pb}/scripts/www-exp/inc_*
+   for your environment.
 
 8. Initialize the Tinderbox:
 
diff -ru /root/tinderbox-2.1.1/www-exp/templates/default/describe_port.tpl ./www-exp/templates/default/describe_port.tpl
--- /root/tinderbox-2.1.1/www-exp/templates/default/describe_port.tpl	Sun Oct 16 15:15:17 2005
+++ ./www-exp/templates/default/describe_port.tpl	Sun Oct 30 13:49:06 2005
@@ -49,8 +49,8 @@
 						<a href="<?=$row['port_link_package']?>">package</a>
 					<?}?>
 				</td>
-				<td><?=$row['port_last_built']?></td>
-				<td><?=$row['port_last_successful_built']?></td>
+				<td><?=substr($row['port_last_built'],0,19)?></td>
+				<td><?=substr($row['port_last_successful_built'],0,19)?></td>
 			</tr>
 		<?}?>
 	</table>
diff -ru /root/tinderbox-2.1.1/www-exp/templates/default/failed_buildports.tpl ./www-exp/templates/default/failed_buildports.tpl
--- /root/tinderbox-2.1.1/www-exp/templates/default/failed_buildports.tpl	Sun Oct 16 15:15:17 2005
+++ ./www-exp/templates/default/failed_buildports.tpl	Sun Oct 30 13:49:47 2005
@@ -45,8 +45,8 @@
 						<a href="<?=$row['port_link_package']?>">package</a>
 					<?}?>
 				</td>
-				<td><?=$row['port_last_built']?></td>
-				<td><?=$row['port_last_successful_built']?></td>
+				<td><?=substr($row['port_last_built'],0,19)?></td>
+				<td><?=substr($row['port_last_successful_built'],0,19)?></td>
 			</tr>
 		<?}?>
 	</table>
diff -ru /root/tinderbox-2.1.1/www-exp/templates/default/latest_buildports.tpl ./www-exp/templates/default/latest_buildports.tpl
--- /root/tinderbox-2.1.1/www-exp/templates/default/latest_buildports.tpl	Sun Oct 16 15:15:17 2005
+++ ./www-exp/templates/default/latest_buildports.tpl	Sun Oct 30 13:50:06 2005
@@ -40,8 +40,8 @@
 						<a href="<?=$row['port_link_package']?>">package</a>
 					<?}?>
 				</td>
-				<td><?=$row['port_last_built']?></td>
-				<td><?=$row['port_last_successful_built']?></td>
+				<td><?=substr($row['port_last_built'],0,19)?></td>
+				<td><?=substr($row['port_last_successful_built'],0,19)?></td>
 			</tr>
 		<?}?>
 	</table>
diff -ru /root/tinderbox-2.1.1/www-exp/templates/default/list_buildports.tpl ./www-exp/templates/default/list_buildports.tpl
--- /root/tinderbox-2.1.1/www-exp/templates/default/list_buildports.tpl	Sun Oct 16 15:15:17 2005
+++ ./www-exp/templates/default/list_buildports.tpl	Sun Oct 30 13:51:08 2005
@@ -14,7 +14,7 @@
  </tr>
  <tr>
   <td>System</td>
-  <td>FreeBSD <?=$jail_name?> (<?=$jail_tag?>) updated on <?=$jail_lastbuilt?></td>
+  <td>FreeBSD <?=$jail_name?> (<?=$jail_tag?>) updated on <?=substr($jail_lastbuilt,0,19)?></td>
  </tr>
  <tr>
   <td>Ports Tree</td>
@@ -63,8 +63,8 @@
 						<a href="<?=$row['port_link_package']?>">package</a>
 					<?}?>
 				</td>
-				<td><?=$row['port_last_built']?></td>
-				<td><?=$row['port_last_successful_built']?></td>
+				<td><?=substr($row['port_last_built'],0,19)?></td>
+				<td><?=substr($row['port_last_successful_built'],0,19)?></td>
 			</tr>
 		<?}?>
 	</table>


More information about the tinderbox-list mailing list