I get errors in the mail when a file open fails
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/
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{
102 open FILES, "$dpkg_
103 my $bestatime = undef;
104 while (<FILES>)
105 {
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: popularity-contest 1.51ubuntu1
ProcVersionSign
Uname: Linux 2.6.38-10-generic x86_64
Architecture: amd64
Date: Mon Aug 1 12:43:15 2011
PackageArchitec
ProcEnviron:
LANGUAGE=en_GB:en
PATH=(custom, no user)
LANG=en_GB.UTF-8
LC_MESSAGES=
SHELL=/bin/bash
SourcePackage: popularity-contest
UpgradeStatus: Upgraded to natty on 2011-07-15 (17 days ago)