I'm trying to write a site file to crawl a bug list from a local
installation of bugzilla, and during my attempts I tickled a bug. The
main url is, believe it or not, something like this vile apparition:
http://bugzilla.localdomain/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=aspiers&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&bug_file_loc=&bug_file_loc_type=substring&field0-0-0=noop&type0-0-0=noop&value0-0-0=&newqueryname=&order=bugs.priority%2C%20bugs.priority%2C%20bugs.bug_severity
which resulted in the following mysterious errors:
print on closed filehandle Sitescooper::CacheSingleton::PID at
/nfs-home/adams/lib/perl5/Sitescooper/CacheSingleton.pm line 82.
print on closed filehandle Sitescooper::CacheSingleton::OUT at
/nfs-home/adams/lib/perl5/Sitescooper/CacheSingleton.pm line 97.
They turned out to be the result of an unchecked open() failing.
With this patch:
Index: lib/Sitescooper/CacheSingleton.pm
===================================================================
RCS file: /cvsroot/sitescooper/sitescooper/lib/Sitescooper/CacheSingleton.pm,v
retrieving revision 1.1
diff -u -r1.1 CacheSingleton.pm
--- lib/Sitescooper/CacheSingleton.pm 2001/05/07 12:51:21 1.1
+++ lib/Sitescooper/CacheSingleton.pm 2001/05/09 21:21:31
@@ -78,7 +78,8 @@
sleep 1;
}
- open (PID, ">$pagefile.updating");
+ open (PID, ">$pagefile.updating")
+ or die qq{open(">$pagefile.updating") failed: $!\n};
print PID $$;
close PID;
@@ -92,7 +93,8 @@
$refcount++;
$header1 .= $refcount;
- open (OUT, ">$pagefile");
+ open (OUT, ">$pagefile")
+ or die qq{open(">$pagefile") failed: $!\n};
binmode OUT;
print OUT $header1, $header2, $pagetext;
close OUT;
... the real problem revealed itself:
open(">/nfs-home/adams/.sitescooper/page_cache_dir/bugs/guideguide_com_buglist_cgi_bug_status_NEW_bug_status_ASSIGNED_bug_status_REOPENED_email1_aspiers_emailtype1_substring_emailassigned_to1_1_email2__emailtype2_substring_emailreporter2_1_bugidtype_include_bug_id__changedin__votes__chfieldfrom__chfieldto_Now_chfieldvalue__short_desc__short_desc_type_substring_long_desc__long_desc_type_substring_bug_file_loc__bug_file_loc_type_substring_field0-0-0_noop_type0-0-0_noop_value0-0-0__newqueryname__order_bugs_priority_2C_20bugs_priority_2C_20bugs_bug_severity-0-0.updating")
failed: File name too long
I'm not sure what to do about that though.
_______________________________________________
Sitescooper-talk mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/sitescooper-talk