tc listBuildPortsQueue
Alexander Logvinov
freebsd at akavia.ru
Tue Feb 20 19:19:55 EST 2007
Hello, Joe.
On 2007-02-21, 2:23:34 you wrote:
>> tinderbox-2.3.4_3
>> When BuildPortsQueue is empty I get this:
>> # ./tc listBuildPortsQueue
>> +=====+===========================+=====================================+=====+
>> | Id | Build Name | Port Directory | Pri |
>> +=====+===========================+=====================================+=====+
>> Can't call method "getName" on an undefined value at ./tc line 1457.
>> And that is why tinderd.sh annoying me on console:
>> Can't call method "getName" on an undefined value at /usr/local/tinderbox/scripts/tc line 1449.
> You should be using tinderbox-list at marcuscom.com to discuss such things
> as it is archived.
> It looks like you have not added any ports in your queue to a Build.
> Try running "tc addPort" and see if that helps.
No, I have some ports in the Build. I found what the problem is. There is some old ports in the "build_ports_queue" table with Build_Id which not longer exists in the "builds" table, that is why $build->getName() ($build is undef) can't get real name of the Build. For example it works with modified tc:
printf(
"| %3d | %-25s | %-35s | %3d |\n",
$buildport->getId(),
"Test",
$buildport->getPortDirectory(),
$buildport->getPriority()
);
# ./tc listBuildPortsQueue
+=====+===========================+=====================================+=====+
| Id | Build Name | Port Directory | Pri |
+=====+===========================+=====================================+=====+
| 1 | Test | comms/atslog | 1 |
+-----+---------------------------+-------------------------------------+-----+
| 2 | Test | textproc/bbe | 10 |
+-----+---------------------------+-------------------------------------+-----+
| 12 | 6-STABLE | comms/atslog | 10 |
+-----+---------------------------+-------------------------------------+-----+
Here is possible fix for it (normal diff in attach):
--- tc.orig Mon Feb 19 14:28:52 2007
+++ tc Wed Feb 21 08:44:14 2007
@@ -1445,10 +1445,14 @@
if ($buildport) {
my $build =
$ds->getBuildById($buildport->getBuildId());
+ my $buildname = "UNKNOWN";
+ if ($build) {
+ $buildname = $build->getName();
+ }
if ($raw eq 1) {
print $buildport->getId() . ":"
. $buildport->getUserId() . ":"
- . $build->getName() . ":"
+ . $buildname . ":"
. $buildport->getPortDirectory()
. ":"
. $buildport->getEmailOnCompletion()
@@ -1457,7 +1461,7 @@
printf(
"| %3d | %-25s | %-35s | %3d |\n",
$buildport->getId(),
- $build->getName(),
+ $buildname,
$buildport->getPortDirectory(),
$buildport->getPriority()
);
--
WBR, Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tc.diff
Type: application/octet-stream
Size: 1461 bytes
Desc: not available
Url : http://marcuscom.com/pipermail/tinderbox-list/attachments/20070221/4f581765/attachment.obj
More information about the tinderbox-list
mailing list