FreeBSD Port: portscout-0.7.4_2

Douglas Thrift douglas at douglasthrift.net
Tue May 18 06:34:11 UTC 2010


On 5/17/2010 8:22 PM, Douglas Thrift wrote:
> Hello,
> 
> Today I decided to set up portscout on my server. Everything seemed fine
> until I went to run "portscout generate" to make the HTML output:
> 
> portscout v0.7.4, by Shaun Amott
> 
> Found 21749 ports
> 
> Organising results...
> DBD::Pg::st execute failed: ERROR:  cannot insert multiple commands into
> a prepared statement at /usr/local/bin/portscout line 1844.
> Generating index sorted by withnewdistfile...
> DBD::Pg::st execute failed: ERROR:  relation "results" does not exist
> LINE 1: SELECT * FROM results ORDER BY withnewdistfile DESC
>                       ^ at /usr/local/bin/portscout line 1873.
> DBD::Pg::st fetchrow_hashref failed: no statement executing at
> /usr/local/bin/portscout line 1875.
> Generating index sorted by maintainer...
> DBD::Pg::st execute failed: ERROR:  relation "results" does not exist
> LINE 1: SELECT * FROM results ORDER BY maintainer ASC
>                       ^ at /usr/local/bin/portscout line 1873.
> DBD::Pg::st fetchrow_hashref failed: no statement executing at
> /usr/local/bin/portscout line 1875.
> Generating index sorted by total...
> DBD::Pg::st execute failed: ERROR:  relation "results" does not exist
> LINE 1: SELECT * FROM results ORDER BY total DESC
>                       ^ at /usr/local/bin/portscout line 1873.
> DBD::Pg::st fetchrow_hashref failed: no statement executing at
> /usr/local/bin/portscout line 1875.
> Generating index sorted by percentage...
> DBD::Pg::st execute failed: ERROR:  relation "results" does not exist
> LINE 1: SELECT * FROM results ORDER BY percentage DESC
>                       ^ at /usr/local/bin/portscout line 1873.
> DBD::Pg::st fetchrow_hashref failed: no statement executing at
> /usr/local/bin/portscout line 1875.
> Creating maintainer pages...
> DBD::Pg::st execute failed: ERROR:  relation "results" does not exist
> LINE 1: SELECT DISTINCT maintainer FROM results
>                                         ^ at /usr/local/bin/portscout
> line 1903.
> DBD::Pg::st fetchrow_array failed: no statement executing at
> /usr/local/bin/portscout line 1905.
> Creating restricted ports (portconfig) page...
> 
> That's all it output.
> 
> Thanks!

Hello again,

After further inspection I've fixed the problem and it seems to work.
I've attached my patch.
-- 
Douglas William Thrift
<douglas at douglasthrift.net>
<http://douglasthrift.net/>
-------------- next part --------------
--- portscout.pl.orig	2008-01-23 20:10:35.000000000 -0800
+++ portscout.pl	2010-05-17 23:28:32.000000000 -0700
@@ -330,7 +330,7 @@
 
 # GenerateHTML
 
-$sql{portdata_genresults} =
+$sql{portdata_genresults1} =
 	q(SELECT *
 	    INTO TEMP _results
 	    FROM (SELECT DISTINCT
@@ -341,9 +341,10 @@
 	             AND newver is not NULL
 	             AND moved != true
 	           GROUP BY lower(maintainer))
-	      AS pd1;
+	      AS pd1);
 	
-	  SELECT maintainer, total,
+$sql{portdata_genresults2} =
+	q(SELECT maintainer, total,
 	         COALESCE (withnewdistfile, 0) AS withnewdistfile,
 	         CAST (100*(withnewdistfile*1.0/total*1.0) AS FLOAT) AS percentage
 	    INTO TEMP results
@@ -1837,11 +1838,12 @@
 
 	$dbh = DBI->connect(@db_connect_args) or die DBI->errstr;
 
-	prepare_sql(\$dbh, \%sths, qw(portdata_genresults portdata_selectall
-	            portdata_selectall_limited));
+	prepare_sql(\$dbh, \%sths, qw(portdata_genresults1 portdata_genresults2
+	            portdata_selectall portdata_selectall_limited));
 
 	print "Organising results...\n";
-	$sths{portdata_genresults}->execute;
+	$sths{portdata_genresults1}->execute;
+	$sths{portdata_genresults2}->execute;
 
 	emptydir($settings{html_data_dir});
 


More information about the freebsd-ports mailing list