[Collab-qa-commits] r703 - wnpp-monitor
lucas at alioth.debian.org
lucas at alioth.debian.org
Fri Feb 8 11:40:03 UTC 2008
Author: lucas
Date: 2008-02-08 11:40:02 +0000 (Fri, 08 Feb 2008)
New Revision: 703
Modified:
wnpp-monitor/wnpp-monitor.rb
Log:
also report about removal bugs
Modified: wnpp-monitor/wnpp-monitor.rb
===================================================================
--- wnpp-monitor/wnpp-monitor.rb 2008-02-08 10:59:24 UTC (rev 702)
+++ wnpp-monitor/wnpp-monitor.rb 2008-02-08 11:40:02 UTC (rev 703)
@@ -15,14 +15,27 @@
bts.add_method('get_usertag', 'email', 'tag')
bts.add_method('newest_bugs', 'num')
+$wnpp = {}
+
bugs = bts.get_bugs(['src', 'wnpp'])
-$wnpp = {}
status = bts.get_status(bugs)
status.each_pair do |k,v|
next if v.pending == "done"
next if v.subject !~ /^(O|RFA|ITA): ([^ ]+) /
$wnpp[$2] = [ $1, k.to_i ]
end
+
+bugs = bts.get_bugs(['src', 'ftp.debian.org'])
+status = bts.get_status(bugs)
+status.each_pair do |k,v|
+ next if v.pending == "done"
+ next if v.subject !~ /^RM: ([^ ]+) /
+ p $1
+ pkg = $1
+ next if pkg =~ /\// # removal specific to some dist
+ $wnpp[pkg] = [ 'RM', k.to_i ]
+end
+
File::open('wnpp-new.yaml', 'w') do |f|
YAML::dump($wnpp, f)
end
@@ -50,7 +63,7 @@
For more information, please read
<http://bugs.debian.org/#{bug}>
-(Your are receiving this mail because you are subscribed to
+(You are receiving this mail because you are subscribed to
#{pkg} on the Debian Package Tracking System.)
EOF
end
@@ -60,6 +73,12 @@
if (ow[pkg] == w[pkg])
# no status change, do nothing
next
+ elsif w[pkg] == 'RM'
+ write_mail(pkg, "[wnpp] removal of #{pkg} has been requested!",
+ "The removal of the #{pkg} package in Debian has been requested.",
+ $wnpp[pkg][1])
+ elsif (ow[pkg] == 'RM') and w[pkg] == nil
+ # do nothing
elsif (ow[pkg].nil? or ow[pkg] == 'RFA') and w[pkg] == 'O'
# now orphaned
write_mail(pkg, "[wnpp] #{pkg} has been orphaned",
@@ -106,4 +125,8 @@
end
end
-system("rm -rf #{$tmpdir}")
+if DEBUG
+ puts $tmpdir
+else
+ system("rm -rf #{$tmpdir}")
+end
More information about the Collab-qa-commits
mailing list