Author: joeyh Date: 2005-09-01 19:31:46 +0000 (Thu, 01 Sep 2005) New Revision: 1766 Modified: bin/checklist Log: remove /tmp race Modified: bin/checklist ==================================================================--- bin/checklist 2005-09-01 19:29:08 UTC (rev 1765) +++ bin/checklist 2005-09-01 19:31:46 UTC (rev 1766) @@ -12,7 +12,7 @@ my $html=0; my $debug=0; my $suite="testing"; -my $sta = "http://secure-testing.debian.net/debian-security-updates/dists/testing/security-updates/main/source/Sources.gz"; +my $sta="http://secure-testing.debian.net/debian-security-updates/dists/testing/security-updates/main/source/Sources.gz"; my $output; if (! GetOptions( "html" => \$html, @@ -24,7 +24,9 @@ die "usage: $0 [--suite suite] [--sta sta-mirror] [--html] [--output=file] [--debug] list ...\n"; } -system("wget -q -O /tmp/Sources.sta.gz $sta"); +my $stasources=`tempfile`; +chomp $stasources; +system("wget -q -O $stasources $sta"); if (defined $output) { open (OUT, ">$output.tmp.$$") || die "output.tmp.$$: $!"; # Set the output to a file @@ -181,14 +183,13 @@ my $arches=$fields[3]; $version=~s/\s+//; # strip whitespace $arches=~s/\s+$//; - my $starchive = ""; - # Is the version in the archive greater than the version that''s vulnerable? my $cmp=system("dpkg --compare-versions ''$havver'' ''>='' ''$version''"); if ($cmp != 0){ # No, so the archive is vulnerable. + my $starchive = ""; # Does the version exist in the secure-testing archive? - my $staversion = `zcat /tmp/Sources.sta.gz |grep-dctrl -F Package -e ^$package\$ -s Version -`; + my $staversion = `zcat $stasources |grep-dctrl -F Package -e ^$package\$ -s Version -`; chomp $staversion; $staversion=~s/Version: //; $staversion=~s/\s+//;