[Collab-qa-commits] r776 - in bapase: . rm_pkgs

lucas at alioth.debian.org lucas at alioth.debian.org
Thu Apr 10 20:25:23 UTC 2008


Author: lucas
Date: 2008-04-10 20:25:22 +0000 (Thu, 10 Apr 2008)
New Revision: 776

Added:
   bapase/rm_pkgs/
   bapase/rm_pkgs/README
   bapase/rm_pkgs/config-lucas
   bapase/rm_pkgs/mass-close
Modified:
   bapase/bugs_rm_pkgs.rb
Log:
added scripts to handle bugs from removed packages

Modified: bapase/bugs_rm_pkgs.rb
===================================================================
--- bapase/bugs_rm_pkgs.rb	2008-04-10 07:24:38 UTC (rev 775)
+++ bapase/bugs_rm_pkgs.rb	2008-04-10 20:25:22 UTC (rev 776)
@@ -1,21 +1,5 @@
 #!/usr/bin/ruby -w
 
-# lists bugs that:
-#  - are not marked as done
-#  - don't affect testing, unstable or experimental
-#  - don't  belong to a package in testing, unstable or experimental
-
-# For each bug, check:
-# - if the bug could be reassigned to another package (maybe discuss with the new package's maintainers). for example, bugs in linux-image-2.6.22-3-686 might have to be reassigned to another kernel package
-# - find the removal in removals*txt, find the removal bug, read the removal bug
-# - close all bugs with a Version: tag, using:
-#   + <last version in Debian>+rm as version string
-#   + maybe using a special address in From:
-
-# TODO:
-# write a script to mass-reassign bugs using a template
-# write a script to mass-close bugs using a template
-
 # see merkel:/org/bugs.debian.org/etc/pseudo-packages.description
 PSEUDO_PKGS = ['base', 'cdrom', 'spam', 'press', 'kernel', 'project', 'general', 'listarchives', 'nm.debian.org', 'qa.debian.org', 'ftp.debian.org', 'www.debian.org', 'bugs.debian.org', 'lists.debian.org', 'wnpp', 'cdimage.debian.org', 'tech-ctte', 'mirrors', 'security.debian.org', 'installation-reports', 'upgrade-reports', 'release-notes']
 

Added: bapase/rm_pkgs/README
===================================================================
--- bapase/rm_pkgs/README	                        (rev 0)
+++ bapase/rm_pkgs/README	2008-04-10 20:25:22 UTC (rev 776)
@@ -0,0 +1,20 @@
+use the list generated by bugs_rm_pkgs.rb
+lists bugs that:
+ - are not marked as done
+ - don't affect testing, unstable or experimental
+ - don't  belong to a package in testing, unstable or experimental
+
+For each bug, check:
+- if the bug could be reassigned to another package (maybe discuss with the
+new package's maintainers). for example, bugs in linux-image-2.6.22-3-686
+might have to be reassigned to another kernel package
+- find the removal in removals*txt, find the removal bug, read the removal bug
+- close all bugs with a Version: tag, using:
+  + <last version in Debian>+rm as version string (TODO: check)
+  + maybe using a special address in From:
+
+TODO:
+write a script to mass-reassign bugs using a template
+write a script to mass-close bugs using a template (done?)
+
+

Added: bapase/rm_pkgs/config-lucas
===================================================================
--- bapase/rm_pkgs/config-lucas	                        (rev 0)
+++ bapase/rm_pkgs/config-lucas	2008-04-10 20:25:22 UTC (rev 776)
@@ -0,0 +1,3 @@
+export RMFROM="Lucas Nussbaum <lucas at lucas-nussbaum.net>"
+export RMSIG="-- 
+Lucas"

Added: bapase/rm_pkgs/mass-close
===================================================================
--- bapase/rm_pkgs/mass-close	                        (rev 0)
+++ bapase/rm_pkgs/mass-close	2008-04-10 20:25:22 UTC (rev 776)
@@ -0,0 +1,66 @@
+#!/usr/bin/ruby -w
+#
+# Usage: mass-close sourcepackage last-version-in-debian removal-bugno
+# +rm will be added automatically.
+
+require 'pp'
+require 'soap/rpc/driver'
+bts = SOAP::RPC::Driver::new('http://bugs.debian.org/cgi-bin/soap.cgi', '/Debbugs/SOAP')
+bts.add_method('get_status', 'bugs')
+bts.add_method('get_bugs', 'params')
+bts.add_method('get_bug_log', 'params')
+bts.add_method('get_usertag', 'email', 'tag')
+bts.add_method('newest_bugs', 'num')
+
+PKG=ARGV[0]
+VER=ARGV[1]
+RMBUG=ARGV[2]
+SENDMAIL=false
+
+puts "------bugs for #{PKG}-----"
+bugs = bts.get_bugs(['package', PKG])
+status = bts.get_status(bugs)
+bugs = []
+status.each_pair do |k, v|
+  next if v.done != ''
+  puts "#{k} #{v.package} #{v.severity} #{v.pending} #{v.subject}"
+  bugs << k
+end
+puts "-- press enter to continue --"
+STDIN.readline
+tmp=`mktemp /tmp/email.#{PKG}.XXXXXX`.chomp
+f = File::new(tmp, "w")
+f.puts <<EOF
+From: #{ENV['RMFROM']}
+To: TMPL_BUGNO-done at bugs.debian.org
+Subject: #{PKG} has been removed from Debian, closing TMPL_BUGNO
+
+Version: #{VER}+rm
+
+The #{PKG} package has been removed from Debian, so I am now
+closing the bugs that were still opened against it.
+
+For more information about this package's removal, read
+http://bugs.debian.org/#{RMBUG}
+
+Thank you for your contribution to Debian.
+#{ENV['RMSIG']}
+EOF
+f.close
+ed=ENV['EDITOR']
+if ed.nil?
+  ed='sensible-editor'
+end
+system("#{ed} #{tmp}")
+s = IO::read(tmp)
+bugs.each do |b|
+  if SENDMAIL
+    f = IO::open("/usr/sbin/sendmail -t", "w")
+  else
+    f = File::new("email.#{PKG}.#{b}.txt", "w")
+  end
+  mail = s
+  mail.gsub!('TMPL_BUGNO', b.to_s)
+  f.puts mail
+  f.close
+end


Property changes on: bapase/rm_pkgs/mass-close
___________________________________________________________________
Name: svn:executable
   + *




More information about the Collab-qa-commits mailing list