[Collab-qa-commits] r838 - archive-rebuilds tools

lucas at alioth.debian.org lucas at alioth.debian.org
Mon Apr 28 06:44:32 UTC 2008


Author: lucas
Date: 2008-04-28 06:44:32 +0000 (Mon, 28 Apr 2008)
New Revision: 838

Added:
   archive-rebuilds/diff-usertags
   tools/bugsmbox.rb
Log:
various scripts added

Added: archive-rebuilds/diff-usertags
===================================================================
--- archive-rebuilds/diff-usertags	                        (rev 0)
+++ archive-rebuilds/diff-usertags	2008-04-28 06:44:32 UTC (rev 838)
@@ -0,0 +1,58 @@
+#! /usr/bin/ruby1.8 -w
+require 'soap/rpc/driver'
+require 'pp'
+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')
+
+# E: not serious: 470440 sbuild (important) sbuild doesn't cope with Checksums-Sha1 and Checksums-Sha256 headers
+# E: not serious: 395271 sbuild (important) sbuild: incorrectly handles versioned provides
+# E: not serious: 474902 gnumach (important) gnumach: FTBFS: bad_user_access_length
+# E: not serious: 473951 gtk-doc (important) gtk-doc: FTBFS: Unsatisfiable build-dependency: openjade(still installed)
+# E: not serious: 395260 sablevm (important) sablevm: cannot create VM when run into a i386 chroot on a AMD64 system.
+# E: not serious: 458879 debian-edu-doc (important) FTBFS in sid, builds fine in etch
+# E: not serious: 441159 9base (important) FTBFS in i386 chroot on amd64
+# E: not serious: 474894 newlib (normal) newlib: FTBFS: Nonexistent build-dependency: binutils-spu [package only for ppc/ppc64]
+NOT_SERIOUS = [ 470440, 395271, 474902, 473951, 395260, 458879, 441159, 474894 ]
+
+# E: only in first set: 474888 gnat-4.3 gnat-4.3: FTBFS: Bootstrap comparison failure!
+# E: only in first set: 471614 gnat-4.1 gnat-4.1: FTBFS: b~gnatfind.adb:(.text+0x225): undefined reference to `xr_tabls___elabs'
+# E: only in first set: 458634 glib2.0 glib2.0: FTBFS: undefined reference to `g_type_module_register_type'
+RANDOM_FAIL = [ 474888, 471614, 458634, 470337, 458874, 476070 ]
+
+IGNORE_DONE = true
+bugs1 = bts.get_usertag(ARGV[0], ARGV[1])
+bs1 = bts.get_status(bugs1[ARGV[1]].sort.uniq)
+
+bs1.delete_if { |k, v| v.pending == "done" } if IGNORE_DONE
+
+bugs2 = bts.get_usertag(ARGV[2], ARGV[3])
+bs2 = bts.get_status(bugs2[ARGV[3]].sort.uniq)
+
+pkgs = []
+bs2.each_pair do |k,v|
+  if v.pending == 'done'
+    modif = Time::at(v.log_modified.to_i)
+    if Time::now - modif < 86400*2
+      modif = " [MODIFIED: #{modif}]"
+    else
+      modif = ""
+    end
+    puts "E: marked as done#{modif}: #{k} #{v.package} #{v.subject}"
+  end
+  if v.severity != 'serious' and not NOT_SERIOUS.include?(k.to_i)
+    puts "E: not serious: #{k} #{v.package} (#{v.severity}) #{v.subject}"
+  end
+  pkgs << v.package
+end
+
+bs2.delete_if { |k, v| v.pending == "done" } if IGNORE_DONE
+
+(bs1.keys - bs2.keys).each do |b|
+  next if pkgs.include?(bs1[b].package) # another bug from the same package is tagged, possibly hiding this one.
+  next if RANDOM_FAIL.include?(b) # random failure, skipping anyway
+  puts "E: only in first set: #{b} #{bs1[b].package} #{bs1[b].subject}"
+end


Property changes on: archive-rebuilds/diff-usertags
___________________________________________________________________
Name: svn:executable
   + *

Added: tools/bugsmbox.rb
===================================================================
--- tools/bugsmbox.rb	                        (rev 0)
+++ tools/bugsmbox.rb	2008-04-28 06:44:32 UTC (rev 838)
@@ -0,0 +1,19 @@
+#!/usr/bin/ruby -w
+#
+# Fetches all mboxes for bugs from a given package.
+
+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]
+bugs = bts.get_bugs(['src', pkg, 'archive', 'both'])
+bugs = bugs.map { |b| b.to_i}.sort.reverse
+bugs.each do |b|
+ system("wget -q -O #{pkg}.#{b} \"http://bugs.debian.org/cgi-bin/bugreport.cgi?mbox=yes;bug=#{b}\"")
+end




More information about the Collab-qa-commits mailing list