I get errors in the mail when a file open fails

Bug #819231 reported by Simon Oosthoek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
popularity-contest (Ubuntu)
New
Undecided
Unassigned

Bug Description

I get loads of error lines like this:
readline() on closed filehandle FILES at /usr/sbin/popularity-contest line 104.

Turns out that in this perl script, the open command (line 102) is used untested (not if (open FILES.....), but just open FILES ....)

the offending lines are just before 104:
100 my $pkg=$1;
101 $popcon{$pkg}=[0,0,$pkg,"<NOFILES>"];
102 open FILES, "$dpkg_db/$pkg.list";
103 my $bestatime = undef;
104 while (<FILES>)
105 {

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: popularity-contest 1.51ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
Uname: Linux 2.6.38-10-generic x86_64
Architecture: amd64
Date: Mon Aug 1 12:43:15 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 LC_MESSAGES=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: popularity-contest
UpgradeStatus: Upgraded to natty on 2011-07-15 (17 days ago)

Revision history for this message
Simon Oosthoek (simon-margo) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.